Friday, December 10, 2010

Xmas list 2.... riiiiiight.... (updated)

Since i did adquire some gadgetery goods since last time, i feel like it's a good idea to update this ...
Obsolete entries from my last xmas list:
  • Nokia 5800 XpressMusic
  • Sony Alpha 350k
  • Sony HDR-SR11E
  • Samsung SyncMaster 2233SW
  • Intuos3 A5 Wide USB "Special Edition"
Current entries in my xmas list:
  • Intuos4 Wireless (for the price this costs i'd rather have the pandora)
  • Pandora Handheld
  • Voigtlaender 25mm f/0.95 for MFT
  • Panasonic G Vario 100-300mm f/4.0-5.6
  • LUMIX G VARIO 7-14mm F4.0 ASPH
  • Lensbaby Composer with Tilt Transformer for Micro 4/3rds
Since this might be a bit overly expensive for most pockets, i'll be putting a cheaper list:
Quoting myself from last time:
So ... anyone with a heavy felling in the pocket? I know, i know: "Keep dreaming...".

EDIT:
@neca,

It's striked down ... unless your browser sucks or the feeds ignore it (I checked that out to avoid confusion) and you don't see that >_>

At the time A350 was a good camera (and i didn't buy it), Canon had 450D ... and that would be a nice choice as well...

In any case i currently have a Panasonic Lumix DMC-GH1 (hacked firmware) + 14-140mm lens + 20mm f/1.7 lens ... a nice small combo for photography that does terrific videos as well - but that Voigtlaender 25mm f/0.95 would sure be handy in extreme low light :]

Currently i actually move away from all Sony and Apple products ... they use several technics to fidelize (not an english word, yay! *sarcasm*) and limit the client to their brands ... and that i cannot accept.

Monday, December 6, 2010

Artificial Bokeh

Bokeh... better use wikipedia explanation: In photography, bokeh is the blur, or the aesthetic quality of the blur, in out-of-focus areas of an image, or "the way the lens renders out-of-focus points of light." Now, this is often used to enhance a subject or give a dreamy or surreal look to a picture, in portraits is often used to achieve a smooth background, and while it's not always desired it appears because of the so called circle of confusion and depth of field (http://en.wikipedia.org/wiki/Depth_of_field).
For achieve the blur of out of focused areas one must often use lens with big apertures or/and a good focal length, and those are usually expensive, heavy, big or a combination of the three... The other way of achieve that effect is to simulate it artificially... and that it's kinda tricky, mainly because the original image to which you want to apply it doesn't have the entire information to do it....
The simplest way to increase blur or create blur to given out of focus areas would be when create miniature looking photos of a city, this is possible because cities are often layered in a simple plane and an overlayed blured picture using a gradient as mask does the trick in most of the cases....
Extending the concept, one can create a mask to protect focused areas and blur the rest, but bokeh doesn't have a regular radius blur, the bigger the distance from the focus plane is the blurrier the area looks, and that brings us to a depth map/mask ... sadly this is not easy to create, nor easy to apply as a mechanism of interpreting the depth must exist.
Taking care of a mechanism for doing it properly, i introduce you to GIMP Focus Blur Filter Plug-in (windows version)... Now how does that plug-in perform.... wonderfully i must say... sadly my 20mm f/1.7, while has a big aperture, sometimes it's not quite enough to blur the background as i wished it would do... so i searched and found this pearl... it is quite awesome to apply... the drawbacks?
I point two: It will take its time to be applied (in a 8MP image might take like 10mins!) and you really need a depth map if you want to see awesome results :]
By the way, black means focused, white means fully unfocused.... in the middle ... is in the middle :] Well, to help you out with the depth map, i'll point you to another plugin: Depth map Plugin (windows version) ... It will create a depth map, but it has a requirement: You need to take two stereoscopic images, and that on moving stuff is only possible with two cameras (preferably identical)... it works pretty well, but you might want to retouch the depth map a bit for best results... Here goes an example of what you could do (Halloween Gothic Bride for the win): The original (well, not quite original, as this was cropped, noise was reduced, color corrected, details sharpened and reduced on the end for web view): The depth map i drawn (clumsy for the win): The end result using Flat model, 25px radius blur, 5px radius shine: This is simply the best plug-in I've ever found - and i don't even explored everything it has to give - this fella is just above tone mapping filter :]

Tuesday, November 16, 2010

Line of code of the day #5

Another LOCOTD.... just for me to remember those nice *cough cough* code lines that i come around from time to time.... i'm currently working as a trainee (until February), i'm currently implementing a custom featured content management system (CMS), i'm using php, mySQL, xhtml, css and a bit of JS for some slideshows... but this LOCOTD is about SQL ...
Store Procedures (SPs), as you may not know, are supported by mySQL for quite some time, however not quite perfectly as you might expect.... On SPs, you basically build a wrap box around one or more SQL statements, you can set variables, use the usual SQL stuff.... in my case i was using a SELECT, like i did for the rest of the dozens of SPs i did before, i was implementing a page like feature in the CMS, for that LIMIT clause is god send, but guess what.... in SPs you can't use non-constant integers in LIMIT parameters... yes.... you can use the arguments of the SP anywhere, except on the LIMIT clause...
So ... "How to solve it?" that would be the question... one way would be using a prepared statement, like this:
CREATE PROCEDURE `fooTable`.`sp_fooTableList` ( limit_arg int ) 
BEGIN
SET @sql = concat('SELECT * FROM `fooTable` LIMIT ', limit_arg); 
PREPARE STMT FROM @sql;
EXECUTE stmt; 
END

