Image focusing evaluation method of imaging device and processing terminal

Through multi-parameter comprehensive evaluation and adaptive hill-climbing algorithm, the problems of insufficient focus evaluation and slow automatic focusing speed in the existing technology are solved, and more accurate and fast focusing effect evaluation and automatic focusing are achieved.

CN119363966AInactive Publication Date: 2025-01-24GUANGZHOU BAOLUN ELECTRONICS CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411410975.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-01-24
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure CN119363966A_ABST
    Figure CN119363966A_ABST
Patent Text Reader

Abstract

The invention discloses an image focusing evaluation method of an imaging device. The method comprises the following steps: step 1, obtaining a plurality of target images; 2, randomly generating a parameter group representing lens physical parameters of a lens of the imaging device; 3, based on the parameter set as the initial position of the lens, a neighborhood generation rule is adopted to perform operation on a preset step length at the initial position to generate neighborhoods, and each neighborhood corresponds to one lens position; and 4, starting from the initial position of the lens, obtaining the target image corresponding to each lens position, calculating the focusing effect evaluation value of each target image, and evaluating the focusing effect by comparing the focusing effect evaluation values corresponding to different lens positions. According to the method, the focusing quality of each position of the image can be well evaluated, and the focusing effect of each position can be more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to an image focusing evaluation method and a processing terminal for an imaging device. Background Art

[0002] Autofocus technology is widely used in various optical devices including imaging devices. Common optical devices include cameras, microscopes, telescopes, etc. By integrating autofocus technology in these optical devices, consumers can automatically shoot or observe clearly focused images. As one of the daily electronic devices widely used by the public, autofocus technology is more practical. To ensure the autofocus effect of the imaging device, the first thing to do is to conduct a focus evaluation on the captured image. Only when the focus evaluation is qualified can the image captured by the autofocus be clear. The second thing to do is to further realize autofocus on the basis of the focus evaluation.

[0003] In existing focus evaluation methods, a single parameter is often used for evaluation, for example, only the sharpness of the pixels in the image is used for evaluation. Using such a single parameter to evaluate the focus effect has limitations, resulting in inaccurate focus effects. For example, it is difficult to judge the focusing quality of the lens of the imaging device at different positions in the captured image.

[0004] In addition, the automatic docking achieved based on the existing focus evaluation method is difficult to obtain the clearest image with the closest quality because it cannot find the optimal focus position. Moreover, even if a certain degree of clear and high-quality image can be obtained, it is because only a single algorithm is used to achieve it. For example, only the hill climbing algorithm is used to achieve automatic focus, but this will cause the inability to quickly find the convergence conditions and the slow search speed, resulting in slow automatic focus shooting, which is problematic for some application scenarios with high timeliness requirements. It is also easy to fall into the dilemma of delocalizing the optimal solution, making it difficult to find the global optimal solution, that is, it is difficult to find the best focus point (focus position) in the global range, thus affecting the final focusing effect and imaging quality. Summary of the invention

[0005] In view of the deficiencies in the prior art, an object of the present invention is to provide an image focus evaluation method for an imaging device and a processing terminal, which can solve the problems described in the background technology.

[0006] The technical solution to achieve the purpose of the present invention is: an image focus evaluation method for an imaging device, comprising the following steps:

[0007] Step 1: Obtain several target images;

[0008] Step 2: randomly generating a parameter group representing physical parameters of the lens of the imaging device;

[0009] Step 3: Based on the parameter group as the initial lens position of the lens, a neighborhood generation rule is used to operate a preset step size at the initial position to generate a neighborhood, and each neighborhood corresponds to a lens position;

[0010] Step 4: Starting from the initial position of the lens, obtain the target image corresponding to each lens position, calculate the focusing effect evaluation value of each target image, and evaluate the focusing effect by comparing the focusing effect evaluation values ​​corresponding to different lens positions.

[0011] Furthermore, in step 1, at least two different target images are included, and the different target images refer to images obtained by photographing the same target object at different shooting angles.

[0012] After obtaining the target image, the target image is preprocessed, and the preprocessing includes one or more of normalization, denoising, cropping, scaling and grayscale processing.

[0013] Furthermore, in step 2, the physical parameters of the lens include focal length, aperture and focusing distance of the aperture.

[0014] Furthermore, the parameter group is an integer, which is calculated according to a preset mathematical formula based on the physical parameters of the lens.

[0015] Furthermore, the integer is calculated according to a preset mathematical formula based on the physical parameters of the lens, and its specific implementation process includes:

