Image processing - single-channel image and the multi-channel image

concept

(A): FIG single channel,

Commonly known as grayscale, each pixel has a value expressed only color, its pixel value between 0 to 255, 0 is black, 255 is white, some of the intermediate values ​​are different grades of gray. (3 there grayscale channel, the channel 3 has only one channel grayscale value, the value of the other two channels are zero).

(B): Three-channel chart, each pixel has a value of 3 indicates, so that channel 3. Also FIG. 4 channels. Namely three-channel images such as RGB image, RGB color model is an industry standard color, by a change between red (R), green (G), blue (B) color channels as well as their three mutually superposition to get a variety of colors, RGB that is representative of red, green, and blue color channels, the standard includes almost all the colors the human eye can perceive, is one of the most widely used color system . In short, each dot is represented by three values.

  • For a digital image, and what we see is visible a real picture, but it seems the computer, this pair of image brightness just a bunch of different points. An image size of an M × N may be a an M × N matrix representation, the matrix element represents the luminance value of the pixel at this position, generally the greater the pixel value of the bright point.

In general, a two-dimensional matrix is ​​represented by grayscale, color (multi-channel) image (M × N × 3) represented by 3-dimensional matrix.

in short,

For grayscale images pic.shape -> (height, weight);

For the embodiment of the RBG image pic.shape -> (height, weight, channels).

 

Published 83 original articles · won praise 14 · views 30000 +

Guess you like

Origin blog.csdn.net/weixin_38121168/article/details/103668058