Monday, September 26, 2011

How to pick a camera (or try to)

Many people ask me stuff about gadgets, cameras nowadays are seen as gadgets given their presence in mobile phones and integration with printers and other strange stuff, however the purpose of them has not changed even if it's either a digital or analog medium: To record an image.

So, I receive lots of requests asking me if camera X is better than camera Y, if feature A does any good or if price is good for camera Z.

To pick a camera, you have to define answers for these questions:
  • How much are you willing to spend?
  • For what are you going to use it?
  • What quality is enough for you?
There are obvious answers to the second and third question that mean that your budget is not enough, however you can reach a compromise for most of the time.

And talking about compromises, please note that there is no perfect camera for everything, so don't expect perfection.

To understand the third question I'll expose you to where image quality can be evaluated:
  • Sharpness - this depends on several factors:
    • You, if you don't stay steady when taking a shot it will come out blur, this is probably the biggest factor. Also, panning to keep a moving subject steady on the frame is not exactly easy.
    • Lens, if the lens are not good, sharpness, color and contrast can take a hit for the worse
    • Sensor resolution, not as important as it may seem, specially as modern cameras are all above 6MPs
    • In camera noise processing, some cameras over cook the image making it look quite bad, other make a great job!
  • Low light noise - When light is missing recording an image might be troublesome, cameras usually 'pump' the ISO and this will mean more noise or heavier image processing by the camera (making it lack sharpness), if the camera has a good flash you might get away with it by using it, or if you can use a tripod and the scene is static you can take night photos quite well.
  • Optical defects - From color fringing in high contrast scenes, distortion (barrel or pincushion effect), coma, astigmatism, flare, etc.
  • Bokeh - bokeh is the term used to describe the out of focus blur, it is related to the optical proprieties of the lens and can be good or bad, it is often subjective, but most agree that smooth bokeh is better than a 'harsh' one. It is quite useful in macro and portrait photography.
Other useful points in choosing a camera are its speed, both focus and image recording speed, video features, flash, tripod mount, etc. Avoid to pick a camera because it has 34 creative modes, you will most likely not use them. HDR and panorama may seem useful, but if you can control exposure you can stack several exposures on the computer and panoramas can be done, on computer as well, by stitching several photos - most of the time you will have better control over the process if you use the computer to do it.

I solved to divide this guide in camera purpose, and will try to give some suggestions for several price tags.
When I mention "Search for a camera" I meant check for reviews websites with real use samples.

First, read a guide about photography in general, something that explains how a photo is recorded, what aperture, focal length, shutter speed and ISO are.
If you are lazy and don't want to do that I'll make a very resumed explanation here:
  • exposure time/shutter speed – time that the sensor is exposed to light, longer mean blurred movement, shorter will freeze action, this also means that longer exposures will make your hand shaking more apparent;
  • aperture size/value/number – the size that the lens diaphragm (hole) has, f/2 means more light (bigger/brighter aperture) than f/4, out of focus areas will be blurrier with bigger apertures, most lens limit you to smaller apertures as you use bigger focal lengths;
  • sensor/film sensitivity (ISO) – how much light need to be recorded, ISO 100 means twice the light of ISO 200 is needed to record at the same exposure level;
  • Focal length – bluntly it defines how much 'zoom' your camera has, it is often compared to 35mm film equivalent, a 50mm means a 'natural' view (what our eyes perceive), 24mm is a very good wide angle, 100mm is a telephoto focal length and bigger than that past 300mm can be considered super telephoto. For identical apertures, the photo taken with bigger focal length will have the out of focus area blurrier.
Exposure – the photo requires the sensor to be exposed to light for a given time time (shutter speed), the correct exposure is a balance between sensor sensitivity, aperture size and exposure time, if you mess with one, you'll have to mess with other.

Record mementos - for small prints, social networks and email share - the lowest budget possible:
If you want a camera to snap some special moments to remember later and share online, a mobile phone camera might suffice, by that I mean that any camera would do, however, if the quality of the photo matters (because you may print or edit the photos taken) something a bit better than a lousy mobile phone camera is probably required.

There are lots of cheap cameras that already offer more than enough quality, I suggest that you seek one that behaves well in low light as most of the time you don't want to/can't use a flash and the light indoors means that your ISO will have to be at a higher value than the ideal. If you know that you will use the flash, check how well the flash illuminates a given scene.
Search for a camera with an acceptable quality at ISO 800 and you should be okay, but bare in mind that when light is non-existent (night shot) you will need to use either flash or a tripod, usually you would only use a flash in this kind of camera. You won't be needing lots of zoom or other gimmicks, but video is always a good thing to have.

For this kind of use, Canon A800 or Canon A1200 are good cameras for their price, with them you can even print fairly large (A4) and get a nice quality, obviously in low light they will start getting a hit, you can check similar cameras as well and use these as a comparison term. Search for cameras with wide angle lens... this is hard to define but 24mm equivalent is a very good wide angle in a compact - this makes group shots easier to take.

Compact and versatile - take it every where, record everything:
If you think in using the camera to explore photography in general, but you are thinking in spare some change on your wallet it may be a bit tricky to select a camera, you will probably want some zoom capability (10x is pretty nice) on some wide angle lens (at least 28mm in film equivalent terms) with good manual modes (check for P,A,S and M modes on the mode dial) and low light capabilities (Check samples online from ISO 400 to ISO 1600). This is very tricky to find at a low price, be prepared to make some compromise.

Often you have lots of features you may or may not want, be aware of that (will you really use slow motion video features? or GPS?).

If you want it to record video as well, you'll be happy to know that most of he modern cameras allow you to record in HD, however not all are worthy of being selected for just that. Some cameras have really bad video quality, so check samples online. Avoid interpolated video recording and while it is up to personal preference, prefer cameras with 24/25 fps video recording instead of 50/60 fps, this will give a better feel to the video, however higher frame rates allow you to do slow motions at ease.

I'll leave some camera suggestions as terms of comparison, Canon SX220 HS (or SX230 HS - it has GPS as an extra, might not worth the extra price though) and Sony HX9V. For something cheaper you have Olympus SZ-10, for something with even more zoom you can either look at the bridge segment or the peculiar Olympus SZ-30MR, but, in either case, be prepared to some serious downgrade in image quality.

You may as well take your time and look at older models, some are quite good, but the new EXMOR Sony sensors and HS Canon system deliver quite a nice deal. Search for samples is always a good idea.

Do-it-All camera:
So, you kinda want a camera that does everything, a compact super-zoom even though it does it already is not enough? Well, you have bridges, older bridges could not do what a modern compact super zoom does, but you want more ... well, be prepared to get less, when an huge amount of zoom is present some sacrifice as to be done, often lens have less aperture, images will not be as sharp and there might be other issues. However, in terms of versatility you will have everything in a single place.

It is somewhat hard to pick one of those camera... Kodak Easyshare Z990 seems to be the cheapest on worth of attention, where the latest Panasonic Lumix FZ150 (or the cheaper and with less features Panasonic Lumix FZ47 / FZ48) and Sony HX100V are considered the best of the best when comes to quality of the photos taken.

Picking the right one, like I said before, is not easy, they usually have many features that make comparison harder, just stick to what you want/need and choose the best priced one.

At this point I could enter in the ILS (Interchangeable Lens System) where the lens can be swapped, but most of people who take family/holiday shots won't have the need of such system with the modern travel zoom cameras (like the Canon SX220 HS). There are also some premium compacts that offer greater image quality, but for the same reasons, I won't be entering in that segment discussion.

Bare in mind that the camera suggestions I give are not meant to be the best, however I consider them a good starting point to search for a good camera.

Last, but not the least, make sure the camera size and ergonomics are suitable for you, if possible also check the camera menus and interface (many manufacturers have camera manuals online), you may not like some and it can be a decisive factor in picking  the camera.

So what websites do I suggest to check for reviews? Any that has full size samples from the camera, also please consider that a slight noisy photo of a 16MP camera may have more detail than a perfectly sharp 10MP one, compare images at the same size, if this is hard for you, resize all samples to 10MP (or other well defined resolution) and compare them directly, a sharp 10MP can be used to print in A3 sheet sizes without issues (a 6MP will fulfill most of your needs), so take that in mind.
If you read all this till here, congrats! I'll will spare you to search for review websites and dump a few in here (but feel free to search for more):

If you are at loss of what cameras are available on the market check the in the manufacturers websites, most of review websites make some sort of comparison with other camera models though.

If that was TL;DR

So is camera X better than camera Y?

Google for the camera X and the camera Y, find review, check image samples, what looks better at different conditions? Are the other features useful?
Bare in mind that not all cameras are better than others in everything.

Does feature A does any good?
What is feature A? Google it!

Is price is good for camera Z?
Check for similarly featured camera, what is the price of those? Are they better or worse?

So ... there you have it ... the only person that can really pick a camera is you. Do your research and don't let anyone else do it for you, you might not get what you are looking for.