[0016] The adjustable range of the focal length is divided into a number of intervals at equal intervals, and each interval is numbered.

[0017] The adjustable range of the aperture is divided into several intervals at equal intervals, and each interval is numbered.

[0018] Divide the adjustable range of focus distance into several intervals at equal intervals, and number each interval.

[0019] Each number is a positive integer.

[0020] The parameter group is calculated according to the following mathematical formula:

[0021] Parameter group = focal length number * A + aperture number * B + focus distance * C,

[0022] Where A, B and C are preset constants.

[0023] Further, in step 3, the operation includes addition and subtraction operations, so that on the basis of the initial position of the lens, the position obtained by adding and subtracting the preset step size is the corresponding neighborhood, and the position of the neighborhood is the lens position corresponding to the neighborhood.

[0024] Further, in step 3, the preset step size is adaptively adjusted based on the operation operation to adapt to the changes in the focusing effect evaluation. If the change in the focusing effect evaluation is small, the change in the preset step size is small, and if the change in the focusing effect evaluation is large, the change in the preset step size is large.

[0025] Furthermore, the change of the focus effect evaluation is characterized by a change rate. The focus effect evaluation of the i-th lens position is Fi, and the change rate Fratei of the i-th focus effect evaluation is as follows:

[0026] Fratei=(Fi-Fi-1) / Fi-1

[0027] If Fratei> the first preset threshold F1> 0, the i-th preset step size increases based on the previous step size, and the increase rate is equal to Fratei,

[0028] If Fratei<the second preset threshold F2<0, the i-th preset step size is reduced based on the previous step size, and the reduction rate is equal to Fratei,

[0029] If F2<Fratei<F1, the i-th preset step length remains unchanged, that is, equal to the previous preset step length.

[0030] Further, in step 4, the focusing effect evaluation value F is calculated according to formula ①:

[0031] F=ω1×S+ω2×C+ω3×E+ω4×D+ω5×G------①

[0032] Wherein, ω1-ω5 represent the weight coefficients of the corresponding parameters, S represents the sharpness value of the target image, C represents the contrast of the target image, E represents the entropy of the target image, D represents the clarity difference measure of the target image, and G represents the standard deviation of the gradient amplitude of the target image.

[0033] A processing terminal, comprising:

[0034] A memory for storing program instructions;

[0035] A processor is used to run the program instructions to execute the steps of the image focus evaluation method of the imaging device.

[0036] Beneficial effects of the present invention: The present invention can realize the evaluation of the focusing effect of an image, and by combining parameters such as sharpness value, contrast, entropy, clarity difference measurement, and standard deviation of gradient amplitude, it can well evaluate the focusing quality at various positions of the image, and can more accurately determine the focusing effect of each position. The obtained focusing effect evaluation can also more truly reflect the actual focusing effect.

[0037] In addition, the hill climbing algorithm is improved by adaptively adjusting the step size of the hill climbing algorithm according to the focusing effect evaluation value, thereby improving the search efficiency and accuracy and ensuring that the local optimal solution is found more quickly and accurately. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A schematic diagram of a flow chart for realizing an image focus evaluation method;

[0039] Figure 2 A schematic diagram of a process for realizing an automatic image focusing method;

[0040] Figure 3 It is a schematic diagram of the principle framework of the present invention;

[0041] Figure 4 A schematic diagram of the structure of the processing terminal. DETAILED DESCRIPTION

[0042] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments:

[0043] like Figure 1-Figure 4 As shown, a method for evaluating image focus of an imaging device comprises the following steps:

[0044] Step 1: The imaging device shoots the same target object at at least two different shooting angles to obtain a target image set, where the target image set includes at least two target images including the target object.

[0045] The target object may be a plant, an animal, or a scene, for example, a cloud in the sky, or a seat by the river.

[0046] By photographing the same target object through the same imaging device and photographing it based on different shooting angles, a series of images can be obtained, and this series of images constitutes the target image set.

[0047] All target images in the target image set are preprocessed to obtain preprocessed target images and a preprocessed target image set. The preprocessing includes one or more of normalization, denoising, cropping, scaling and grayscale processing.

[0048] Among them, normalization processing is used to limit the pixel values ​​of the target image pixels within a preset range, for example, all pixel values ​​are normalized and limited to the interval [0, 1]. Denoising is used to filter the noise interference in the target image to make the edges and details of the target image clearer and avoid misjudgment of subsequent focus effect evaluation due to noise. Cropping and scaling are used to remove irrelevant areas in the target image so that the focus evaluation and autofocus calculation are concentrated on the key areas of the target image and the focus effect is evaluated more accurately. The purpose of graying the target image is to reduce the computational complexity.

