Traditional Culture Encyclopedia - Photography major - Difference between gray image, black-and-white image, binary image and color image

Difference between gray image, black-and-white image, binary image and color image

First of all, values are no different:

1. color image: each pixel is represented by three components: r, g and b, and the value range of each channel is 0~255. The data type is usually an 8-bit unsigned integer.

2. Binary image (black and white image): There are only two possibilities for each pixel, 0 and 1. 0 stands for black, 1 stands for white. The data type is usually 1 binary bit.

3. Gray image: Gray image is usually obtained by measuring the brightness of each pixel in a single electromagnetic spectrum (such as visible light). Gray-scale images for display are usually stored in a nonlinear ratio of 8 bits per sampling pixel, so there can be 256 gray scales.

Second, the color channels are different:

Each pixel of a 1. color image is usually represented by three components: red (r), green (g) and blue (b), and the components are between (0,255). The color value of each pixel of RGB image (represented by RGB primary colors) is directly stored in the image matrix, because the color of each pixel needs to be represented by three components: R, G and B.

2. Gray image is an image with only one sampling color per pixel. This image is usually displayed as gray from the darkest black to the brightest white, although in theory, this sampling can be different shades of any color, even different colors with different brightness.

3. Black and white images In the field of computer images, there are only two colors of black and white images. Binary image, that is, the two-dimensional matrix of binary image consists of only two values: 0 and 1, where "0" stands for black and "1" stands for white.

Third, the application is different:

1, color image is a special case of multi-spectral image, which corresponds to the three primary colors of human vision, namely red, green and blue, and is an approximation to the quantitative properties of human eye spectrum. Tricolor model is the basis of establishing equipment such as image imaging, display and printing, and plays a very important role.

2. When binary images represent images of people and landscapes, they can only show their edge information, and the texture features inside the images are not obvious. At this time, a gray image with richer texture features should be used. The application fields of ordinary binary images are license plate recognition and character extraction of images.

Baidu Encyclopedia-Gray Image

Baidu Encyclopedia-Binary Image

Baidu encyclopedia-color pictures