12bit vs 14bit RAW and compressed vs uncompressed… Does it matter?
You know that to get the most of your DSLR you should be shooting in RAW, right? But these days Nikon cameras gives you even more options: 12-bit or 14-bit, and compressed or uncompressed RAW (NEF) files. Which should you choose?
Short question: Does it matter? Will you see any difference between compressed (lossy) and uncompressed (lossless) RAW? And between 12 and 14 bits?
Short answer: No it does not matter. Choose 12-bit compressed (because they take up less space) and forget about this topic. Or choose 14-bit uncompressed because theoretically you’re getting the “most” from your camera – you just have to live with the file sizes.
| Approximate RAW file
size on a Nikon D7000
|12 bit||14 bit|
|compressed||12.6 MB||15.7 MB|
|uncompressed||14.9 MB||18.8 MB|
Not happy with the short answer? Then read on…
Basic computer science tells you that 14 bits store more data than 12 bits. To be exact: you can store 4 times as many shades of intensity in a given range, or if using the same step size you can cover a range of values 4 times as large.
Basic computer science also tells you that lossy encoding throws data away. So then it seems logical that images obtained from 14-bit lossless RAW files should have a larger dynamic range and be more detailed and nuanced than images from 12-bit lossy RAW files. The big question is whether these theoretical advantages are ever visible in real life.
This topic can get extremely complex. The best and most rigorous explanation I found online is in this article from by Emil Martinec: Noise, Dynamic Range and Bit Depth in Digital SLRs.
Conclusion: due to sensor noise you cannot see the difference between 12 and 14 bits, and neither will you see the difference between lossy and lossless RAW encoding.
This is also touched on by dpreview where they wrote “…it is easy to understand that [higher bit depth is advantageous] only IF the sensor itself has sufficient dynamic range.”
People have posted some experiments concerning this (for example see the D300 12-bit vs 14-bit comparison) but shooting a test chart in the dark is not totally convincing.
Curious as I am, I decided to see if I can experimentally find any difference in the recovery of over- or under-exposed “real-world” photographs. If maybe there is some advantage to be had from those extra bits in these extreme tests of dynamic range. After all – none of us know exactly how Nikon’s engineers implemented this. Since the Nikon D7000 has a good dymanic range it is as likely as any APS-C DSLR to show the advantages (if any) of higher bit depth.
For this I chose the following test scene:
I then overexposed the scene by a massive 4 stops:
And then I underexposed the scene by an even larger amount, 6 stops. I went 2 stops further in the underexposure since digital cameras are better at retaining shadows than highlights:
You ‘re welcome to download and experiment with the original .NEF raw files yourselves. (link to zip file, 101MB)
The next job was correcting for the over-and-underexposure in Adobe Lightroom 3.4, and comparing results between 12-bit, 14-bit, lossy and lossless encoding.
First, the overexposed examples. You’ll especially notice big white washed-out regions caused by channel clipping. It is interesting to see whether extra bit depth helps to lessen this effect. Also look for differences in detail caused by RAW file compression.
And the same sequence for the underexposed region. Instead of washed-out regions caused by colour channel clipping we now see a lot of noise, since correcting the underexposure requires massive amplification of a region with very low signal.
My conclusion is that even in this extreme example there is very little difference between either 12-bit and 14-bit or between uncompressed or compressed results.
If one had to seek differences I would say that the colour reproduction is less degraded in the uncompressed and for the 14-bit RAW images. It seems like the 2-bit difference between 12 and 14 bit is mostly applied to shadow detail and especially colour information in the shadow regions. But given how extreme my test example was and how subtle the effect, I would also call it a negligible difference.
Furthermore there seems to be effectively no difference in detail captured in any of these modes.
So I again conclude that THERE IS LITTLE OR NO PRACTICAL ADVANTAGE TO USING EITHER 14-BIT OR LOSSLESS RAW COMPRESSION.