[0049] Step 2: randomly generate a parameter group representing physical parameters of the lens of the imaging device, where the physical parameters of the lens include focal length, aperture, and focusing distance of the aperture.

[0050] Exemplarily, the parameter group of the physical parameters of the lens is an integer, and the integer is calculated according to a preset mathematical formula based on the physical parameters of the lens.

[0051] For example, the focal length of the lens can be adjusted from 50mm to 200mm. The adjustable range is divided into several intervals, for example, 50 intervals, each interval represents a 3mm change, and the 50 intervals are numbered, for example, 1 to 50 from small to large focal lengths. The adjustable range of the lens aperture is F1.4-F16, which can be divided into several intervals, for example, 6 intervals, numbered 1-6. The adjustable range of the intercom distance is 0.5-10m, which can be divided into 20 intervals, numbered 1-20. Thus, a parameter group can be generated based on these lens physical parameters. For example, the parameter group is calculated according to the following mathematical formula: parameter group = focal length number * 120 + aperture number * 4 + focus distance number. By randomly generating a value of a parameter group, the value is a random number, and based on the generated random number and based on the mathematical formula, the focal length number, aperture number and focus distance number can be solved, so that the specific values ​​of the focal length, aperture and focus distance can be determined, that is, the physical parameters of the lens can be determined according to the parameter group.

[0052] Of course, the random number needs to be randomly generated within the value range of the parameter group, and the value range of the parameter group is affected by the values ​​of the physical parameters of each lens.

[0053] Step 3: Based on the randomly generated parameter group as the initial lens position of the lens, a neighborhood generation rule is used to operate a preset step size on the initial lens position to generate a neighborhood, and each neighborhood corresponds to a lens position.

[0054] The operation includes addition and subtraction operations, that is, based on the initial lens position, the position obtained by adding and subtracting the preset step length is the corresponding neighborhood, and the position of the neighborhood is the lens position corresponding to the neighborhood.

[0055] The neighborhood generation rules determine which locations near the initial camera position will be considered as neighborhood solutions.

[0056] Exemplarily, the preset step size is adaptively adjusted based on the operation operation to adapt to the change of the focus effect evaluation. If the change of the focus effect evaluation is small, the change of the preset step size is small, and if the change of the focus effect evaluation is large, the change of the preset step size is large. When the change of the focus effect evaluation is in a certain range and the change is neither large nor small, the preset step size does not change but remains fixed.

[0057] Exemplarily, the focusing effect evaluation of the i-th lens position is F i , then the rate of change of the i-th focusing effect evaluation Frate i The formula is as follows:

[0058] Frate i =(F i -F i-1 ) / F i-1

[0059] If Frate i > first preset threshold F1 > 0, then the preset step size of the i-th time is increased based on the previous step size (i.e., i-1), and the increase rate is equal to Frate i If Frate i < second preset threshold F2 < 0, then the i-th preset step size is reduced based on the previous step size, and the reduction rate is equal to Frate i If F2<Frate i <F1, the preset step size for the i-th time remains unchanged, that is, it is equal to the preset step size for the previous time. When the rate of change of the focus effect evaluation exceeds a preset threshold value greater than 0, it indicates that the focus effect evaluation has been significantly improved, and it is necessary to adaptively increase the corresponding preset step size according to the improvement range (i.e., the rate of change) of the focus effect evaluation. When the rate of change of the focus effect evaluation is lower than a preset threshold value less than 0, it indicates that the focus effect evaluation has declined or the improvement is not obvious, and it is necessary to adaptively reduce the corresponding preset step size according to the decline range (i.e., the rate of change) of the focus effect evaluation. When the rate of change of the focus effect evaluation is between these two preset thresholds, there is no need to increase or decrease the preset step size.

[0060] Step 4: Starting from the initial position of the lens, obtain the target image corresponding to each lens position, calculate the focus effect evaluation value of each target image, and evaluate the focus effect by comparing the focus effect evaluation values ​​corresponding to different lens positions. The focus effect evaluation value F is calculated according to formula ①:

[0061] F=ω1×S+ω2×C+ω3×E+ω4×D+ω5×G------①

