Home | Galleries | Articles | Reviews | Best Gear | Science | New | About | Contact |
by Roger N. Clark
Maximizing image contrast means using the full range of image data, including the bottom end (zeros) and the maximum (255 in 8-bit data, 65535 in 16-bit data) Having zeros in your image data is not a sin, contrary to some internet trolls.
The Night Photography Series:
When I posted the image in Figure 1, a member of the internet clipping police started launching an attack. He complained that the data were clipped and that was bad. See the blue and cyan lines on the left side of the histogram. But zeros are valid image data. The problem here is the internet clipping troll looked at the histogram and just because of a number of zero values and declared that is bad. But is it? One needs to understand the context of the data values to know if any important image information has been lost.
To understand the significance of this image, the orange dust is extremely faint, amounting to detection of just a few photons. The faintest parts of the image received on average a little less than 1 photon per pixel per 61-second integration. The brightest parts of the image received over 2200 photons per pixel per exposure. Combined with the short exposures, the image represents a dynamic range of over 14 stops. That range needs to be compressed so that the intensity range can be seen. In my processing, I work with 16-bit data in Adobe RGB color space. (Note, Photoshop has 15-bits/channel.) For web presentation, the data need to be converted to 8-bit sRGB color space. Certainly something is lost in that compression. The article will show some of that loss.
OK, so there are some zeros in the web jpeg file. Is that bad? Let's first look at the full image: the full frame (Figure 1 is a crop), and the 16-bit data. Because it is hard to show 16-bit in an 8-bit web image, I stretched the 16-bit Adobe RGB tif file and show the result with the histogram in Figure 2.
The internet clipping troll complained most about the blue channel, so the blue channel is shown in Figure 3, stretched again to show the faint end. Both the 8-bit and 16-bit (before converting for the web) are shown. The results show that the 16-bit data have much less noise, but both images have nice smoothly varying low end. There are not any large contiguous areas that are clipped to zero. So what is "clipped?"
So is there a clipping problem, and if so how bad is it? To understand the data, one needs to look at some intensity traverses. Figures 4 and 5 show two intensity traverses. Figure 4 also shows an indicator of how extremely faint this image records: note the bar that indicates the intensity range of one photon (note that only applies to the low end, it is a non-linear intensity scale).
It should be clear by now that the few low pixels represent the extreme random noise fluctuations, and not some endemic problem with the image processing as charged by the clipping trolls. One of course could raise the level a little so that even these outliers do not get close to the zero level, but that reduces contrast in the faintest parts of the image.
What does serious clipping look like? The image in Figure 6 shows an example, and a traverse is shown in Figure 7. The traverse shows a lot of the data falls below zero. That is extreme clipping.
The result of the 16 bit Adobe RGB to 8-bit sRGB image does increase noise, and clips more data. But in the examples here, only the extremes of the noise distribution get clipped, and those pixels that get clipped are randomly distributed, minimizing their perceptual impact. This is fine in my opinion and of no detrimental consequence to the preceptual image quality.
Image data that appear to be clipped or close to clipping is all a matter of context. As S/N drops, in low signal regions, the extremes of the noise envelope might get clipped. This is of no consequence to the visual perception of the image. If one keeps the majority of the noise envelope, including mean of the noise distribution above zero, the image can show good contrast at the low end.
What should be avoided is clipping of large areas of an image as a uniform block. Sometimes even this might be necessary if you need to hide some bad pattern noise that is common in early digital cameras. No data can at lease look better than bad data.
If you produce images with this attention to detail, ignore the Clipping Trolls. Maximizing contrast at the very faintest parts of an image can provide for good contrast at those low intensities enabling them to be seen better. The side effect of some random pixels getting clipped is of no real perceptual consequence.
Few cameras can produce this quality of data at the few photon level. The Canon 7D Mark II 20-megapixel digital camera is the only Canon camera as of this writing that I have tested that can perform at this level in long exposures. The key to such performance is on-sensor dark current suppression, low read noise and low dark current (even though the magnitude of dark current is suppressed, the noise from the dark current is not). The images here show uniformity in the background to the electron level, an amazing feat for a camera working at ambient temperature. See the Full Review of the Canon 7D Mark II for details.
Nikon Notes. Many Nikon cameras clip the raw data. At some ISOs on some Nikon cameras, well over half the pixels can be clipped. Yet we don't hear Nikon users complaining about clipped detail in the shadows of their images. Indeed, because of the nature of the clipping, producing a random clipping pattern, the clipping impact on image quality is minimal, and Nikon images have a good reputation for producing high dynamic range images with great shadow detail.
Clipping is bad for stacking astrophotos to reduce noise. Avoid any processing before stacking that clips any data. Does this mean Nikons are not good for astrophotography? Not at all. Simply expose an astrophoto long enough to bring the sky fog to a level significantly above the read noise (true with any brand camera), and no data will get clipped.
References and Further Reading
Clarkvision.com Astrophoto Gallery.
Clarkvision.com Nightscapes Gallery.
The Night Photography Series:
Home | Galleries | Articles | Reviews | Best Gear | Science | New | About | Contact |
http://www.clarkvision.com/articles/imageprocessing-zeros-are-valid-image-data
First Published April 25, 2015
Last updated April 25, 2015