Camera focusing state evaluation method and device, equipment and storage medium

By determining the image center point and using rectangular areas with consistent edge lines to calculate total gradient intensity, the method addresses inaccuracies in autofocus due to WD changes, enhancing focus state evaluation accuracy and reliability.

CN119183010AActive Publication Date: 2024-12-24WUHAN JINGLI ELECTRONICS TECH +2
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202411211419.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-24
Estimated Expiration
2044-08-30

AI Technical Summary

Technical Problem

Existing autofocus technologies in machine vision and optical imaging are affected by changes in working distance (WD), leading to inaccuracies in focus state evaluation due to changes in image pattern proportions, making it difficult to ensure accuracy and reliability.

Method used

A method that determines the center point of an image and uses rectangular areas with consistent edge lines to calculate total gradient intensity, ensuring the evaluation's consistency and accuracy by adjusting for WD changes.

Benefits of technology

The method improves the accuracy and reliability of focus state evaluation by reducing the impact of WD changes through a unified evaluation standard based on total gradient intensity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119183010A_ABST
    Figure CN119183010A_ABST
Patent Text Reader

Abstract

The invention discloses a camera focusing state evaluation method, device and equipment and a storage medium, and relates to the technical field of machine vision industrial detection, and the camera focusing state evaluation method comprises the steps: determining four edge lines and an image center point of a collected cross focusing image; according to the four edge lines and the image center point, four first rectangular areas which take the corresponding edge lines as center lines and have the same length and width and the same offset relative to the image center point are cut out; and calculating the total gradient intensity of the four first rectangular areas and calculating the average value of the total gradient intensity, and if the average value of the total gradient intensity is greater than a set threshold value, judging that the camera is clearly focused. According to the method, the image center point is used for ensuring the consistency of the intercepted area, so that the influence of the working distance change on the judgment result is reduced. Meanwhile, the accuracy and reliability of focusing state evaluation are further improved through a unified evaluation standard of the total gradient intensity of the region.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine vision industrial detection technology, and in particular to a camera focus state evaluation method, device, equipment and storage medium. Background Art

[0002] In the field of machine vision and optical imaging technology, it is crucial to adjust the focus ring and working distance of the lens to achieve the clearest imaging effect. Since the human eye has errors in judging the clear state, the introduction of autofocus technology is particularly necessary.

[0003] During the autofocus process, some lenses may be significantly affected by changes in WD (Working Distance), which can cause changes in the focus state and affect the accuracy of human eye judgment. In addition, changes in WD may also cause changes in the proportion of the pattern in the image, making it difficult to ensure accuracy when evaluating the focus state. Summary of the invention

[0004] The present application provides a camera focus state evaluation method, device, equipment and storage medium, which uses the center point of the image to ensure the consistency of the intercepted area, thereby reducing the impact of the working distance change on the evaluation result. At the same time, through the unified evaluation standard of the total gradient intensity of the area, the accuracy and reliability of the focus state evaluation are further improved.

[0005] In a first aspect, an embodiment of the present application provides a camera focus state evaluation method, the camera focus state evaluation method comprising:

[0006] In combination with the first aspect, in one implementation, determining four edge lines and an image center point of the acquired cross focus image includes:

[0007] A second rectangular area covering the edge line is intercepted in each of the four boundary areas of the cross focus image;

[0008] Identify the local edge line covered by each second rectangular area, and determine the coordinates of the center point of the local edge line;

[0009] A first straight line is formed by connecting the center points of the upper and lower local edge lines, and a second straight line is formed by connecting the center points of the left and right local edge lines. The center point of the image is determined according to the intersection of the first straight line and the second straight line.

[0010] In combination with the first aspect, in one implementation, identifying the local edge line covered by each second rectangular area and determining the coordinates of the center point of the local edge line includes:

[0011] Using Sobel edge detection on each second rectangular area, identifying the local edge line covered by each second rectangular area;

[0012] Get the row and column coordinates of all edge points of the local edge line, and calculate the coordinates of the center point of the local edge line through the row and column coordinates.

[0013] In combination with the first aspect, in one implementation, the method further includes:

[0014] Calculating the inclination angle of the cross focus image relative to the horizontal line according to the first straight line and the second straight line;

[0015] The cross focus image is rotationally corrected according to the tilt angle.

[0016] In combination with the first aspect, in one implementation, calculating the total gradient strengths of the four first rectangular regions and calculating the total gradient strength mean includes:

