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

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.

主站蜘蛛池模板: 福贡县| 哈巴河县| 盐亭县| 磴口县| 塔城市| 黔南| 临夏县| 壤塘县| 钟山县| 祁门县| 沿河| 资溪县| 专栏| 都江堰市| 桃江县| 乌兰浩特市| 神池县| 册亨县| 楚雄市| 祁门县| 年辖:市辖区| 莱州市| 平利县| 鹤岗市| 安仁县| 彰化市| 邹平县| 宁津县| 会同县| 溆浦县| 翁源县| 太白县| 宁陵县| 西乌珠穆沁旗| 竹溪县| 安顺市| 美姑县| 许昌县| 清镇市| 资溪县| 杭锦后旗|