martes, 27 de agosto de 2013

Nokia 808: the 'Superfine' question

To test this, I took a photo of an innocuous static subject with the Nokia 808 PureView in Creative 5MP mode, with the only difference being that one shot was in 'Normal' JPG quality and the other in 'Superfine':

Test shot, Peppa Pig!

Now, forgive me for an utterly drastic 'crop and compare', but unless we look right down at the pixel level in the photos then we're not going to see any differences whatsoever. Here then is Peppa's 'eye' cropped in extremely close, blown up about 4:1. On the top is the crop from the 'normal' JPG and on the bottom is the crop from the 'Superfine' JPG:

Comparison

Now, you could be forgiven for deciding that the two crops/photos are essentially identical. However, look very closely and you can start to see that the bottom image is very, very slightly more detailed. The effect, for this type of subject with lots of real world 'texture', isn't worth worrying about, but it is there, as I'll prove in an easier-to-understand example, below.

All About JPEG compression(!)

But first, a little explanation of what's going on here. After capturing an image (full of pixels, typically 5MP or 8MP), a camera has to somehow save it in a common format to disk, from where it can be shared around the world. The JPG standard is by far the most common, for photos, and is supremely efficient at representing detail in a photo in a compressed fashion.

So, where an uncompressed 'raw' image, i.e. perfectly represented, might take up to a few hundred Megabytes, this isn't practical to save and share - not even close to being practical. Using the JPEG compression algorithms, essentially dividing an image up into smaller blocks and then using fractal data that most closely represents the pseudo-random patterns of colour and light in each block, means that your 5MP photo can come down to, in the case of a Nokia 808 PureView in default 'Normal' mode, around 1MB when stored on disk. Now, JPEG compression is, by definition, 'lossy' and what's stored isn't exactly what the original captured image looked like on the sensor, but it's so close that the eye can't tell the difference. It's a bit like (though less drastic than) MP3 files used to represent music - there's massive compression usually going on, but the human ear is unable to tell much difference.

However - think about this - who decides by how much to compress the original image? After all, you could use JPEG's system, increasing the size of the grid squares that get (fractally) represented, to compress a 5MP image down to 200KB and it would still be very recognisable - but it wouldn't be quite as good - crop in to 1:1 and the human eye would be able to start to spot 'artefacts', digital noise and irregularities that obviously weren't there in the original scene. Take the same 5MP image down to 50KB, increasing the JPG encoding block size again, and again the photo looks OK at first glance - but is a right mess if you crop in or look closely.

At the other extreme, if the degree of compression was much reduced, with our 5MP image being, say, 20MB on disk, it would - technically - be more 'perfect', but you'd have to study almost every individual pixel in the displayed image in order to see any differences from compression rates we're used to. 

Clearly there's a law of diminishing returns at work here, plus an optimum range to work in. Enough compression that the file size is kept small but not so much that the image is visibly degraded when cropping in or displaying in large form. Which is exactly where Nokia (and other digital camera makers) set their defaults. In the case of the Nokia 808, you get two settings for 'JPG Quality': 'Normal' and 'Superfine', though the exact compression rates aren't quantified (they're roughly 85% and 95%, I believe?)

Demonstrating Superfine

Returning us to the main question: is it worth turning on 'Superfine'? In the toy example above, clearly not, since its almost impossible to tell the difference, at a cost of a JPG that's two or three times the size. But let's push the 808's camera a little, and give it a low light subject with demonstrable and easily recognisable detail, i.e. text. Here's the full scene, focussing on the buttons on the electricity monitor:


The 808's auto-exposure has made this look light enough, but in reality it was indoors at dusk and light levels were very low. Let's crop in and magnify again, 'normal' on top and 'superfine' on the bottom:

Comparison 2

Now we're getting somewhere. Note that the pixel size is identical in both photos, they're each 5MP, of course. What's different is the JPG encoding, i.e. the amount of detail being modelled in the pseudo-random JPG patterns. 

Look at the letter "E" at the end of "MODE", for example. In the 'Normal' encoded photo, the pixel patterns are approximated in typical 'good enough for most subjects' JPG fashion, but the vertical stroke of the letter is almost fudged out, while the gaps between the letters are non-existent. In contrast, with 'Superfine' encoding, the letters are more separated and are more 'finely' defined, with every stroke and line better represented by the smaller JPG pattern blocks.

The take away

However clear the above example was (or wasn't!), I'd proffer these two conclusions:

  • Nokia chose well with the default JPG quality in the 808's Camera application. Its photos show almost all the detail from the captured image, yet with a file size that's usually under a Megabyte and dramatically smaller than 5MP photos from any other camera phone on the market. One side note is that the purity of the 808's oversampled shots mean that there's very little digital noise allowed through from the sensor, which means that the JPG algorithms don't have to waste pattern activity trying to represent noise as well as actual detail.
     
  • The 'Superfine' setting does give extra detail and clarity, but the difference is so small that you'll only notice it if you go to extreme lengths to do so, as I did above. Perhaps for shots of signs with text, or other subjects with lots of straight lines, there's a case for switching on 'Superfine', but for 99% of real world shots, stick with 'Normal' JPEG quality. It's simply not worth tripling the file sizes just to improve a handful of the millions of pixels in the photo.

You might ask, of course, why it's important to keep the file size down, given modern advances in storage capacity and bandwidth? Which is fair enough, but when you have 20 photos to upload or backup over a 3G connection, the difference between 20MB and 60MB is suddenly measured in minutes, which might start to inconvenience you. Not to mention heading towards a cellular bandwidth cap three times more quickly. Plus there's the obvious statistic - with file sizes three times lower, you can take three times as many photos within the same card/memory capacity.

No hay comentarios:

Publicar un comentario