Publishers of technology books, eBooks, and videos for creative people

Home > Articles

This chapter is from the book

Color and Image Preprocessing

When working with finished content that has already been color corrected, most of the time you won’t need to make further adjustments. However, certain situations where adjustments are necessary do arise from time to time. For example, if you have a show that’s being encoded for broadcast and mobile, you might need to adjust the mobile version to match the look of the broadcast version since the two formats use different color spaces. Understanding what adjustments are available will allow you to evaluate your outputs and determine whether any adjustments are necessary.

Luma Adjustments

Image adjustment is the process of using controls, similar to those in image-editing applications, to change aspects such as brightness and contrast. Digital video is described in either RGB or in Y’CbCr (aka YUV) color space. A color space (or model) is a way of describing and specifying a color. RGB and the Y’CbCr color space formulas contain three variables, also known as components or channels. RGB’s variables are red, green, and blue, while Y’CbCr breaks down as follows: Y is luma (or black and white or lightness), and CbCr is chroma or color (Cb is blue minus luma, and Cr is red minus luma).

This representation addresses the human eye’s predisposition to green-light sensitivity, which is why most of the information about the proportion of green is in the luma (Y), and only the deviations for the red and blue portions need to be represented. The Y values have twice the resolution of the other two values, Cb and Cr, in most practical applications, such as on DVDs.

Because different color spaces are used by different codecs and video playback devices, image adjustment may be required as part of preprocessing.

Luma Range Expansion

The RGB color space breaks the steps from black to white into 256 even steps (0 to 255, with 0 being black and 255 being white). Standard TV has only 220 steps from black to white, using black as 16 and white as 235 within the same scale (Figure 4.5 on the next page). Generally, modern postproduction applications automatically keep black and white consistent. However, if blacks and whites appear either crushed (too black) or faded (too white), the luma range may need to be remapped.

Figure 4.5

Figure 4.5 Television and computer-based video use different luma ranges to depict the range between black and white. When this is not compensated for in preprocessing, the distortion of the luma range can leave video either washed out or too dark.

Gamma Adjustments

Gamma is a measurement of how the luma range turns into brightness when it is displayed. Although black and white will look the same under different gamma values, the middle of the range will look different. Gamma correction is a complex mathematical concept that works to best encode images according to how human image perception works. Different computer platforms and TVs all have different default gammas, with the majority of gamma values falling between 2.2 and 2.4. Before OS X 10.6 Snow Leopard, Apple used a default gamma value of 1.8. CRT television sets used a gamma of 2.2, and Windows systems used gamma values ranging from 2.2 to 2.5. Modern LCD televisions use a gamma value of 2.4. If the value used to encode the video is not the same as the display/output gamma value, the image will appear either slightly darker, which will lose detail in the shadows, or slightly brighter, which will make colors appear washed out and “milky.”

If you are encoding for a mixed environment or are unsure of what playback device the end user has, it’s best to target an encode value of 2.2.

Brightness and Contrast

Brightness filters adjust the overall intensity of each pixel in a frame by a fixed amount. Contrast settings, on the other hand, increase or decrease each pixel’s value by an amount proportional to how far away from the middle value it is (the farther away, the bigger the change). These values are often used together, rather than separately, because just brightening an image without adjusting the contrast can leave the black levels too muddy gray, rather than the desired black.

Chroma Adjustments

Chroma adjustments affect the color (chrominance) of a video image, similar to the way luma affects the brightness. Changes to the color of the video aren’t commonly required. In fact, some compression tools do not even include these filters.

Saturation

Saturation controls the intensity of a color. Increasing saturation will brighten a color artificially, while decreasing it (or desaturating) will remove the color, all without affecting the luminosity of the image (turning it to black and white).

Hue

Hue is the way of describing a color (for example, red or blue). The hue adjustment in compression tools shifts the color spectrum of the image. It is used to do simple color correction, most often when white levels or flesh tones do not appear correctly. This is a pretty coarse adjustment and should be used with care or not at all.

Noise Reduction

Noisy video is a big headache for video compressionists. Random noise causes pixels to change rapidly and constantly, making it difficult for the codec to encode the clip correctly.

Noise reduction encompasses a variety of techniques to remove that noise from an image, making it easier to compress. Simple noise reduction algorithms are just blurs that hide grain but make the image softer, such as when a median filter is applied (Figure 4.7). More advanced algorithms try to blur only the parts of the image that have grain and may take advantage of differences among frames.

Figure 4.7

Figure 4.7 Here are two versions of a DV-NTSC clip. On the right it has had a median filter applied. Note the increased softness in the image on the left but the smoother quality of the image also.

Noise reduction is not always required. If you have a clean video source to work with, simply skip the noise reduction step when preprocessing your work. If you do have damaged footage, it may take several experiments to find the right balance of cleaning up the source without degrading the finished video image.

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.