官术网_书友最值得收藏!

An introduction to color image processing

Before we begin examining the differences of color image processing to grayscale image processing techniques, we must first understand the difference between color and grayscale images. As explained in previous chapters, a grayscale image can be represented as a two-dimensional, m-by-n matrix (m rows and n columns). Its elements, called pixels, have values spreading from 0 to 255 (in the case of 8-bit images). A value of zero represents black, a value of 255 represents white, while all the values in between represent different shades of gray.

In the case of color images, the matrices become three-dimensional. The first two dimensions, as in the case of grayscale images, are the number of rows and the number of columns (m-by-n). The difference is that the third dimension typically comprises three layers, representing colors. That is, color images are three-dimensional (usually m-by-n-by-3) matrices and can be thought of as three grayscale images combined together. Each image typically represents one of the colors (that is, Red, Green, and Blue) of the image, which is therefore characterized as RGB. These three layers are also called color channels of the color space (RGB in our case).

Similarly to the grayscale image case, when we have a case of color images of 8-bits per channel, a zero value in one channel represents non-presence of the color, while a 255 value suggests full color presence. The three color channels are mixed together to produce the final color for each pixel in the image. A pure fundamental color occurs when one of the three color channels has the maximum value and the two others are equal to zero. This means that a pixel with {R, G, B} values equal to {255, 0, 0} will be pure red. Similarly, a pixel with values {0, 255, 0} will be pure green and a pixel with values {0, 0, 255} will be pure blue. Different mixtures of values in the three basic color channels will ultimately produce different colors.

Note

A more extensive description of the basic concepts of RGB color images can be found in Chapter 2, Introduction, of the manual of the Image Processing Toolbox. It can be found freely available in pdf format on the website of Mathworks, at http://www.mathworks.com/help/pdf_doc/images/images_tb.pdf.

What you may have deduced from the previous description of color images, is the fact that in order to apply the methods covered in previous chapters for color image processing, we will have to repeat the same process three times (one for each color channel). This is typically correct, as we will see in the rest of this chapter. Let's start with the basic image manipulations covered in Chapter 1, Basic Image Manipulations.

主站蜘蛛池模板: 翁牛特旗| 宜章县| 定南县| 信宜市| 临安市| 泸定县| 兴文县| 蚌埠市| 鄂托克旗| 台东市| 临夏市| 崇信县| 郁南县| 澄迈县| 清涧县| 镶黄旗| 二手房| 潼南县| 明光市| 察哈| 乌拉特后旗| 卢龙县| 沁源县| 会昌县| 沂南县| 湟源县| 墨玉县| 秦安县| 兴宁市| 读书| 阿拉尔市| 洪湖市| 辉县市| 泽库县| 山阴县| 台前县| 榆树市| 深水埗区| 彭州市| 河津市| 年辖:市辖区|