[0017] Calculate the gradient magnitude of each pixel in each first rectangular area, and sum the gradient magnitudes of all pixels to obtain the total gradient magnitude of each first rectangular area;

[0018] The total gradient intensity average is calculated according to the total gradient intensity of the four first rectangular areas.

[0019] In combination with the first aspect, in one implementation, calculating the gradient magnitude of each pixel point in each first rectangular area includes:

[0020] Use the Sobel operator to calculate the horizontal and vertical gradient components of each pixel;

[0021] The gradient magnitude of each pixel is calculated based on the horizontal gradient component and the vertical gradient component.

[0022] In combination with the first aspect, in one implementation, the method further includes:

[0023] By comparing whether the total gradient intensities of the four first rectangular areas are consistent, it is determined whether the machine for collecting the cross-focus image is level.

[0024] In a second aspect, an embodiment of the present application provides a camera focus state evaluation device, the camera focus state evaluation device comprising:

[0025] A calculation module, which is used to determine four edge lines and an image center point of the acquired cross focus image;

[0026] A cutting module, which is used to cut out four first rectangular areas with the corresponding edge lines as the center lines, the same length and width, and the same offset relative to the center of the image according to the four edge lines and the center of the image;

[0027] The judgment module is used to calculate the total gradient strength of the four first rectangular areas and calculate the average of the total gradient strength. If the average of the total gradient strength is greater than a set threshold, it is judged that the camera is in clear focus.

[0028] In a third aspect, an embodiment of the present application provides a camera focus state evaluation device, which includes a processor, a memory, and a camera focus state evaluation program stored in the memory and executable by the processor, wherein when the camera focus state evaluation program is executed by the processor, the steps of the above-mentioned camera focus state evaluation method are implemented.

[0029] In a fourth aspect, a computer-readable storage medium stores a camera focus state evaluation program, wherein when the camera focus state evaluation program is executed by a processor, the steps of the above-mentioned camera focus state evaluation method are implemented.

[0030] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0031] The camera focus state evaluation method in the present application determines four edge lines and an image center point of a captured cross focus image; based on the four edge lines and the image center point, four first rectangular areas with corresponding edge lines as center lines, the same length and width, and the same offset relative to the image center point are cut out; the total gradient intensity of the four first rectangular areas is calculated and the average of the total gradient intensity is calculated. If the average of the total gradient intensity is greater than a set threshold, it is determined that the camera is in clear focus.

[0032] That is, the application uses the center point of the image to ensure the consistency of the intercepted area, thereby reducing the impact of the working distance change on the evaluation result. At the same time, the accuracy and reliability of the focus state evaluation are further improved through the unified evaluation standard of the total gradient intensity of the area. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 This is a flow chart of an embodiment of a method for evaluating a camera focus state of the present application;

[0034] Figure 2 A schematic diagram for determining the edge line of the cross focus image for this application;

[0035] Figure 3 A schematic diagram of determining the image center point of a cross focus image for this application;

[0036] Figure 4 This is a schematic diagram of intercepting a first rectangular area based on the center point of an image in the present application;

[0037] Figure 5 This is a structural block diagram of an embodiment of a camera focus state evaluation device of the present application;

[0038] Figure 6 This is a schematic diagram of the hardware structure of a camera focus state evaluation device involved in the embodiment of the present application. DETAILED DESCRIPTION

[0039] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0040] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0041] In a first aspect, an embodiment of the present application provides a method for evaluating a camera focus state.

[0042] In one embodiment, referring to Figure 1 , Figure 1 This is a flow chart of an embodiment of a method for evaluating the focus state of a camera according to the present application. Figure 1 As shown, the camera focus state evaluation method includes:

[0043] S1, determining four edge lines and the image center point of the collected cross focus image;

[0044] Specifically, step S1 includes:

[0045] S11, intercepting a second rectangular area covering the edge line in each of the four boundary areas of the cross focus image;

[0046] See also Figure 2 As shown, the cross focus image includes 4 areas, and the area between each two adjacent areas is the edge line. In this embodiment, a second rectangular area covering the edge line is intercepted in each boundary area, that is, Figure 2 The positions of the four second rectangular areas can be arbitrary and their sizes can be different, as long as they can cover a part of the edge line.

[0047] S12, identifying the local edge lines covered by each second rectangular area, and determining the coordinates of the center points of the local edge lines;

[0048] Specifically, this embodiment uses Sobel edge detection on each second rectangular area to identify the local edge line covered by each second rectangular area; obtains the row and column coordinates of all edge points of the local edge line, and calculates the center point coordinates of the local edge line through the row and column coordinates.