[0062] Wherein, ω1-ω5 represent the weight coefficients of the corresponding parameters, S represents the sharpness value of the target image, C represents the contrast of the target image, E represents the entropy of the target image, D represents the clarity difference measure of the target image, and G represents the standard deviation of the gradient amplitude of the target image.

[0063] Among them, S, C, E, D and G can all be calculated based on the existing technology, so they are not described here. M and N are the number of rows and columns of the target image, respectively. M[i,j] represents the gradient magnitude at the pixel coordinate (i,j). G x [i,j] 2 and G y [i,j] 2 Represent the horizontal gradient and vertical gradient respectively.

[0064] The focusing effect of the target image is positively correlated with the focusing effect evaluation value F. The larger the focusing effect evaluation value F is, the better the focusing effect is. Conversely, the worse the focusing effect is.

[0065] The processing of the above steps can realize the evaluation of the focusing effect of the image, and by combining parameters such as sharpness value, contrast, entropy, clarity difference measurement, and standard deviation of gradient amplitude, it is possible to well evaluate the focusing quality at each position of the image, and can more accurately determine the focusing effect of each position. The resulting focusing effect evaluation can also more realistically reflect the actual focusing effect.

[0066] In addition, the hill climbing algorithm is improved by adaptively adjusting the step size of the hill climbing algorithm according to the focusing effect evaluation value, thereby improving the search efficiency and accuracy and ensuring that the local optimal solution is found more quickly and accurately.

[0067] In order to realize automatic focusing of the imaging device, the present invention further includes the following steps based on the above focus evaluation to realize automatic focusing with the optimal focusing effect.

[0068] Step 5: Optimize the focusing effect of the target avatar at each lens position based on the hill climbing algorithm to obtain the local optimal lens position.

[0069] Exemplarily, the preprocessed target head image, the parameter group, the preset step size and the focus effect evaluation value are used as inputs of the hill climbing algorithm to output a local optimal solution for the lens position.

[0070] Starting from the initial lens position, a neighborhood solution is generated according to the domain generation rule, and the target image corresponding to the lens position corresponding to each neighborhood solution is obtained from the target image set, so as to obtain the focusing effect evaluation value corresponding to each target image.

[0071] Starting from the target image corresponding to the initial lens position, the focusing effect evaluation value of the current lens position is compared with the focusing effect evaluation value of the target image corresponding to the next lens position. If the focusing effect evaluation value corresponding to the next lens position is better than the focusing effect evaluation value corresponding to the initial lens position, the next lens position is updated to the neighborhood solution of the current lens position, and the search is continued in sequence until no better focusing effect evaluation value is found. At this time, the local optimal solution is reached, thereby finding the local optimal lens position.

[0072] Exemplarily, when calculating the focus effect evaluation value of each neighborhood position, the domain generation task of the current lens position is assigned to multiple computing cores or threads. For example, if there are 11 neighborhood solutions at the current position that need to calculate the focus effect evaluation value, the task can be evenly distributed to multiple cores. For example, when four cores are used, each core is responsible for calculating the focus effect evaluation values ​​of 2-3 neighborhood solutions, accelerating the overall calculation process to achieve real-time performance improvement. After the core completes the calculation, data exchange between cores is achieved by using shared memory. In the process of parallel processing, task allocation is dynamically adjusted according to the calculation speed and task complexity of each core to ensure load balancing between cores. Establish a relevant monitoring mechanism to monitor computing needs in real time. When the preset threshold is exceeded, all cores are enabled. When the threshold is not reached, only some cores are enabled to achieve the effect of reducing power consumption.

[0073] Step 6: Process the local optimal solution based on the simulated annealing algorithm to obtain the optimal solution, which is the optimal lens position. The parameter group corresponding to the optimal lens position is used as the shooting parameters for automatic focusing. The imaging device performs automatic focusing based on the shooting parameters, that is, the focal length, aperture and focus distance determined by the optimal unlocking are installed for shooting.

[0074] Exemplarily, the local optimal solution is processed based on the simulated annealing algorithm to obtain the optimal solution, and its specific implementation process includes the following steps:

[0075] Step S1: taking the local optimal solution output by the hill climbing algorithm as the current solution L_current;

[0076] Step S2: within a larger range of the current solution, a new lens position L_new is randomly generated according to the probability distribution and used as a new solution, the focus effect evaluation values ​​corresponding to the current solution L_current and the new solution L_new are compared, and the difference ΔF between the two focus effect evaluation values ​​is calculated;