Oh... Good luck!

Saturday, September 24, 2011

Post Processing 101

prometheus-bd from flickr asked me for some tips about photos post processing, I though of posting it here so everybody could read it, even if I'm not very good at explaining stuff...

I though of starting with the basics of post processing, this is not how to take a photo, what background is best for a given subject or what composition is best for a given scene, this is meant to be a simple showcase of the tools available in imaging software and how they affect the image itself.

I will NOT be explaining how 'light room' (same process as darkroom from film times, but for processing digital RAW data) works in this entry, I leave that for another time.

I'll be using GIMP, it is a free application and give me quite some tools for enhancing my photos, I use some python Filters that I installed a long time ago, but for sake of compatibility I'll use only the most common ones than can be find on other imaging application. This is not a GIMP tutorial though, so you should know what/where tools are, names of tools don't change a lot from application to application, so this shouldn't be too troublesome.

First we need to start with a photo... well ... I have a bunch of them so I'll just pick one at random.

I like this shot, while it wasn't the best taken one, it provides a nice start point to show some post processing tools.

Let's start with composing the shot... usually you should prevent this by correctly frame the photo when shooting, but sometimes, either because you didn't had the time to do it or you did not perceive the scene well, framing will not be as good as you wanted.

I feel like this shot needs to be rotated to level those stairs with the picture frame, there is a rotate tool available, it allows you to rotate the image at any degree your want. In Gimp you can also overlay guide lines by dragging the ruler bar into the image itself. You may want to expand image canvas to fit layer size.

I think I over did it a bit, well, this is only a simple tutorial with no artistic intentions.

If you want more control over the image you can use perspective tool, it may prove useful to make something into perfect rectangle/square. Like this on the right. You can also use lens distortion/correction tools, some cameras correct it already.

 I solve to crop the photo quite a bit, this can be done by making a rectangle selection and choosing "Crop to selection", in my case I set the selection to have 3:2 proportions.

At this point I feel that image needed to be sharpened a bit, I've done this using a special filter I have in GIMP, it is equivalent to unsharp mask filter in other applications with support for darkening and enlightening edges so that they 'pop up' more, giving the image those contrasty edges that are pleasant for the eyes while avoiding some artifact given by normal sharpening tools. However, over doing it will make the picture look artificial by casting auras/halos around edges in a similar fashion to what happens using normal sharpening filter. Using a large radius mask will give a bump in local contrast, if the strength of the filter is too much it may give some halos similar to those of HDR images, I feel this image could benefit from some slight improvement of local contrast, so here it goes, radius 64 with 0.5 strength.

If your application can only lighten the edges (most do, photoshop and paint shop pro should have it working like the GIMP filter by now though), you can apply the filter to the normal image, invert the colors, apply it again, and invert to the original (you can test this by drawing a light gray rectangle on a dark gray background and applying the filter).

Well, the picture has now a bit more contrast, however, in the picture the sun was setting, and it lacks the harsh light of the sunset, I wanted to enhance a bit that mood as a pretext to explain a bit the curves tool.

I applied the shown curve modifier to the image

This is probably one of the most basic curves you will use, understanding how to use curves tool requires you to understand what a image histogram is, I won't be explaining that here right now, but you can get an idea that it shows the amount of pixels at a given light level (if it is a luminance histogram).

The light gray diagonal line shown the original curve, the black line shows my change.

It gives an increase of contrast (as the slope is bigger) in the middle area

Reduces a bit the exposure (darkening the photo) as most of the curve is under the original one

Clips the shadows a bit (by starting under the original line).

A side effect of increasing the contrast is that it increases the saturation (color contrast) as well, this is because the curve is not applied to luminance alone but to Value channel, that can be seen as an average of RGB, this gives me a stronger orange/red tone on the stairs, thus increasing the idea of the sun light hitting the stairs there.

I suggest you play with the curves tool, it can be very powerful to either correct the colors, enhance them or simply create surrealistic effect.

It depends of what application you are using to edit your photos, but you can apply the curves tool not only to luminance (Y channel/Value channel), but to other components as well.... from RGB ones to HSV or HSL or even CMYK channels. Here I bumped the red channel a bit and reduced the blue channel a bit giving it more warmer tones

Hope you liked this small showcase of post processing tools.

Play with the tools you have on your application, if you are new to this and have Windows on your computer, I suggest Paint.NET as a starting point, it is free, simple and intuitive.

If you like to see something more deeply explained feel free to ask.

Have fun!

Tuesday, August 30, 2011

GH1 - Ressurrection :D

