Wednesday, February 4, 2009

Resizing Affects Color?

Resizing YUV type video might cause undesired color artifacts. These artifacts manifest as color blotches and sometimes color banding in areas of the image that has very smooth color or gradients.

4:2:2, 4:2:0, 4:0:0, etc. often refers to a YCbCr or YUV (Y’UV) image where Y is the Luma (intensity or detail) and UV are the chrominance components (color.) You can think of these three components as three planes Y, U and V that when super imposed create a color image. More on the subject here: http://en.wikipedia.org/wiki/YUV.

In the case of 4:2:2 images, the horizontal size of the chrominance planes is reduced by half, usually by discarding every other pixel. 4:0:0 images have both horizontal and vertical their UV planes' size reduced by half. When recreating the original image, the UV planes are enlarged to their original size by using simple linear interpolation methods. This process in itself causes artifacts that are compounded when the video is resized (see previous articles on resizing algorithms.) These errors in the UV planes are more obvious in smooth color or slow gradients.

Whenever possible, it is better to resize your images in the RGB or 4:4:4 space and then convert to a compressed YUV type format to minimize artifacts. Try to follow this rule especially with computer animation or other computer generated images.

No comments: