An investigation into the dynamic range of several selected digital SLR cameras including the Nikon D100, Nikon D2x and Canon D20.
Introduction
Many digital camera sensors have a depth of 12 bits per colour. The bit depth defines the dynamic range of the camera. However, it is difficult to find any recommendation by any of the camera manufacturers that we should be using all 12 bits by working with 16 bit rather than 8 bit files. In addition, many of the features of image processing software (such as Photoshop) do not support the 16 bit mode as they may only be used in 8 bit mode. Potentially, the result of using the 8 bit mode, which causes 4 bits of information to be thrown away, is that the dynamic range of the camera is reduced and information is lost.
To overcome this problem, many photographers process their work in 12 bit Raw format, converting to 16 bit tif when the final result is to be printed. This method of working is detrimental to workflow as it precludes the use of many of Photoshop's most useful features.
As support for the 16 bit mode by the manufacturers is half hearted to say the least, there is a suspicion that the 4 bits, that are lost when working in 8 bit mode, do not contain any coherent data; they contain only noise. It is also possible that the 4 bits are partially swamped by noise i.e. the higher order bits of the four contain coherent data whilst the lower order bits contain noise.
Method
The following method was used to investigate whether the 4 'lost' bits contain any coherent data. The method involves placing a marker in the image. This provides an easier method of locating the corresponding data addresses in the 8 bit and 16 bit versions of the files, than by hand calculating the data addresses.
As the 4 bits of interest are most likely to contain coherent data at the camera's lowest sensitivity, the sensitivity was initially set to ISO 100. The effects of raising the sensitivity to ISO 400, ISO 800 and ISO 3200 was tried in later tests.
1. An extremely out of focus image was taken and saved as a Raw file. A badly focused image was used to avoid the possibility of any texture in the subject interfering with the results. All camera parameters, including noise reduction, were turned off. Sensitivity was set to the camera's minimum of ISO 100.
2 The Raw file was saved as a 16 bit tif using Nikon Capture.
3. A small random section (about 5%) of the image was selected using Photoshop's Rectangle Marquee Tool. The image was cropped thus producing an image of manageable size.
4. A section of the cropped image was filled, using Photoshop's Colour Picker and fill tool, with a distinctive bit pattern (R=hexAA, G=hexAA and B=hexAA) to act as a marker.
5. The image was saved in 16 bit and 8 bit modes to separate files.
7. HexEdit (an excellent freeware editor) was used to view the binary contents of the two files. The data immediately after the marker section of hexAA entries was located and compared.
Results and Conclusions
The table below provides a small representative sample of results from an image taken using a Nikon D2X at ISO 100. All values are given in hexadecimal. Row 1 indicates the RGB colour channel. Row 2 contains data obtained from the tif file saved in 8 bit mode. Row 3 contains corresponding data to that in row 2, obtained from the tif file saved in 16 bit mode. Row 4 contains the low order bytes of the 16 bit data.
Colour Channel (red, green, blue)
R1 G1 B1 R2 G2 B2 R3 G3 B3 R48 bit
B8 BE 90 B8 BF 90 B9 C0 8F B916 bit, ms byte
B8 BE 91 B9 BF 90 B9 C0 90 B916 bit, ls byte
DD C1 B9 2B 81 B9 A1 0F 0B 15The results for the low order bytes in the fourth row of the table indicate that there is no correlation for each colour channel, in either values or bit patterns. Taking the red channel results, for example, R1 = DD, R2 = 2B, R3 = A1 and R4 =15. This would appear to be random data that affects all of the four bits. Similar results have been obtained from all the other locations that have been analysed.
Comparing the second and third rows, it can be seen that there is a very close correlation as the difference between the data values never exceeds unity. This difference in some of the values indicates that noise is affecting the least significant bit of the higher order byte.
Further results have been obtained for the D2X at ISOs of 400, 800 and 3200. They show the higher order byte of the 16 bit word format becoming progressively swamped by noise as the ISO is increased.
Similar results have been obtained for the Nikon D100.
Implication
The implication of these findings is that, for the Nikon D2X and D100, working with the 16 bit mode or the Raw format to maximize dynamic range is ineffective as no coherent data is lost when using the 8 bit mode.