[0049] Sobel edge detection is an algorithm widely used in image processing that highlights edges in an image by calculating the spatial gradient of image brightness. Figure 2 As shown, the green circle is the center point of the local edge line.

[0050] S13, connecting the center points of the upper and lower local edge lines to form a first straight line, connecting the center points of the left and right local edge lines to form a second straight line, and determining the center point of the image according to the intersection of the first straight line and the second straight line.

[0051] See also Figure 3 As shown, the two blue straight lines are the first straight line and the second straight line, and the intersection point between the blue lines (the red circle in the center) is the center point of the image.

[0052] It is worth mentioning that Figure 3 The blue straight line and Figure 2 The green straight lines in the middle rectangular box overlap and can be considered as edge lines. That is to say, starting from the center point of the image and extending in four directions along the two blue straight lines are edge lines.

[0053] S2. According to the four edge lines and the center point of the image, four first rectangular areas are cut out, which have the corresponding edge lines as the center lines, the same length and width, and the same offset relative to the center point of the image;

[0054] Different from the second rectangular area mentioned above, the interception restriction of the first rectangular area is more stringent, see Figure 4 As shown, the first rectangular area is a narrower rectangular area, and the length and width of the four first rectangular areas are equal, and the edge line is used as the center line ( Figure 4 The green line in the figure), and the four first rectangular areas have the same offset relative to the center of the image. These limitations are mainly for the subsequent accurate evaluation of the focus state, and need to be kept consistent to a certain extent.

[0055] Preferably, for ease of processing, before intercepting the first rectangular area, the method further includes:

[0056] The inclination angle of the cross focus image relative to the horizontal line is calculated according to the first straight line and the second straight line; and the cross focus image is rotationally corrected according to the inclination angle, so that the cross focus image is horizontal.

[0057] S3. Calculate the total gradient strength of the four first rectangular areas and calculate the average of the total gradient strength. If the average of the total gradient strength is greater than a set threshold, it is determined that the camera is in clear focus.

[0058] In this embodiment, the gradient amplitude of each pixel in each first rectangular area is first calculated, and the gradient amplitudes of all pixels are summed to obtain the total gradient intensity of each first rectangular area; then the total gradient intensity average is calculated based on the total gradient intensity of the four first rectangular areas.

[0059] Specifically, this embodiment uses the Sobel operator to calculate the horizontal gradient component gx and the vertical gradient component gy of each pixel; then the gradient magnitude of each pixel is calculated according to the formula: sqrt(gx(:).^2+gy(:).^2). Finally, the gradient magnitudes of all pixels are summed to obtain the total gradient strength of the first rectangular area.

[0060] Wherein, gx: horizontal gradient component matrix calculated by applying Sobel operator, each element of which represents the horizontal gradient value of each pixel in the cropping area cropImg (the first rectangular area). The size of matrix gx is the same as cropImg.

[0061] gy: The vertical gradient component matrix calculated by applying the Sobel operator. Each element of it represents the vertical gradient value of each pixel in the crop region cropImg. The size of the matrix gy is the same as cropImg.

[0062] gx(:): Flattens the horizontal gradient matrix gx into a column vector. The flattening process arranges all elements in gx into a one-dimensional column vector in column-major order.

[0063] gy(:): Flattens the vertical gradient matrix gy into a column vector. The flattening process arranges all elements in gy into a one-dimensional column vector in column-major order.

[0064] It is worth noting that the threshold for evaluating the focus state of an image can be reasonably set according to actual conditions, and this embodiment does not impose any limitation thereto.

[0065] In addition, after calculating the total gradient strength of the four first rectangular areas, the horizontality of the machine can also be judged by the consistency of the total gradient strength, that is, the closer the four total gradient strengths are, the higher the horizontality of the machine, so that whether the machine is horizontal can be accurately evaluated based on this.

[0066] To summarize, the camera focus state evaluation method in the present application determines the four edge lines and the image center point of the collected cross focus image; based on the four edge lines and the image center point, four first rectangular areas with the corresponding edge lines as the center lines, the same length and width, and the same offset relative to the image center point are cut out; the total gradient intensity of the four first rectangular areas is calculated and the average of the total gradient intensity is calculated. If the average of the total gradient intensity is greater than the set threshold, it is judged that the camera is in clear focus.

[0067] That is, the application uses the center point of the image to ensure the consistency of the intercepted area, thereby reducing the impact of the working distance change on the evaluation result. At the same time, the accuracy and reliability of the focus state evaluation are further improved through the unified evaluation standard of the total gradient intensity of the area.

