Current location - Training Enrollment Network - Books and materials - Camera imaging algorithm and control technology 3A
Camera imaging algorithm and control technology 3A
3A technologies are autofocus (AF), automatic exposure (AE) and automatic white balance (AWB). 3A digital imaging technology uses AF autofocus algorithm, AE auto-exposure algorithm and AWB auto-white balance algorithm to maximize image contrast, improve the overexposure or underexposure of the subject, and compensate the color difference of the picture under different light irradiation, thus presenting high-quality image information. The camera with 3A digital imaging technology can ensure the accurate color reproduction of the image and present a perfect day and night monitoring effect.

auto-focusing

Auto-focusing is the process of adjusting the focal length of the camera to automatically obtain a clear image.

The autofocus algorithm (AF) is to maximize the image contrast by moving the lens with the obtained image contrast. Generally speaking, autofocus technology is to obtain the highest image frequency component and higher image contrast by adjusting the position of the focusing lens. Among them, getting the best focus is a process of continuous accumulation. By comparing the contrast of each frame of images, the maximum contrast point in the range of lens movement can be obtained, and then the focal length can be determined.

The basic step of AF algorithm is to judge the blur degree of the image, get the evaluation value of each acquired image through an appropriate ambiguity evaluation function, then get a series of peaks through a search algorithm, and finally adjust the acquisition equipment to the position where the peaks are located through motor driving to get the clearest image. The key of the algorithm is to achieve the balance between accuracy and speed, and the accuracy of the algorithm is influenced by both software algorithm and hardware accuracy.

Focus evaluation function

There are many evaluation functions, and the main image factors to be considered are the image frequency (clear texture and high frequency distribution) and the gray component distribution of the image (the larger the component distribution range of the gray image corresponding to the image, the more details of the image, the clearer the reflected image).

Suitable search window combined with search algorithm

The commonly used search algorithm is hill climbing algorithm, and the search window has a golden section focus nested window.

automatic exposure

The purpose of automatic exposure is to make the photosensitive device get proper exposure.

The automatic exposure algorithm (AE) will automatically set the exposure value according to the available light source conditions. When the brightness difference between the subject and the background is large, it will generally lead to overexposure or underexposure of the subject. In order to overcome this problem, some specific AE algorithms focus on the brightness of the object and give more weight to this part when adjusting the brightness.

The general algorithm obtains the appropriate exposure by obtaining the exposure parameters corresponding to the brightness level of the image, including aperture size, shutter speed and brightness gain of the camera sensor.

That is to say, the general AE algorithm steps include:

The method for obtaining the brightness of the image comprises the following steps:

1. Average brightness

2. Partition weighted average brightness

The purpose of area weighting is to focus the exposure on the center of the screen.

3. Set different brightness thresholds to distinguish backlight, positive light and strong light areas.

4. Make exposure compensation for the main object.

The main methods of adjusting parameters are:

1. table lookup method

There is a look-up table of the relationship between exposure parameter adjustment step size and image brightness in the system, and the adjustment amount is changed by brightness value.

2. Iterative method

3. Numerical calculation method

Automatic white balance

The essence of white balance is to make white objects appear white under any light source.

Automatic white balance algorithm (AWB) adjusts the fidelity of picture color according to light source conditions. Objects will have different degrees of color difference under different light irradiation. Generally, the overall color difference signal of an image is used as color temperature data. When most areas of this image are covered by a uniform color, this color compensation may lose some complete colors. In order to make up for this defect, some specific AWB algorithms are proposed to adapt to different color temperatures.

The general algorithm is to make the color of the shot picture close to the real color of the object by adjusting the white balance gain, and the gain adjustment is based on the color temperature of the ambient light source.

Steps of general AWB algorithm:

In order to estimate the color temperature of ambient light, classical algorithms include:

1. Grey World Hypothesis Algorithm

For pictures with many colors, the average of their color components.

r? ,G? ,B?

It tends to the same gray level k, and the algorithm based on this assumption is ideal when the image color distribution is uniform. If the distribution is uneven, the effect will be abnormal.

2. White block hypothesis algorithm

It is considered that the brightest point in the image is the white point. Some algorithms extract color features from images and directly convert them into color temperature coordinates for color temperature estimation. The color temperature in the actual image is basically a mixed color temperature, and this algorithm is rarely realized in practical application.

Calculate the gain and adjust it.

For example, the easiest way to adjust the gain is to find the gain corresponding to the average color component of the image:

α=G? /R? ,β=G? /B?

Then, adjust the RGB components of the whole picture:

R′=αR,G′= G,B′=βB