How does the phone achieve autofocus?

Mobile phone contrast focus, also known as contrast focus, this focus method has very rigorous mathematical derivation, because it is a engineering student, the mathematics is not good, can only do a very rough introduction, the detailed content depends on more capable The knowing friends to achieve.

This article refers to the address: http://

In general, there are two methods for autofocus based on image processing. The first one is obtained by calculating the depth of focus, and the second is obtained by calculating the depth of defocus.

The principle of these two methods is more cumbersome to explain. In simple terms, the defocus depth method obtains the blur degree and depth information from the out-of-focus image, and calculates the sharpness evaluation value according to the two plus the corresponding shooting parameters, and combines All of these values ​​get the specific amount that needs to be adjusted, because the number of images required is small, so the speed is faster.

The depth of focus method is more troublesome. First, a series of images with different degrees of blur are needed to calculate the sharpness evaluation value of the series of images. Then, the evaluation curve is obtained by fitting the series of values, and the peak is determined according to the peak value of the evaluation curve. Good focus position, this method is high precision, but slow.

Need to say a little off topic is, although these processes are the same, but the calculation methods of different manufacturers are actually somewhat different, so the same contrast focus, some manufacturers will converge quickly, and some manufacturers are slow.

These two methods do not leave one thing, that is, the sharpness evaluation value, the sharpness evaluation value is similar to a statistic, which is obtained after some processing according to some parameters. Of course, the definition evaluation value has other requirements, such as effective. Sex/robustness, etc.

There are generally several ways to calculate the evaluation value of clarity (not comprehensive, there are many others):

The first is the method of the spectral function. The clear image contrasts with the corresponding unclear image and contains more information on the corresponding spectral components. One reflects the amplitude of the spectral function, which can be evaluated by this method.

The second is information entropy. The information entropy of a clear image is larger than the corresponding unclear image. This original proof is very cumbersome, so the data processing theorem is used here to prove: 1. Clear image processing can get unclear images. 2. However, an unclear image cannot be clearly imaged anyway. 3. Therefore, the information entropy of the clear image is larger than the corresponding unclear image. If there is a method to calculate the information entropy, it can be evaluated by entropy.

The third is the gradient function. In the image, the gradient function is a function that can measure the conversion rate of a variable. The correct focus image has sharper edges, and the edge is sharper, often with the maximum rate of change. Or the change is the least continuous, so you can evaluate the clarity.

The third is now commonly used, that is, the gradient. The gradient is mathematically a representation of the transformation rate. In actual calculations, we can use variance, energy gradient or Laplacian (equivalent to second-order differential) or Other methods to achieve, these calculation methods themselves have different complexity, but the most influential calculation is to select the number of pixels in the image, such as a contrast focus selection, whether it is a central point, or a four-point edge, or Five points on the corner? This is a problem that every camera manufacturer considers.

Let's take a look now. Which of the following is the evaluation method?

Light Guide Film Membrane Switch

LGF backlight Membrane Switch is a new type of switch products, product structure and the switch is the same as before, and by the panel, circuit boards, the keys of the composition of the material is almost the same, different is much LGF of production materials, this type of switch products luminous performance is good, uniform brightness, high light intensity.

Light Guide Film Membrane Switch,Membrane Switch With 2Pin,Metal Dome Membrane Switch,Single Dome Membrane Switch

Dongguan Nanhuang Industry Co., Ltd , https://www.soushine-nanhuang.com