Camera lens focusing definition analysis method and system
By acquiring the checkerboard image and automatically determining the test area using the Geiger corner point detection algorithm, and performing clarity statistics in combination with the camera lens direction, the problem of inefficiency in camera focus debugging is solved, and efficient clarity evaluation is achieved.
Patent Information
- Application Number
- CN202510306360.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-07-29
AI Technical Summary
Existing camera focus debugging is inefficient, and existing definition analysis solutions rely on manual presetting of calculation areas, resulting in inefficient batch testing.
By obtaining the checkerboard image collected by the camera lens module to be tested, the corner points in the checkerboard image are detected using the Geiger corner point detection algorithm, the test area is determined based on the corner points, and the clarity index is calculated, and the segmentation statistics are performed based on the sagittal direction and meridian direction of the camera lens are automatically determined to determine the detection range.
It realizes automatic determination of the test area, obtains accurate focus clarity indicators, improves the efficiency of the camera production process, and can fully evaluate the clarity of the entire imaging field of vision.
Smart Images

Figure CN120390145A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technologies, and particularly to a method and system for analyzing the focus clarity of a camera lens. Background Art
[0002] In the camera production process, controlling the focus index is of great significance for production quality. The existing clarity analysis solutions calculate and evaluate the clarity by using the bright and dark edges in the image. The larger the calculated value, the clearer the image. However, the positioning of the bright and dark edges still relies on manually setting the calculation area in advance, resulting in low efficiency in the batch testing process, and there are also many unreasonable aspects in the subsequent statistical analysis of the calculated clarity, further slowing down the overall efficiency of the camera production process.
[0003] Currently, no effective solution has been proposed for the low efficiency problem existing in the existing camera focus debugging in related technologies. Summary of the Invention
[0004] Embodiments of this application provide a method and system for analyzing the focus clarity of a camera lens to at least solve the problem of low efficiency existing in the existing camera focus debugging in related technologies.
[0005] In a first aspect, embodiments of this application provide a method for analyzing the focus clarity of a camera lens, and the method includes:
[0006] Obtain a checkerboard image collected by a camera lens module to be tested;
[0007] Perform corner detection on the checkerboard image to obtain the corners of the checkerboard in the checkerboard image;
[0008] Based on the corners of the checkerboard, determine a test area from the checkerboard image, and calculate the clarity index of the test area;
[0009] Based on the sagittal direction and the meridional direction of the camera lens, perform a breakdown statistics on the clarity indexes of each test area to obtain the clarity index of the camera lens module to be tested after breakdown statistics.
[0010] In some embodiments, performing corner detection on the checkerboard image to obtain the corners of the checkerboard in the checkerboard image includes:
[0011] Perform corner detection on the checkerboard image through the Geiger corner detection algorithm to obtain the positions and arrangement orders of the corners of each checkerboard in the checkerboard image.
[0012] In some embodiments, determining a test area from the checkerboard image based on the corners of the checkerboard includes
[0013] Determine the pairwise adjacent corner points on the checkerboard according to the arrangement order of the corner points of the checkerboard;
[0014] Based on the positions of the pairwise adjacent corner points, calculate the center point between the two corner points, and take the center point as the center to determine the rotation matrix;
[0015] Calculate the minimum circumscribed matrix of the rotation matrix as the test area.
[0016] In some embodiments, based on the sagittal direction and the meridional direction of the camera lens, the clarity metrics of each test area are statistically segmented, and the clarity metrics of the camera lens module to be tested after segmentation statistics include:
[0017] Take the connecting line between the pairwise adjacent corner points corresponding to the test area as the bright-dark edge line, and calculate the included angle between the bright-dark edge line and the sagittal direction of the camera lens;
[0018] Based on the included angle, determine that the clarity metric of the test area is the clarity metric in the sagittal direction or the clarity metric in the meridional direction.
[0019] In some embodiments, taking the connecting line between the pairwise adjacent corner points corresponding to the test area as the bright-dark edge line, calculating the included angle between the bright-dark edge line and the sagittal direction of the camera lens includes:
[0020] Take the center point between the pairwise adjacent corner points corresponding to the test area as the center point of the test area; take the connecting line between the center point of the test area and the center point of the checkerboard image as the first line, and calculate the first included angle between the first line and the horizontal line of the checkerboard image;
[0021] Take the connecting line between the pairwise adjacent corner points corresponding to the test area as the bright-dark edge line, and calculate the second included angle between the bright-dark edge line and the horizontal line of the checkerboard image;
[0022] Based on the first included angle and the second included angle, calculate the included angle between the bright-dark edge line and the sagittal direction of the camera lens.
[0023] In some embodiments, based on the included angle, determining that the clarity metric of the test area is the clarity metric in the sagittal direction or the clarity metric in the meridional direction includes:
[0024] If the magnitude of the included angle is within the range of 0° to 15°, the clarity index of the test area is the clarity index in the sagittal direction of the camera lens; if the magnitude of the included angle is within the range of 75° to 90°, the clarity index of the test area is the clarity index in the meridional direction.
[0025] In some embodiments, calculating the clarity index of the test area includes:
[0026] By using the spatial frequency response algorithm, calculate the clarity index for all test areas, where the clarity index includes MTF30 value, MTF50 value, and MTF70 value.
[0027] In some embodiments, the method further includes:
[0028] Divide the checkerboard image into the upper left half area, the upper right half area, the lower left half area, and the lower right half area; according to the half area where each test area is located, conduct a breakdown statistics on the clarity index of the test area;
[0029] According to the distance between each test area and the center point of the checkerboard image, conduct a breakdown statistics on the clarity index of the test area.
[0030] In some embodiments, before obtaining the checkerboard image collected by the camera lens module to be tested, the method includes:
[0031] Install the camera lens module to be tested on the motion module, adjust the distance between the camera lens module to be tested and the checkerboard test module according to the preset test distance through the motion module, and collect the corresponding checkerboard image.
[0032] In a second aspect, an embodiment of the present application provides a camera lens focusing clarity analysis system, the system includes an acquisition module, a detection module, a calculation module, and a breakdown module;
[0033] The acquisition module is used to acquire the checkerboard image collected by the camera lens module to be tested;
[0034] The detection module is used to perform corner detection on the checkerboard image to obtain the corners of the checkerboard in the checkerboard image;
[0035] The calculation module is used to determine the test area from the checkerboard image according to the corners of the checkerboard, and calculate the clarity index of the test area;
[0036] The breakdown module is used to conduct a breakdown statistics on the clarity index of each test area according to the sagittal direction and meridional direction of the camera lens, and obtain the clarity index of the camera lens module to be tested after the breakdown statistics.
[0037] Compared with the related art, an analysis method and system for the focus clarity of a camera lens provided by an embodiment of the present application. Among them, the method includes obtaining a checkerboard image collected by a camera lens module to be tested; performing corner detection on the checkerboard image to obtain the corners of the checkerboard in the checkerboard image; determining a test area from the checkerboard image based on the corners of the checkerboard, and calculating the clarity index of the test area; performing sub - statistics on the clarity indexes of each test area based on the sagittal direction and the meridional direction of the camera lens to obtain the clarity index of the camera lens module to be tested after sub - statistics. It realizes the automatic determination of the test area based on corner detection, does not depend on the artificially preset detection range, can effectively obtain accurate focus clarity indexes, and the sub - statistics of the indexes in the sagittal direction and the meridional direction of the camera lens can comprehensively evaluate the clarity of the entire imaging field of view, helping to improve the efficiency of the camera production process and solving the problem of low efficiency in the existing camera focus debugging. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings described herein are used to provide a further understanding of the present application, and constitute a part of the present application. The schematic embodiments and descriptions thereof of the present application are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:
[0039] Figure 1 is a flowchart of the steps of the method for analyzing the focus clarity of a camera lens according to an embodiment of the present application;
[0040] Figure 2 is a schematic diagram of corner extraction according to an embodiment of the present application;
[0041] Figure 3 is a schematic diagram of determining the SFR test area according to an embodiment of the present application;
[0042] Figure 4 is a schematic diagram of sub - statistics of the clarity index according to an embodiment of the present application;
[0043] Figure 5 is a schematic diagram of the meridional direction and the sagittal direction of a camera lens according to an embodiment of the present application;
[0044] Figure 6 is a schematic diagram of further sub - statistics according to an embodiment of the present application;
[0045] Figure 7 is a schematic diagram of the internal structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0046] In order to make the objectives, technical solutions and advantages of the present application more clear and understandable, the present application will be described and explained below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments provided in the present application without creative efforts belong to the scope of protection of the present application.
[0047] Obviously, the accompanying drawings in the following description are only some examples or embodiments of the present application. For those of ordinary skill in the art, without creative efforts, the present application can also be applied to other similar scenarios based on these drawings. In addition, it can also be understood that although the efforts made in this development process may be complex and lengthy, for those of ordinary skill in the art related to the content disclosed in the present application, some design, manufacturing or production changes made on the basis of the technical content disclosed in the present application are only conventional technical means and should not be understood as the content disclosed in the present application being insufficient.
[0048] Referring to "embodiments" in the present application means that the specific features, structures or characteristics described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those of ordinary skill in the art explicitly and implicitly understand that the embodiments described in the present application can be combined with other embodiments without conflict.
[0049] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the ordinary meanings understood by those with ordinary skills in the technical field to which this application belongs. The words such as "a", "an", "one", "the" and the like involved in this application do not indicate a quantity limitation and may represent a singular or plural number. The terms "comprising", "including", "having" and any variations thereof involved in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or units, but may further include unlisted steps or units, or may further include other steps or units inherent to these processes, methods, products or devices. The words such as "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "plurality" involved in this application means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, "A and / or B" may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the front and back associated objects. The terms "first", "second", "third" and the like involved in this application are only used to distinguish similar objects and do not represent a specific order for the objects.
[0050] An embodiment of this application provides a method for analyzing the focus clarity of a camera lens. Figure 1 It is a flowchart of the steps of the method for analyzing the focus clarity of a camera lens according to an embodiment of this application, as Figure 1 shown, and the method includes:
[0051] Step S102, obtaining a checkerboard image collected by a camera lens module to be tested;
[0052] Specifically, in step S102, the camera lens module to be tested is installed on a motion module, and according to a preset test distance, the distance between the camera lens module to be tested and a checkerboard test module is adjusted through the motion module, and the corresponding checkerboard image is collected; then the collected checkerboard image is obtained.
[0053] It should be noted that the hardware used for analyzing the focus clarity of a camera lens includes a camera lens module to be tested, a motion module, and a test module including multiple checkerboard calibration plates.
[0054] Step S104, performing corner detection on the checkerboard image to obtain the corners of the checkerboard in the checkerboard image;
[0055] Specifically, in step S104, the checkerboard image is subjected to corner detection through the Geiger corner detection algorithm to obtain the positions and arrangement orders of the corners of each checkerboard in the checkerboard image.
[0056] Step S104 preferably, Figure 2 is a schematic diagram of corner point extraction according to an embodiment of the present application. As Figure 2 shown, using the Geiger corner point extraction method to obtain the positions of all corner points of multiple checkerboards in the field of view can better adapt to the situation where a single checkerboard covers insufficient area in the image during the long-distance or large-field-of-view focusing process of the camera, and multiple checkerboard plates need to be used;
[0057] It should be noted that the Geiger corner detection algorithm is mainly applied to the fields of computer vision and image processing. Corner points are points with significant changes in the image, usually located at the edges of objects or in areas with rich textures. The Geiger algorithm identifies these corner points by analyzing the gray level changes in local regions of the image. Specifically, using the Geiger corner detection algorithm to detect and obtain the positions of all corner points of the checkerboard in the image, and the arrangement order between the corner points can be further calculated.
[0058] Step S106, based on the corner points of the checkerboard, determine the test area from the checkerboard image, and calculate the clarity index of the test area;
[0059] Step S106 specifically includes the following steps:
[0060] Step S1061, according to the arrangement order of the corner points of the checkerboard, determine the two adjacent corner points on the checkerboard; based on the positions of the two adjacent corner points, calculate the center point between the two corner points, and taking the center point as the center, determine the rotation matrix; calculate the minimum circumscribed matrix of the rotation matrix as the test area.
[0061] Specifically for Step S1061, Figure 3 is a schematic diagram of determining the SFR test area according to an embodiment of the present application. As Figure 3 shown, taking the center point between two adjacent corner points on the checkerboard as the center, determine a rotation rectangle with an aspect ratio of 0.8 and a rotation angle of the direction of the straight line connecting the two corner points, and calculate the minimum circumscribed rectangle of the rotation rectangle, and use the minimum circumscribed rectangle as a single SFR test area.
[0062] Step S1062, through the spatial frequency response algorithm, calculate the clarity index for all test areas, where the clarity index includes MTF30 value, MTF50 value, and MTF70 value.
[0063] Specifically for Step S1062, use the SFR algorithm to calculate MTF30, MTF50, MTF70, etc. for all test areas, which are the clarity indexes of the test areas.
[0064] It should be noted that the SFR (Spatial Frequency Response) algorithm is used to calculate the MTF (Modulation Transfer Function) values, such as MTF30, MTF50, MTF70, etc. MTF30, MTF50, and MTF70 respectively represent the spatial frequencies (usually expressed in cycles per pixel or line pairs per millimeter) corresponding to when the spatial frequency response drops to 30%, 50%, and 70% of its low-frequency value. Among them, MTF50 is more commonly used because it can well balance the performance of resolution and contrast; while MTF30 more reflects the ability of the lens to capture fine details, and MTF70 focuses on coarser structures. Repeating the above process for each test area can obtain the MTF distribution within the entire image plane, helping to evaluate the performance of the lens within the entire field of view.
[0065] Step S108: Based on the sagittal direction and meridional direction of the camera lens, perform a breakdown and statistics on the clarity index of each test area to obtain the clarity index of the camera lens module to be tested after the breakdown and statistics.
[0066] Step S108 specifically includes the following steps:
[0067] Step S1081: Use the connecting line between two adjacent corner points corresponding to the test area as the bright-dark edge line, and calculate the included angle between the bright-dark edge line and the sagittal direction of the camera lens.
[0068] Specifically, in step S1081, Figure 4 is a schematic diagram of the breakdown and statistics of the clarity index according to the embodiment of the present application. As Figure 4 shown, use the center point between two adjacent corner points corresponding to the test area as the center point of the test area; use the connecting line between the center point of the test area and the center point of the checkerboard image as the first straight line, and calculate the first included angle between the first straight line and the horizontal line of the checkerboard image; as Figure 4 shown, use the connecting line between two adjacent corner points corresponding to the test area as the bright-dark edge line, and calculate the second included angle between the bright-dark edge line and the horizontal line of the checkerboard image; as Figure 4 shown, based on the first included angle and the second included angle, calculate the included angle between the bright-dark edge line and the sagittal direction of the camera lens.
[0069] Step S1082: Based on the included angle, determine that the clarity index of the test area is the clarity index in the sagittal direction or the clarity index in the meridional direction.
[0070] Specifically, in step S1082, if the included angle is within the range of 0° to 15°, the clarity index of the test area is the clarity index in the sagittal direction of the camera lens; if the included angle is within the range of 75° to 90°, the clarity index of the test area is the clarity index in the meridional direction.
[0071] It should be noted that Figure 5 is a schematic diagram of the meridional direction and sagittal direction of the camera lens according to an embodiment of the present application, as Figure 5 shown, the meridional direction refers to the plane formed by the field point and the chief ray, that is, the direction perpendicular to the radius of the lens lens. The focal position formed by the light rays in the meridional direction after passing through the optical system may be different from the focal position in the ideal case, and this deviation causes blurring of the image in this direction. The sagittal direction refers to the direction perpendicular to the meridional plane, that is, the direction parallel to the radius of the lens lens. The light rays also cannot accurately focus on the ideal focal position in this direction, resulting in image blurring.
[0072] Due to the aberration phenomenon, when deviating from the image field center, the clarity performance of the image in the meridional direction and sagittal direction is not consistent. Therefore, step S108 further subdivides and statistically analyzes the clarity index according to the meridional direction and sagittal direction, which can obtain more accurate test results to improve the efficiency of the subsequent camera production process.
[0073] Through steps S102 to S108 in the above embodiments, using the Geiger corner extraction method to obtain the positions of all corner points of multiple checkerboards in the field of view can better adapt to the situation where a single checkerboard has insufficient coverage area in the image during the long-distance or large-field-of-view focusing process of the camera and multiple checkerboard plates need to be used; extracting the SFR calculation area using the corner point group with a known arrangement order obtained by the Geiger corner extraction method can be completely independent of the detection area pre-set by humans; further statistically analyzing the SFR calculation results can obtain the clarity index distribution in the sagittal direction and meridional direction (Meridional) in the field of view of the camera, and can completely evaluate the clarity of the entire imaging field of view.
[0074] In some of these embodiments, in addition to step S108 in the above embodiments that subdivides and statistically analyzes the clarity index based on the sagittal direction and meridional direction of the camera lens, Figure 6 is a schematic diagram of further subdivision and statistical analysis according to an embodiment of the present application, as Figure 6 shown, the method further includes:
[0075] Step S109: Divide the checkerboard image into the upper left half area, the upper right half area, the lower left half area, and the lower right half area; according to the half area where each test area is located, conduct a breakdown statistics on the clarity index of the test area.
[0076] Step S110: According to the distance between each test area and the center point of the checkerboard image (such as 5%, 20%, 40%, 60%, 80%), conduct a breakdown statistics on the clarity index of the test area.
[0077] It should be noted that through the above embodiments, based on the automatic extraction of the SFR test areas of multiple small-sized checkerboard test boards within the field of view, and by conducting a detailed statistics on the test results according to three categories: the percentage distance to the image center point, image partitioning, and sagittal direction and meridional direction, it is possible to obtain accurate, full-field-of-view-covered, and low-cost focus test results.
[0078] Furthermore, it should be noted that the steps shown in the above process or the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0079] The embodiment of the present application provides a camera lens focus clarity analysis system, which includes an acquisition module, a detection module, a calculation module, and a breakdown module;
[0080] The acquisition module is used to acquire the checkerboard image collected by the camera lens module to be tested;
[0081] The detection module is used to perform corner detection on the checkerboard image to obtain the corners of the checkerboard in the checkerboard image;
[0082] The calculation module is used to determine the test area from the checkerboard image according to the corners of the checkerboard, and calculate the clarity index of the test area;
[0083] The breakdown module is used to conduct a breakdown statistics on the clarity index of each test area according to the sagittal direction and meridional direction of the camera lens, and obtain the clarity index of the camera lens module to be tested after the breakdown statistics.
[0084] Through the acquisition module, detection module, calculation module, and breakdown module in the embodiment of the present application, the automatic determination of the test area based on corner detection is realized, without relying on manual pre-setting of the detection range, and it can effectively obtain accurate focus clarity indicators. Moreover, the breakdown statistics of the indicators in the sagittal direction and meridional direction of the camera lens can comprehensively evaluate the clarity of the entire imaging field of view, help improve the efficiency of the camera production process, and solve the problem of low efficiency in existing camera focus debugging.
[0085] It should be noted that each of the above modules can be a functional module or a program module, and can be implemented either by software or by hardware. For the modules implemented by hardware, each of the above modules can be located in the same processor; or each of the above modules can also be located in different processors in any combined form.
[0086] This embodiment also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0087] Optionally, the above electronic device may further include a transmission device and an input / output device. Among them, the transmission device is connected to the above processor, and the input / output device is connected to the above processor.
[0088] It should be noted that the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and will not be elaborated herein.
[0089] In addition, in combination with the camera lens focus clarity analysis method in the above embodiments, an embodiment of the present application can provide a storage medium to implement. A computer program is stored on the storage medium; when the computer program is executed by a processor, any one of the camera lens focus clarity analysis methods in the above embodiments is implemented.
[0090] In one embodiment, a computer device is provided. The computer device may be a terminal. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a camera lens focus clarity analysis method is implemented. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device may be a touch layer covered on the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, a touchpad, or a mouse, etc.
[0091] In one embodiment, Figure 7 is a schematic internal structure diagram of an electronic device according to an embodiment of the present application. As Figure 7 shown, an electronic device is provided. The electronic device may be a server, and its internal structure diagram may be asFigure 7 As shown. The electronic device includes a processor, a network interface, an internal memory, and a non-volatile memory connected by an internal bus. Among them, the non-volatile memory stores an operating system, a computer program, and a database. The processor is used to provide computing and control capabilities. The network interface is used to communicate with an external terminal through a network connection. The internal memory is used to provide an environment for the operation of the operating system and the computer program. The computer program, when executed by the processor, implements a method for analyzing the focus clarity of a camera lens. The database is used to store data.
[0092] Those skilled in the art can understand that Figure 7 the structure shown in [figure reference] is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine some components, or have a different component arrangement.
[0093] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it may include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application may include non-volatile and / or volatile memories. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or an external cache. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0094] Those skilled in the art should understand that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0095] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.
Claims
1. A method for analyzing the focus clarity of a camera lens, characterized in that, The method includes: Obtaining a checkerboard image collected by a camera lens module to be tested; Performing corner detection on the checkerboard image to obtain the corners of the checkerboard in the checkerboard image; Based on the corners of the checkerboard, determining a test area from the checkerboard image and calculating a clarity index of the test area; Based on the sagittal direction and the meridional direction of the camera lens, performing sub - statistics on the clarity indices of each test area to obtain the clarity index of the camera lens module to be tested after sub - statistics.
2. The method according to claim 1, characterized in that, Performing corner detection on the checkerboard image to obtain the corners of the checkerboard in the checkerboard image includes: Performing corner detection on the checkerboard image through the Geiger corner detection algorithm to obtain the positions and arrangement orders of the corners of each checkerboard in the checkerboard image.
3. The method according to claim 2, wherein Based on the corners of the checkerboard, determining a test area from the checkerboard image includes Determining two adjacent corners on the checkerboard according to the arrangement order of the corners of the checkerboard; Based on the positions of the two adjacent corners, calculating the center point between the two corners, and taking the center point as the center to determine a rotation matrix; Calculating the minimum circumscribed matrix of the rotation matrix as the test area.
4. The method according to claim 3, characterized in that, Based on the sagittal direction and the meridional direction of the camera lens, performing sub - statistics on the clarity indices of each test area to obtain the clarity index of the camera lens module to be tested after sub - statistics includes: Taking the connecting line between the two adjacent corners corresponding to the test area as the bright - dark edge line, and calculating the included angle between the bright - dark edge line and the sagittal direction of the camera lens; Based on the included angle, determining that the clarity index of the test area is the clarity index in the sagittal direction or the clarity index in the meridional direction of the camera lens.
5. The method according to claim 4, wherein Taking the connecting line between the two adjacent corners corresponding to the test area as the bright - dark edge line, and calculating the included angle between the bright - dark edge line and the sagittal direction of the camera lens includes: Taking the center point between the two adjacent corners corresponding to the test area as the center point of the test area; taking the connecting line between the center point of the test area and the center point of the checkerboard image as the first line, and calculating the first included angle between the first line and the horizontal line of the checkerboard image; Taking the connecting line between the two adjacent corners corresponding to the test area as the bright - dark edge line, and calculating the second included angle between the bright - dark edge line and the horizontal line of the checkerboard image; Based on the first included angle and the second included angle, calculating the included angle between the bright - dark edge line and the sagittal direction of the camera lens.
6. The method according to claim 4, characterized in that, Based on the included angle, determining that the clarity index of the test area is the clarity index in the sagittal direction or the clarity index in the meridional direction of the camera lens includes: If the magnitude of the included angle is within the range of 0° to 15°, the clarity index of the test area is the clarity index in the sagittal direction of the camera lens; if the magnitude of the included angle is within the range of 75° to 90°, the clarity index of the test area is the clarity index in the meridional direction of the camera lens.
7. The method according to claim 1, characterized in that, Calculating the clarity index of the test area includes: Calculating the clarity index for all test areas through the spatial frequency response algorithm, where the clarity index includes the MTF30 value, the MTF50 value, and the MTF70 value.
8. The method according to claim 1, wherein The method further includes: Dividing the checkerboard image into the upper left half area, the upper right half area, the lower left half area, and the lower right half area; and performing a breakdown and statistics on the clarity index of the test area according to the half area where each test area is located. Performing a breakdown and statistics on the clarity index of the test area according to the distance between each test area and the center point of the checkerboard image.
9. The method according to claim 1, wherein Before obtaining the checkerboard image collected by the camera lens module to be tested, the method includes: Installing the camera lens module to be tested on the motion module, and according to the preset test distance, adjusting the distance between the camera lens module to be tested and the checkerboard test module through the motion module, and collecting the corresponding checkerboard image.
10. A camera lens focus clarity analysis system, characterized in that, The system includes an acquisition module, a detection module, a calculation module, and a breakdown module; The acquisition module is used to acquire the checkerboard image collected by the camera lens module to be tested; The detection module is used to perform corner detection on the checkerboard image to obtain the corners of the checkerboard in the checkerboard image; The calculation module is used to determine the test area from the checkerboard image according to the corners of the checkerboard, and calculate the clarity index of the test area; The breakdown module is used to perform a breakdown and statistics on the clarity index of each test area according to the sagittal direction and the meridional direction of the camera lens, and obtain the clarity index of the camera lens module to be tested after the breakdown and statistics.
Citation Information
Cited By
Microscope camera imaging virtual focus detection method and system based on calibration plate
CN121540394A