[Digital Image Processing] Digital Image Basics -- Based on Digital Image Processing

I. Introduction

        The basis of digital image processing is based on digital image acquisition. Here we mainly introduce some basic concepts of images, including image format, image imaging, mathematical characteristics of images and basic mathematical processing of images

2. Elements of image perception

        Mainly two parts: color and brightness

Human Eye Imaging:

        Iris : Controls the diameter of the pupil, which is equivalent to the aperture and controls the amount of light entering;

        Lens : It is equivalent to a lens. In theory, the image distance of human eye imaging can be considered as customized, and the deformation of the lens can change the focal length, so as to realize the imaging of different object distances;

        Retina : There are two types of photoreceptors: cones and rods. Among them, the cone is located in the fovea of ​​the retina, which is located on the optical axis. When the eye turns to squint, it will also rotate here. Each cone is connected to a nerve ending, which is sensitive to color, and the image is where the human eye focuses. Rods are widely distributed on the retina, several rods link a nerve ending, have no color perception, and are sensitive to low illumination, such as the vision under moonlight, mainly rods are stimulated (guess the reason, due to The diameter of the pupil is larger under brightness, so the range of light entering the lens is larger, and more light will be transmitted to a larger range of the retina. At this time, the cones receive less light and the rods receive more light).      
        Cone cells : The cones are divided into three types of cone cells, which are divided into S-cone, M-cone, and L-cone. The activation degree of the three types of cone cells is different when they feel different wavelengths of light, so Only then did the biological sensation of color come into being. For visible light, the distribution is

It can be seen that the L-cone is more sensitive to red, the M-cone is more sensitive to green, and the S-cone is more sensitive to blue and purple. For sunlight, it is a mixture of various visible lights, so the human eye thinks that sunlight is white light, which is also the basis of the principle of RBG three primary colors. White is not a physical color, white light does not exist, and white is just a concept of living beings. 

Brightness and Grayscale:

        In the actual physical sense, the brightness refers to the light intensity; while the gray scale refers to a discrete interval of brightness from the minimum to the maximum. The gray scale is relative and changes relatively. It is determined by the maximum brightness and the discrete interval interval. Decide. The human eye actually perceives brightness as a dynamic range. In theory, what the human eye perceives is the gray value. Regarding the brightness saturation, because the grayscale value takes the maximum brightness as the maximum grayscale, the maximum grayscale will eventually be the maximum grayscale that exceeds this brightness, so information will be lost.

color:

 

        RGB: According to the previous analysis of human eye imaging, it can be seen that red, green and blue are used as the three basic colors, and white can be synthesized. At the same time, yellow, cyan and purple can be synthesized by combining two pairs

        Reflective RGB: The light seen by the human eye is divided into two types, one is direct light (including the light transmitted by transparent objects), and the other is reflected light, which means that the object itself does not emit light and reflects its light. For direct light objects, the color we see is the light it emits, and the synthesis of colors is the synthesis of RNG; for reflected light physics, the color we see is the light it reflects, and the synthesis of its colors is the reflection RGB, which is relative to white light fill light. For example, a blue fill light is yellow. At this point there is a fill light triangle.

        There are other color spaces based on different primitive colors.

3. Image sampling and quantization

        After the image is taken by the optical sensor, the sensing image can be obtained, and then converted into a digital image after processing. A digital image defines its data by a two-dimensional function: y=f(x,y). where y represents the gray value at (x, y). x, y represent the interval of discrete division of its two-dimensional image plane.

        Image resolution: divided into spatial resolution and brightness resolution. Spatial resolution refers to the degree of discrete division of the image plane. For example, 10um*10um represents a pixel, which is the spatial resolution. The resolution size is 10um. If the division is finer, the pixel size will be smaller. Brightness resolution refers to the division of grayscale values. If it is 256, it means that the brightest and darkest areas are divided into 256 levels. If it is 128, it is relatively less fine. The greater the grayscale resolution, the finer its brightness representation.

        The digital storage gray value of the image is generally: L=2^{k}. Based on binary notation, each pixel is represented by one byte, then k is 8, and the gray scale range that can be represented is 0-255; if it is represented by two bytes, then k is 16, which can represent 0-255 range of 65535. If the size of the image is M*N, then the storage size is M*N*k bit, that is, m*N*k/8 bytes.

        dpi: the number of pixels per inch, the larger the dpi, the higher the image accuracy

4. Image format

bmp (BitMap) format:

        Bit-mapped storage format; no compression except selectable color resolution; scan order left to right, top to bottom

JEPG(joint photographic experts Group)

        Lossy compression is used to remove redundant information, the compression is relatively high but the image quality can be preserved better

Png(Portable Network Graphics)

        Portable grid storage format with relatively small storage capacity and high compression ratio

tig(Tag Image File Format)

        The image format is relatively complicated, and it is rarely seen. It is used for publishing, scanning, mapping, etc.

5. Math tools

        Some basic mathematical tools will be used: probability and statistics, linear algebra, calculus and other knowledge.

                        

Guess you like

Origin blog.csdn.net/weixin_43163656/article/details/127966732