[0077] Step S3: If ΔF<0, it indicates that the focus effect evaluation value corresponding to the lens position L_new is better, that is, the new solution is better than the current solution, so the new solution L_new is used to replace the original current solution L_current, so that the new solution L_new is used as the current solution, and then step S6 is executed.

[0078] If ΔF>0, the probability of accepting a new solution is determined according to the current temperature T of the simulated annealing algorithm. The probability P of accepting a new solution is calculated using the Boltzmann probability distribution formula. The Boltzmann probability distribution formula is shown as follows: P=exp(-ΔF / T).

[0079] Generate a random number r. If r < P, accept the new solution L_new as the current solution L_current. If r ≥ P, keep the current solution L_current unchanged.

[0080] Press T t+1 =T t ×α updates the temperature at the next moment, T t Indicates the current temperature, T t+1 Indicates the temperature at the next moment, α indicates the temperature attenuation coefficient, and determines whether the simulated annealing algorithm meets the termination condition based on the new temperature. The termination condition includes that the current temperature drops below the preset temperature threshold T_min, or the number of consecutive iterations of the simulated annealing algorithm exceeds the preset iteration threshold and no better solution is found. When the simulated annealing algorithm terminates, the current solution it outputs is used as the final optimal solution of the simulated annealing algorithm, which is also the parameter group required for the final automatic focus shooting of the lens.

[0081] Exemplarily, the final lens position information output by the simulated annealing algorithm is used as the optimal solution and fed back in real time to realize the autofocus function. Among them, the output final lens position has a direct relationship with the autofocus, and the final lens position means that the image can reach the clearest state under the current shooting conditions. When the simulated annealing algorithm converges and outputs the final lens position, this position corresponds to the position that can make the focus effect evaluation value reach the optimal value under the current conditions.

[0082] According to the physical characteristics of the lens and the parameter settings of the control system, the value of the lens position can be converted into the corresponding focal length. Usually, the control system of the lens will have a mapping relationship that associates the lens position information with the actual focal length. Through this mapping relationship, the focal length when the image is clearest can be determined from the optimal lens position data output by the simulated annealing algorithm.

[0083] Through the processing of all the above steps, the focusing parameters of the global optimal solution can be well found to ensure that the image taken under this focus is the clearest, and the hill climbing algorithm and the simulated annealing algorithm are combined to achieve automatic focusing.

[0084] The existing single hill climbing algorithm is prone to fall into the local optimal solution, and the single simulated annealing algorithm has a certain ability to jump out of the local optimal solution, but it may be relatively blind in the early stage of the search. This technical solution combines the hill climbing algorithm with the simulated annealing algorithm. After the hill climbing algorithm initially finds the local optimal solution, the simulated annealing algorithm can accept the poor solution with a certain probability, so that it is more likely to explore a better global solution, which greatly improves the global search capability.

[0085] When a single hill climbing algorithm approaches the optimal solution, the convergence speed may slow down due to the fixed step size and limited search range. The simulated annealing algorithm has a wider search range when the temperature is high, but as the temperature decreases, the convergence speed will gradually slow down. In this technical solution, the early hill climbing algorithm uses an adaptive step size adjustment strategy to dynamically adjust the search step size according to the focusing effect evaluation to quickly find the local optimum. It can flexibly adapt in different search stages, improve search efficiency, provide a better starting point for the simulated annealing algorithm, reduce the blind search of the simulated annealing algorithm, thereby accelerating the overall convergence speed and enhancing the overall real-time performance.

[0086] In practical applications, image quality, lighting conditions, etc. may change. Single hill climbing algorithms and simulated annealing algorithms are relatively weak in adapting to these changes. This technical solution combines the advantages of the two algorithms and can better cope with various complex situations and interference factors. Even under unfavorable conditions, it can find a better focus position and has stronger robustness.

[0087] An existing single algorithm may perform well in a specific type of image or in a specific shooting environment, but not in other cases. By integrating two algorithms, this technical solution can adapt to a wider range of image types, shooting scenes, and equipment conditions. Whether it is a simple image or a complex texture, whether it is a bright environment or a dim scene, it can effectively achieve autofocus and has a wider applicability.

[0088] like Figure 4 As shown, the present invention also provides a processing terminal 100, which includes:

[0089] Memory 101, used for storing program instructions;

[0090] The processor 102 is configured to run the program instructions to execute the steps of the image focus evaluation method of the imaging device.