[0068] In a second aspect, an embodiment of the present application also provides a camera focus state evaluation device.

[0069] In one embodiment, referring to Figure 5 , Figure 5 This is a functional module diagram of an embodiment of a camera focus state evaluation device of the present application. Figure 5 As shown, the camera focus state evaluation device includes a calculation module, a capture module and a judgment module.

[0070] Wherein, a calculation module is used to determine four edge lines and an image center point of the collected cross focus image;

[0071] A cutting module, which is used to cut out four first rectangular areas with the corresponding edge lines as the center lines, the same length and width, and the same offset relative to the center of the image according to the four edge lines and the center of the image;

[0072] The judgment module is used to calculate the total gradient strength of the four first rectangular areas and calculate the average of the total gradient strength. If the average of the total gradient strength is greater than a set threshold, it is judged that the camera is in clear focus.

[0073] Furthermore, in one embodiment, the calculation module determines four edge lines and an image center point of the collected cross focus image, including:

[0074] A second rectangular area covering the edge line is intercepted in each of the four boundary areas of the cross focus image;

[0075] Identify the local edge line covered by each second rectangular area, and determine the coordinates of the center point of the local edge line;

[0076] A first straight line is formed by connecting the center points of the upper and lower local edge lines, and a second straight line is formed by connecting the center points of the left and right local edge lines. The center point of the image is determined according to the intersection of the first straight line and the second straight line.

[0077] Furthermore, in one embodiment, the calculation module identifies the local edge line covered by each second rectangular area and determines the coordinates of the center point of the local edge line, including:

[0078] Using Sobel edge detection on each second rectangular area, identifying the local edge line covered by each second rectangular area;

[0079] Get the row and column coordinates of all edge points of the local edge line, and calculate the coordinates of the center point of the local edge line through the row and column coordinates.

[0080] Furthermore, in one embodiment, the calculation module is also used for:

[0081] Calculating the inclination angle of the cross focus image relative to the horizontal line according to the first straight line and the second straight line;

[0082] The cross focus image is rotationally corrected according to the tilt angle.

[0083] Further, in one embodiment, the determination module calculates the total gradient strength of the four first rectangular areas and calculates the average of the total gradient strength, including:

[0084] Calculate the gradient magnitude of each pixel in each first rectangular area, and sum the gradient magnitudes of all pixels to obtain the total gradient magnitude of each first rectangular area;

[0085] The total gradient intensity average is calculated according to the total gradient intensity of the four first rectangular areas.

[0086] Furthermore, in one embodiment, the determination module calculates the gradient amplitude of each pixel in each first rectangular area, including:

[0087] Use the Sobel operator to calculate the horizontal and vertical gradient components of each pixel;

[0088] The gradient magnitude of each pixel is calculated based on the horizontal gradient component and the vertical gradient component.

[0089] Furthermore, in one embodiment, the judgment module is also used for:

[0090] By comparing whether the total gradient intensities of the four first rectangular areas are consistent, it is determined whether the machine for collecting the cross-focus image is level.

[0091] Among them, the functional implementation of each module in the above-mentioned camera focus state evaluation device corresponds to each step in the above-mentioned camera focus state evaluation method embodiment, and its functions and implementation processes are no longer repeated here one by one.

[0092] In a third aspect, an embodiment of the present application provides a camera focus state evaluation device, which may be a device with data processing function, such as a personal computer (PC), a laptop computer, or a server.

[0093] Reference Figure 6 , Figure 6Schematic diagram of the hardware structure of the camera focus state evaluation device involved in the embodiment of the present application. In the embodiment of the present application, the camera focus state evaluation device may include a processor, a memory, a communication interface and a communication bus.

[0094] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.

[0095] The communication interface includes an input / output (I / O) interface, a physical interface, and a logical interface, etc., which are used to interconnect the devices inside the camera focus state evaluation device, and an interface used to interconnect the camera focus state evaluation device with other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, an optical fiber interface, an ATM interface, etc.; the user device can be a display, a keyboard, etc.

[0096] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.

[0097] The processor may be a general-purpose processor, and the general-purpose processor may call the camera focus state evaluation program stored in the memory and execute the camera focus state evaluation method provided in the embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the camera focus state evaluation program is called may refer to the various embodiments of the camera focus state evaluation method of the present application, and will not be repeated here.

[0098] Those skilled in the art will understand that Figure 6 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0099] In a fourth aspect, an embodiment of the present application also provides a readable storage medium.