So ... My GH1 got the SD card jammed in it...

Wednesday, August 24, 2011

Nokia 5800 XpressMusic - Camera

Because my GH1 solved to commit suicide (I may post the repair process later - once I get it repaired), I solve to check what my 'old' 5800 was capable when it came to photo image quality (if you can call it that).

After N95, Nokia did not release any mobile phone worth of it's price. Anne update was a mess, most of the devices expected to have it as an update are still waiting for it, battery drain issues (probably processes running astray), etc. - I talk about this update because it also bring some extras to N8 camera (leaving E7, C7 and C6-01 in the cold - hardware could be the reason, though).

Belle is now arriving to the market, the interface useability looks like a copy of android in many points, but I'm okay with that. But thing is ... Symbian is dead, mostly because it got too bloated and fragmented to be maintained by a single company, the attempt to open the code with S^3 failed and now Nokia tries to make it pretty (Yay for marketing!) so it can sell devices while preparing the WP7 ones.

I wonder how Nokia will survive on the market with 250~300€ devices that are almost identical to 80~100€ android devices (except for the screen, Nokia has the upper-hand on that part - but in RAM is the other way around)

Well, I went ahead and ranted about it, back to the camera stuff, 5800 is plagued with something called JPEG compression... Noise reduction doesn't help obviously, and when it comes to ISO let's say that it's better to stick to 100 even though there is no exact control over it. And that's exactly the point, when a digital camera is bad, you can usually control the variables to make it a bit better, 5800 allows for 3 levels of ISO: low (up to 100), medium (up to 400) and high (up to 800). So far so good, since you can't control lens aperture (f/2.8 by the way), nor focal length (3.7mm or around 40mm in 35mm film terms) the only thing left to control exposure is the time, the exposure time is not tweak-able and that's quite a pain: you can set the camera to night mode and get the shutter to go to up 1/5s, but is not exactly accurate and it could be longer like 1s or so (assuming you could put the phone on a resting surface).

So, what else? Well, some guys noticed the JPEG artifacts and hacked the phone configurations to obtain the 'goodies', that was quite good indeed, but hacking is not for everyone and there is also the risk that you break something up.

I tried to override the camera exposure time by making an app for the phone, sadly Symbian is a nightmare to program, with bloated and confusing APIs, even installing the IDE is a challenge by itself (not to mention that I end up by having it crash all the time). So the only thing that would do was python for Symbian, it's a lot more direct to the stuff, but the APIs are limited, I noticed it has a camera API, so I gave it a try.

Sadly python only allows for the basic access to the camera, using the profiles (night, sports, etc) in camera setup. So ... what else? ... hmmm, did someone though of the same but had experience in programming stuff in low level for Symbian? Apparently yes, it's called CameraPro an application that does what's expected to do.

Here goes a few comparison crops so that you can have an idea, I disabled flash in all modes (click on the photo to see it at full size):

As you can see Auto mode is horrendous, it picks ISO 600 (592 to be exact with 1/17s exposure), giving a desaturated photo, filled with blurriness from the noise reduction acting up. There is also a noticeable green tint, specially on the right edge of the photo, probably some electromagnetic interference in the sensor from the phone internal wiring.

The second column, has a tweak from my side, I pick night mode, and ISO medium setting, It gave me an ISO 300 (ISO296, 1/6s), it's noticeable better, the green tint is lower, the detail is a lot better, but there is still some annoying 'mushiness' on the image.

On the third column, I tweaked it, further limiting the ISO setting to low, surprisingly, while I set night mode the camera gave me ISO97 and 1/17s exposure, since it looked dark with the first attempt (I can only check the EXIF on computer) I set the EV to +2, hoping that it got it right, but no, same result: an underexposed photo, not exactly bad it terms of detail, but shadow noise is noticeable, and if I had post processed it to correct the exposure I would have a noise filled photo.

The last column shows the result of CameraPro with the settings: ISO100, Exposure mode: Very Long, JPEG quality at 100, the resulting photo reports in EXIF: ISO 97, 0.52sec exposure (1/2s). It's not hard to see that quality wise, while not perfect, it's a great result when comparing with the other photos. Video seems to have so extra tweaks on it as well, but I haven't tested it.

Well... this just means that the device hardware manufacturer didn't do a good job with the software, requiring third party software to take the best of the hardware.