[0091] The embodiment disclosed in this specification is only an example of a unilateral feature of the present invention, and the protection scope of the present invention is not limited to this embodiment, and any other functionally equivalent embodiments fall within the protection scope of the present invention. For those skilled in the art, various other corresponding changes and deformations can be made according to the technical solutions and concepts described above, and all of these changes and deformations should fall within the protection scope of the claims of the present invention.

Claims

1. An image focus evaluation method for an imaging device, characterized in that: The following steps are involved: Step 1: Obtain several target images; Step 2: randomly generating a parameter group representing physical parameters of the lens of the imaging device; Step 3: Based on the parameter group as the initial lens position of the lens, a neighborhood generation rule is used to operate a preset step size at the initial position to generate a neighborhood, and each neighborhood corresponds to a lens position; Step 4: Starting from the initial position of the lens, obtain the target image corresponding to each lens position, calculate the focusing effect evaluation value of each target image, and evaluate the focusing effect by comparing the focusing effect evaluation values ​​corresponding to different lens positions.

2. The image focusing evaluation method of the imaging device according to claim 1, characterized in that: In step 1, at least two different target images are included, and the different target images refer to images obtained by photographing the same target object at different shooting angles. After obtaining the target image, the target image is preprocessed, and the preprocessing includes one or more of normalization, denoising, cropping, scaling and grayscale processing.

3. The image focusing evaluation method of an imaging device according to claim 1, characterized in that: In step 2, the physical parameters of the lens include focal length, aperture and focusing distance of the aperture.

4. The image focusing evaluation method of the imaging device according to claim 3, characterized in that: The parameter group is an integer, which is calculated according to a preset mathematical formula based on the physical parameters of the lens.

5. The image focusing evaluation method of the imaging device according to claim 4, characterized in that: The integer is calculated according to a preset mathematical formula based on the physical parameters of the lens, and its specific implementation process includes: The adjustable range of the focal length is divided into a number of intervals at equal intervals, and each interval is numbered. The adjustable range of the aperture is divided into several intervals at equal intervals, and each interval is numbered. Divide the adjustable range of focus distance into several intervals at equal intervals, and number each interval. Each number is a positive integer. The parameter group is calculated according to the following mathematical formula: Parameter group = focal length number * A + aperture number * B + focus distance * C, Where A, B and C are preset constants.

6. The image focusing evaluation method of an imaging device according to claim 1, characterized in that: In step 3, the operation includes addition and subtraction operations, so that based on the initial position of the lens, the position obtained by adding and subtracting the preset step size is the corresponding neighborhood, and the position of the neighborhood is the lens position corresponding to the neighborhood.

7. The image focusing evaluation method of an imaging device according to claim 6, characterized in that: In step 3, the preset step size is adaptively adjusted based on the operation calculation to adapt to the changes in the focusing effect evaluation. If the change in the focusing effect evaluation is small, the change in the preset step size is small; if the change in the focusing effect evaluation is large, the change in the preset step size is large.

8. The image focus evaluation method of an imaging device according to claim 7, characterized in that: The change of the focus effect evaluation is characterized by a change rate. The focus effect evaluation of the i-th lens position is Fi, and the change rate Fratei of the i-th focus effect evaluation is as follows: Fratei=(Fi-Fi-1) / Fi-1 If Fratei> the first preset threshold F1> 0, the i-th preset step size increases based on the previous step size, and the increase rate is equal to Fratei, If Fratei<the second preset threshold F2<0, the i-th preset step size is reduced based on the previous step size, and the reduction rate is equal to Fratei, If F2<Fratei<F1, the i-th preset step length remains unchanged, that is, equal to the previous preset step length.

9. The image focus evaluation method of an imaging device according to claim 8, characterized in that: In step 4, the focusing effect evaluation value F is calculated according to formula ①: F=ω1×S+ω2×C+ω3×E+ω4×D+ω5×G------① Wherein, ω1-ω5 represent the weight coefficients of the corresponding parameters, S represents the sharpness value of the target image, C represents the contrast of the target image, E represents the entropy of the target image, D represents the clarity difference measure of the target image, and G represents the standard deviation of the gradient amplitude of the target image.

10. A processing terminal, characterized in that: It includes: A memory for storing program instructions; A processor is used to run the program instructions to execute the steps of the image focus evaluation method of the imaging device according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Quick and automatic focusing method and device for camera

    CN105430279A

  • Automatic focusing method for camera

    CN107179645A

  • Automatic focusing method based on liquid lens as well as system

    CN109451244A

  • Automatic focusing method and device, electronic equipment and storage medium

    CN115567778A