An obvious problem with this, is that it broken the extra security provided by SPs... but it is a valid workaround.... quite simple as well.... but because this prepared statement kinda defeat the purpose of having a nicely wrapped SQL statement, i found a way of doing it without recurring to it, i say found and not invented, credit goes to Gert Brigsted, it's easy to follow and understand how and why it works: 
CREATE PROCEDURE `fooDB`.`sp_fooTableList` ( limit_start, limit_end )
BEGIN
SET @rownum:=0;
SELECT *
FROM ( 
  SELECT ( @rownum:=@rownum+1) AS Rownumber, `fooTable`.* 
  FROM `fooTable` 
  ORDER BY `fooTable`.`mooCol` DESC
) AS t
WHERE Rownumber > limit_start AND Rownumber <= limit_end;
END

It looks messy, but it works... sure, it has some impact on performance, but that's the price to pay for security... until LIMIT clause accepts variables as parameters.

Perhaps you are thinking, "That surely is, or will be, fixed in current iterations of mySQL" ... you are right it is, in versions 5.5.6 and 6.0.14, it is 'fixed' ... But not all servers allow you to change mySQL version installed... so, I guess you may run into this problem and have to use one of the above workarounds...
As a side note, this was submitted as bug #11918 by 13 July 2005 and 'solved' by 24 September 2010 .... more than 5 years to 'fix' this 'bug' ... i use quotes because wasn't exactly a bug but more like a non-feature...
Hope it helps someone out there bashing at "ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near: s_limit, e_limit;"

Wednesday, August 26, 2009

Canon Power features...

I don't own a Canon camera... but for the ones that own one and have that feeling that the camera could gain with some extra customizable options in menus, or just want to try advanced photo technics without have to pay a premium price for such features, CHDK might be what you're looking for... http://chdk.wikia.com/wiki/CHDK
Please note that not all cameras are supported by such free 'add-on'... if your camera is on the list .. you're a lucky one... now you have no excuse for don't try HDR exposure bracketing technics, motion detection technics and don't even dare to take over/under exposed photos again (unless playing with exposure technics), multi focus technics and lightning shot tricks are also possible ... this puts canon cameras in quite some weird place... really... now you can even play games on one... or just remote shot via USB... ... but really this kinda makes me buy a Canon camera just for the goodies in firmware... Digic II, III or IV are the possible engines that cameras have... they have a list on that wikia on the link above... have fun!

Monday, August 10, 2009

5800XM v30.0.011

Update! I updated OTA, since OVI Suite didn't detect the new version, now as far as i can tell... ...the goods:
- Snapier on some tasks (web browsing is more stable and fast)
- A few graphical glitches disapeared
- Tab (unable to change tab in settings and in messages) bug disapeared
the neutral:
- fullscreen toggle button (when in fullscreen) in web browser is located on the corner and is transparent
- Max sound volume is a bit lower... not bad since at old max volume the phone vibrated
the bads:
- Slower on some tasks, specially when is the first time (rotate screen for the first time on some places is slower)
- Interface got a little slower in my opinion
- Hue bug is back! ... but now auto-corrects it self after a second or so

With this update i updated Maps to 3.0 as well... please note that Maps requires a huge amount of memory to install! Now ... when will 5800XM get the interface of 5530XM? ... kinetic (inertial) scroll is welcome as well as a better use of homescreen (landscape on it would be nice as well)
OMFG: http://www.forum.nokia.com/devices/5800_XpressMusic Please read CPU speed - They upgraded it from 360Mhz to 434Mhz!

Wednesday, July 15, 2009

Stuff..

Hello bloggers... i wonder who still reads my blog... well ... today i'll provide something entertaining ... my junk album on picasa account was updated... feel free to visit it... I also added an Experimental album with something done with 2 photos with different exposures... after contrast blend, noise reduction filter and selective saturation enhancement you can see the final result... i was expecting something quite worse...

That's all ... oh! ... Having trouble with input on J2ME for 5800xm due to lack o numerical keypad? search for Virtual Keyboard S60 0.91 or 0.94 (1.01 is buggy - 0.94 is tricky - 0.91 is beta) it will help on some of your needs ... (i wonder why nokia doesn't have something like that for legacy applications - Adobe PDF Reader non-Touch is free ... but LE edition with touch it isn't... lame...)

On a side note... Galaxy on Fire 2 was released .... you can download it for free (be warned that to play it till the end you'll have to pay for it - nice marketing manouver by Fish Labs - Same goes for one of their car racing games), i've mastered GoF (first version) on my old mobile phone, but never finished it ... with more than 45h of gameplay i hadn't visit all the planets >_> ... GoF 2 is also big... and while playing on the first solar system is free, after that you have to connect to internet to check for activation EVERYTIME ... so .. enjoy that one solar system ... it's free XD ... try to get all the stuff from it... is a nice quest ... Oh... good summer vacations... i won't have them... *goes emo*

Wednesday, July 1, 2009

Ovi Suite + Nokia Maps 3.0 + Nokia 5800

Hmmm ... i installed Nokia Ovi Suite, that by the looks of it should replace the old Nokia PC Suite, it is still beta, but seems to work well... till i checked for updates there and it told me that i had an update available for my 5800... nokia maps 3.0, i read in engadget that the updated was expected ... so i happilly download it and installed it... to see it completely f*** up my phone ... ... after some bashing i restored my phone hability to ... well... phone... but surprise ... i have a phone with GPS ... without working GPS software, when i try to run nokia maps on phone it tells me that i must update it and requests me to go to nokia maps website and follow instructions... i did ... and ... same thing keeps showing on phone >_>' ... Bad nokia ... bad, really bad... well... i'll bash a little more ... Edit: Deleting most of memory card contents solved the issues ...