[0100] A camera focus state evaluation program is stored on the readable storage medium of the present application, wherein when the camera focus state evaluation program is executed by a processor, the steps of the camera focus state evaluation method as described above are implemented.

[0101] Among them, the method implemented when the camera focus state evaluation program is executed can refer to the various embodiments of the camera focus state evaluation method of the present application, and will not be repeated here.

[0102] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.

[0103] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.

[0104] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.

[0105] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.

[0106] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or. For example, A / B can mean A or B. The “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0107] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.

[0108] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A camera focus state evaluation method, characterized in that: The camera focus state evaluation method comprises: Determine four edge lines and the image center point of the acquired cross focus image; According to the four edge lines and the center point of the image, four first rectangular areas are cut out, which have the corresponding edge lines as the center lines, the same length and width, and the same offset relative to the center point of the image; The total gradient strength of the four first rectangular areas is calculated and the average of the total gradient strength is calculated. If the average of the total gradient strength is greater than a set threshold, it is determined that the camera is in clear focus.

2. The camera focus state evaluation method according to claim 1, characterized in that: The step of determining the four edge lines and the image center point of the acquired cross focus image includes: A second rectangular area covering the edge line is intercepted in each of the four boundary areas of the cross focus image; Identify the local edge line covered by each second rectangular area, and determine the coordinates of the center point of the local edge line; A first straight line is formed by connecting the center points of the upper and lower local edge lines, and a second straight line is formed by connecting the center points of the left and right local edge lines. The center point of the image is determined according to the intersection of the first straight line and the second straight line.

3. The camera focus state evaluation method according to claim 2, characterized in that: The identifying of the local edge lines covered by each second rectangular area and determining the coordinates of the center points of the local edge lines includes: Using Sobel edge detection on each second rectangular area, identifying the local edge line covered by each second rectangular area; Get the row and column coordinates of all edge points of the local edge line, and calculate the coordinates of the center point of the local edge line through the row and column coordinates.

4. The camera focus state evaluation method according to claim 2, characterized in that: Also includes: Calculating the inclination angle of the cross focus image relative to the horizontal line according to the first straight line and the second straight line; The cross focus image is rotationally corrected according to the tilt angle.

5. The camera focus state evaluation method according to claim 1, wherein: The step of calculating the total gradient strengths of the four first rectangular regions and calculating the total gradient strength mean value includes: Calculate the gradient magnitude of each pixel in each first rectangular area, and sum the gradient magnitudes of all pixels to obtain the total gradient magnitude of each first rectangular area; The total gradient intensity average is calculated according to the total gradient intensity of the four first rectangular areas.

6. The camera focus state evaluation method according to claim 5, characterized in that: The step of calculating the gradient magnitude of each pixel point in each first rectangular area includes: Use the Sobel operator to calculate the horizontal and vertical gradient components of each pixel; The gradient magnitude of each pixel is calculated based on the horizontal gradient component and the vertical gradient component.

7. The camera focus state evaluation method according to claim 1, wherein: Also includes: By comparing whether the total gradient intensities of the four first rectangular areas are consistent, it is determined whether the machine for collecting the cross-focus image is level.

8. A camera focus state evaluation device, characterized in that: The camera focus state evaluation device comprises: A calculation module, which is used to determine four edge lines and an image center point of the acquired cross focus image; A cutting module, which is used to cut out four first rectangular areas with the corresponding edge lines as the center lines, the same length and width, and the same offset relative to the center of the image according to the four edge lines and the center of the image; The judgment module is used to calculate the total gradient strength of the four first rectangular areas and calculate the average of the total gradient strength. If the average of the total gradient strength is greater than a set threshold, it is judged that the camera is in clear focus.

9. A camera focus state evaluation device, characterized in that: The camera focus state evaluation device includes a processor, a memory, and a camera focus state evaluation program stored in the memory and executable by the processor, wherein when the camera focus state evaluation program is executed by the processor, the steps of the camera focus state evaluation method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a camera focus state evaluation program, wherein when the camera focus state evaluation program is executed by a processor, the steps of the camera focus state evaluation method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Fisheye camera performance parameter test method and device, computer device and storage medium

    CN109194954A

  • Variable-step automatic focusing method and system

    CN109521547A

  • Automatic focusing method based on improved hill climbing method

    CN109739011A

  • Joint calibration method for laser radar and camera

    CN114140534A

  • Image focusing accuracy evaluation method and system

    CN114972084A