In Bit Depth Part1 we defined what is meant by “bit depth” and saw how image quality improves as we progress from 1-bit to 8-bit images.
In Part 2, we defined the various bit depth selections you will see on Fastec and other cameras and focused on the relationship between bit selection and dynamic range.
In this section we will concentrate the practical how-to of optimizing 10- and 12-bit recordings.
First, however, we will look at the pros and cons of recording more than 8 bits per pixel.
- Improved image quality for processed images: when gains are applied to any image the number of possible gray levels or colors is diminished. Recording more bits helps to maintain higher numbers of unique gray levels or colors. This will allow you to bring out more detail in complex images.
- Greater latitude when capturing video with with challenging illumination. Adding more bits does not increase dynamic range, but it does give added flexibility in enhancing portions of the available dynamic range.
These address two different photographic concerns. In the first case you may be trying to get the most beautiful and compelling images and are using the extra bits to coax out fine detail, while in the second case, you are battling illumination issues and are giving yourself the best shot at producing consistently usable images.
- Shorter record times: 10-bit images give you about 1/4 less record time than 8-bit, while 12 bit images give you about >1/3 less record time.
- Recording greater bit depth requires higher bandwidth, which may limit frame rates on some cameras operating in certain recording modes.
Here a 10-bit gradient image. It is 1024 pixels wide, so the original values were 0-1023, on your display the values are 0-255:
Here is a plot profile (pixel values across a horizontal sample) for this image, showing the smooth progression from black (pixel value 0) on the left to white (pixel value 1023) on the right.
Here is an 8-bit version of the same image:
We are only seeing 256 shades of gray for both images on the display, so they appear identical.
The plot profile appears slightly rougher. The Gray Value scale is 0-255 (8 bit values).
From this we can see that there has been no advantage at all to saving more than 8 bits–all the images are looking the same!
Now let’s see what happens when we add gain.
Here we have taken the leftmost 1/4 of the original 10 bit image and applied a gain of 4, giving us the same gradient as before across fewer pixels. (The image is enlarged 4x so it is easier to see.) We still have 256 shades of gray, or 8 bits:
The plot profile for this 10-bit image remains pretty smooth:
Here is the same leftmost portion of the 8-bit gradient image, again with 4x gain. The math here is very simple: for each 2x gain on a given image, the bit-depth is lowered one bit. 4x gain on an 8-bit image yields a 6-bit image. 4x gain on a 10-bit image yields an 8-bit image. Now we only have 64 shades of gray, or 6 bits:
You can see banding in the image now and a stairstep pattern in the plot profile:
Missing values in regions of interest may translate into missing detail as seen in the dog video. It may also yield inaccurate results for some applications.
The arithmetic is simple and intuitive: you lose 1 bit of resolution for every 2x gain, and thus, the possible # of pixel values is cut in half.
If you use a curved gain such as gamma correction, or a custom curve, any portion with a slope (gain) >1 will see a similar loss of pixel values.
Here is a graph of a Gamma Curve (value 2.0). The portion with a slope of less than one, above where the 45-degree scale touches the curve (the midpoint on the output side), will see no loss of pixel values:
On this graph the ruler is at a 63-degree angle, which would yield a slope of ~2, for 2x gain. Pixel value loss will be >1 bit below and <1 bit above where the scale touches the curve.
Here the ruler is at an 76-degree angle, yielding a slope of 4, for 4x gain. Pixel value loss will be >2 bits below and <2 bits above.
Fastec IL, TS, and HS cameras all have an image processor implemented in hardware on the camera. This is realized in the form of brightness, contrast, and gamma settings as well as the “Curves” function in FasMotion, creating a lookup table (LUT) that is used whenever JPEG, BMP, TIFF, AVI, or MP4 files are transferred from the camera.
Only 8-bit image data may be stored in these file types. (8-bits per pixel in mono; 8-bits per color per pixel in color.)
The diagram below shows how 12-bit image data from the sensor is handled by the Fastec cameras:
- All 12 bits are saved to Image Memory
- All 12 bits are sent through the primary stage of the Image Processor for FPN / PRNU correction (if selected by the user)
- All 12 bits of corrected image data may be saved to CAP files, Long Record captures, FFLR (CAP stacks), DNG stacks, or TIFF(raw) Stacks
- The 10 high bits (no bit shifting available here) are sent to the 10:8 LUT where Brightness, Contrast, Gamma, Curves, and Color Gains may be applied
- 8 bits from the LUT may be saved as AVI, MP4, TIFF stacks, BMP stacks, or JPEG Stacks
This diagram shows how 10-bit data flows from a 12-bit sensor. Notice that the bottom two bits are not used in this example. We have used the high bits here, but the user would be able to select high, middle, or low 10 bits for the initial capture to image data. If the camera has only 10 bits, then all would be saved in this example.
The final diagram shows 8 high bits saved from a 12-bit sensor. The user would be able to do any bit-shifting (selecting low or middle bits) from the sensor to memory only when capturing images.
Note that the LUT has changed to 8:8, this means that any gains added will result in fewer available pixel values.
Some simple rules:
- It is not necessary to capture more than 8 bits if no gains are going to be added via the camera’s image processor or some other application in post-process.
- It is not necessary to capture more than 10 bits if the only image processing to be applied is on the camera.
- It is never necessary to capture 12 bits if AVI, MP4, TIFF (not raw), BMP, or JPEG files are being saved from the camera.
- It is only recommended to capture 12 bits if image processing is to be applied outside of the camera or FasMotion. (RDI software DOES utilize all 12 bits)