This reminds me of Canon cameras and CHDK... thing is ALL digital cameras adquire raw signal in the sensor, some sensor chipsets have the JPEG engine inside (usually tweak-able), but for most it is possible to acquire the RAW data, manufacturers choose to not implement RAW feature on compact cameras, when it would increase the camera value for the enthusiasts... Oh well... Let's wait for camera with 50MP 1/8" sensors and 50x Zoom lens and then complain that my 5800 takes better photos :/ (for the ones that don't get the hint, I'm exaggerating)

Wednesday, June 15, 2011

Playing with blender (UPDATE v2)

I've always looked at blender as a complex and hard to use tool, at least when compared with Art Of Illusion, however it is a very powerful and complete tool and since my trouble with using it is the lack of experience, I solve to give it a try and create a 3D model of one of my favorite cars, the VW Polo.

After 2 hours fighting with the keyboard shortcuts, cameras and lights, I managed to get a very nice model of the VW Polo overall shape done, I rendered it, and it looked quite nice... The metal of the car body was complete.

I saved and then quit, thinking in continue it later.

A few minutes later I though in render it and show it on the blog, so, I run blender, load recent file "VWPolo.blend", and.... only the first save was kept, so ... only the front of the car!
I tried the recover thing blend has... without success, I searched the entire hardrive for blender files ... nothing... It vanished.

This is what survived ... FML

I obviously give up of doing it on blender... or on anywhere else (this was actually the second attempt of doing the Polo, the first was on AoI... it crashed when I saved)... most likely my luck will strike again and delete it no mater what...


After struggling into understanding what happened, I found out that after the first save, blender asks for file overwrite when saving... the way it does is by showing a dropdown menu... if you move the mouse out of the dropdown menu it disapears and file is not saved D:

Well, as a bonus I did a low poly version of the 3d model I attempted earlier:
Around 1000 triangles and a 512x512 UV mapped texture

This is my first attempt with textures on blender... pretty easy... but a labyrinth of menus is what it takes to do it.

Texture itself was mostly a side view photo and brushes on GIMP, not exactly the most refined one, but it serves as a nice test.

Perhaps I try M3G export and start doing JSR 184 enabled apps ...


And I did...

Running on emulator

On my Nokia 5800 XpressMusic runs at 14~16 fps (if I run with fullscreen, without J2ME Commands, it will probably be less) .... hmmm ... maybe I should do some little game. Probably I won't...

Tuesday, March 8, 2011

Super Scribble (EDITED: 10/03/2011 v2)

You can download the latest package installer .sis file from here:
Downloads - super-scribble - Project Hosting on Google Code

If you have a Nokia with a touchscreen and a Symbian OS and ever tried Python I'm sure you know Scribble, a small sample application that shows Python touchscreen interaction by providing a simple doodling application.

One of the things you may have noticed it, it's the limited feature set, you have an eraser and a pencil, you also have a color picker from where you can pick a few colors, thankfully you can save the doodles or notes you make on it.

There are other applications for Symbian touch devices that deliver some similar features, some allow for zoom and a better color picker, but nothing else...

Here are some of the doodles I did on scribble's unmodified state:

As you may have noticed, they are only B&W pictures, this is because rarely any of the colors provided are truly useful.
I've used scribble for quite some time and this week I spent my time practicing Python and PyS60 API.

I messed up with pretty much everything on Scribble's source code, so I added a number of features to it, namely mix brush, smudge tool, opacity, RGB sliders to pick color and brush color history. All this while trying to maintain the performance and smoothness of the application.

With those changes I manage to do these doodles in little time:

Of course there is still room for improvement, like the ability to open and edit images (and by consequence the support for bigger images and removal of the white stripe on the bottom of the images)

You can download the application (sis and python source) from here (tested in Nokia 5800 XpressMusic, should work in N97, 5530, 5230, X6 or any other Symbian touch device that has PyS60 2.0.0 installed and working)

I'll perhaps post a video later explaining what each of the interface areas does... If you're going to try it, you should at least know that touching the red bordered rectangle on the will pick the rectangle fill color for the brush.

Have fun!

R.I.P. Nokia, if you didn't know Nokia it's now a Microsoft's partner and while Nokia isn't dead, Symbian S60 5th and S^3 will kinda meet a dead end, S40 will continue to survive in lower end devices where nokia still have a valuable market share.

EDIT (10/03/2011):
I improved it (currently version 0.6.x) but didn't released it yet - probably will release a video together with the new version (that will probably be version 0.7.x).

v0.6.0 features the following additions:
  • Support for any size of drawing (as long as the memory handles it)
  • Support for Zoom
  • Move tool (allows one to move the canvas by dragging it)
  • Color picker tool, picks a tool from canvas to use in brush

Stay tuned for updates :]