Mike Chaney's Tech Corner
October 07, 2024, 02:07:38 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Qimage registration expired? New lifetime licenses are only $59.99!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: April 2005: Can't take Just One Byte? 48 bit Images  (Read 11891 times)
admin
Administrator
Forum Superhero
*****
Posts: 4202



Email
« on: May 27, 2009, 03:41:42 AM »

Can't take just one byte? 48 bit images.


Background

In this month's article, we dabble in the world of 16 bit per channel (48 bit) images. Your camera or scanner might support these higher bit depth images but what are they? What do they do? When do you use them? And most important, are they worth it being that they are double the size of a normal 24 bit image?


Bits, nibbles, bytes, and words

Most people are aware that anything digital (computers, cameras, scanners) operate using lots of ones and zeros where 1=on and 0=off. The most basic unit of measure in a computer is known as the bit: a bit can only be on or off.

Next in the line of common measures is the nibble. A nibble contains 4 bits, each of which can be turned on or off independently and it turns out that there are 16 different combinations you can get by turning 4 bits on/off in different patterns, allowing us to count from 0 to 15 with 4 bits.

The most well known measure is the byte. A byte contains 8 bits and allows you to count from 0 to 255 because there are 256 different ways you can arrange 8 bits by turning each one on/off individually. Most images that you see on the web such as JPEG images are stored by assigning RGB values to each pixel (dot) in the image (brightness/intensity values for red, green, and blue) and most images use 8 bits for each color channel. 8 bits for red, 8 bits for green, and 8 bits for blue give you 24 bits and allow you values of 0-255 for each primary color. Starting with 0,0,0 (black) and moving through all possible combinations up to 255,255,255 (white) gives us 16,777,216 possible colors in a 24 bit image.

A little less known measure is the word. A word contains 16 bits and allows you to count from 0 to 65535. While a byte only allows values ranging from 0 to 255, two bytes together that form 16 bits allow you to have much greater precision. Allowing values from 0 to 65535 for each of the red, green, and blue primary colors for each pixel means that you can address a total of over 281 trillion colors! A 48 bit image still covers the exact same color range as a 24 bit image: 0,0,0 black to 65535,65535,65535 white and everything in between. The difference is that you can define the range with many more steps to make much finer gradients. It is similar to having a ruler that only has measurements down to 1/8 inch and then putting marks down to 1/32 inch for finer measurement. You haven't changed the fact that an inch is an inch, but you can better define your position within that inch with finer gradations.


281 trillion colors? Do we really need that?

It has been argued that the human eye can discern about 10 million different colors, so is 281 trillion really necessary? The notion sounds ludicrous until you consider the variety of conditions that we try to "sample" with our images and how we sometimes post process them before they are ready for display. Your monitor and printer are 8 bit per channel (24 bit) devices that can "only" display 16.8 million colors so 24 bit images is all they understand or need. Your camera or scanner however, may not have captured the image in a ready-to-display condition so manipulation can actually reduce that 16.8 million color range significantly. Let's take a look at why.

Consider an example where your most well composed wedding photo was underexposed due to improper metering. Instead of capturing brightness values from 0-255 for each primary color, your camera may have only used the lower half of that range (0-128). For those familiar with histograms, this histogram would appear weighted to the left with nothing in the highlights and the image itself would look very dark. Of course, you'll try to fix this by increasing the exposure (brightness) of the image so that 0-128 gets "stretched" to (let's say) 0-255 and now there are things in the photo from true black to true white. The problem in stretching 0-128 to 0-255 to brighten the image is that you are now using only half the available values in the 0-255 range: 0,2,4,6,8,10, etc. You have effectively taken yourself from a system that can display 16.8 million colors down to one that tries to cover the same color range with only about 2 million steps, and you have probably also increased noise (grain) in the process! At 2 million colors, you risk being able to see the steps between each color in some smooth areas like blue skies and other gradients and the result may look like banding or posterization in the image. Similar effects can occur even in a properly exposed image if you have to make significant changes in color such as might be needed to correct improper white balance, a "blown out" red sweater, or other color issues.


48 bit images from your camera/scanner

The biggest benefit of capturing raw images with your camera or scanner, that is, images with a high bit depth such as 48 bits, is that they allow for more latitude when making corrections. In the above example of underexposure, a 48 bit image would be reduced from 0-65535 values down to 0-32767. Even if you "rescale" that range to brighten up the image, you still have plenty of steps in the scale to create a properly exposed final 24 bit image to feed your monitor/printer without risking banding because the 24 bit image only needs 256 steps for each color and you still have 32768 to work with. Keep in mind that when a 48 bit image is converted to 24 bits, the range 0-65535 is simply scaled down to 0-255.

Scanners have their own light source so they are typically not prone to the same environmental factors that cause things like under/over exposure in cameras, so the 48 bit scanning modes are a bit less useful than raw capture mode on cameras. Basically the closer you can guarantee that your image will be to the proper exposure and color, the less need there will be for higher bit depth images like 48 bit TIFFs. There are some exceptions such as using super wide color spaces, but that's beyond the scope of this article and is usually not an issue for the vast majority of work. For scanners, I typically never use the 48 bit capture mode just because the conditions rarely warrant it, the "scene" is usually very reproducible, and scanner sensor noise levels often exceed the threshold that would give any real benefit with 48 bit images anyway.

Cameras are another story. I tend to always try to shoot in raw mode and process with a professional level raw conversion tool because photographs capture moments in time that are usually impossible to recreate. Set your camera to JPEG mode and underexpose that one important shot and you stand a good chance of not being able to salvage it. If you are shooting in raw capture mode, the extra precision offered by the higher bit depths captured in raw files often allows you enough leeway to get acceptable shots of even the worst cases of underexposure and (to a lesser extent) overexposure.


Real world advice on 48 bit images

To be honest, if your scanner typically returns scans that need very little manipulation and are generally properly exposed right out of the box, I see no need to use 48 bit capture mode on a scanner for most work.

If your camera, however, supports a raw capture mode and you are willing and have the time to do the post processing work to develop those "digital negatives", it can really save you from time to time and can often lead to better image quality just because you are allowing a more powerful computer process the raw data rather than letting the camera do it before it makes a JPEG for you. Even if you never make any mistakes, raw images often show greater resolution and sharpness and higher color accuracy than the camera can deliver in JPEG mode.

Once you have your 48 bit images in hand, make whatever exposure or color corrections you need and feel free to save the final version as a normal 24 bit TIFF or even JPEG when you feel it is ready for display/print. Remember that nothing is lost in having the final/edited version saved as a 24 bit file to make it available to other software such as photo editors, printing software, and email programs: it saves space and your monitor/printer will want a 24 bit image anyway as they don't understand 48 bit data.

Mike Chaney

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Security updates 2022 by ddisoftware, Inc.