Image-based lens quality testing method, device, equipment and storage medium
Through the methods of image acquisition and circle center coordinate calculation, the problem of low accuracy in lens offset detection is solved, and the accuracy of lens quality testing is improved.
Patent Information
- Application Number
- CN202211566162.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-07
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2042-12-07
AI Technical Summary
The lens offsets in different directions, which affects the accuracy of the three-dimensional point cloud and the accuracy of lens offset detection is low.
The lens image is acquired through the image acquisition strategy, the center coordinates are extracted to calculate the offset standard deviation, and the system offset is generated to improve the accuracy of lens offset analysis.
The analysis accuracy of lens offset is improved, and the accuracy of lens quality testing is enhanced.
Smart Images

Figure CN115767084B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and in particular to an image-based lens quality testing method, device, equipment and storage medium. Background Art
[0002] In practical applications, industrial cameras are generally fixed on a gantry with the lens facing downward. However, in actual on-site applications, the lens must be mounted upward, which affects the accuracy of the collected 3D point cloud and produces large deviations. After investigating the cause, it was found that the lens can shift in different directions. It is necessary to find a method to quantify the lens offset and screen out lenses that meet the requirements.
[0003] Currently, the lens will produce a certain degree of jitter due to the influence of gravity sensing and changes in posture, resulting in low accuracy in detecting lens offset. Summary of the Invention
[0004] The present invention provides an image-based lens quality testing method, device, equipment and storage medium, which are used to improve the analysis accuracy of lens offset.
[0005] A first aspect of the present invention provides an image-based lens quality testing method, the image-based lens quality testing method comprising:
[0006] According to a preset image acquisition strategy, lens images of the target lens to be inspected are acquired to obtain multiple lens images;
[0007] Extracting multiple center coordinates of each lens image respectively, and calculating the offset standard deviation of each lens image according to the multiple center coordinates of each lens image;
[0008] The system offset of the target lens is generated according to the offset standard deviation of each lens image.
[0009] Optionally, in a first implementation of the first aspect of the present invention, the step of acquiring lens images of the target lens to be detected according to a preset image acquisition strategy to obtain multiple lens images includes:
[0010] Set image acquisition points based on preset image acquisition strategies;
[0011] Lens images of the target lens to be detected are collected according to the image collection points to obtain a plurality of lens images.
[0012] Optionally, in a second implementation of the first aspect of the present invention, extracting multiple center coordinates of each lens image respectively, and calculating the offset standard deviation of each lens image based on the multiple center coordinates of each lens image, includes:
[0013] Calculating the center coordinates of each of the lens images to obtain a plurality of center coordinates of each lens image;
[0014] generating target coordinate data of each lens image according to a plurality of circle center coordinates of each lens image;
[0015] The target coordinate data of each lens image is subjected to offset standard deviation calculation to obtain the offset standard deviation of each lens image.
[0016] Optionally, in a third implementation of the first aspect of the present invention, generating target coordinate data of each lens image according to multiple center coordinates of each lens image includes:
[0017] Extracting coordinate elements from a plurality of circle center coordinates of each lens image to obtain a plurality of first coordinate elements and a plurality of second coordinate elements of each lens image;
[0018] Performing an addition operation on a plurality of first coordinate elements of each lens image to obtain a first element data set, and performing an addition operation on a plurality of second coordinate elements of each lens image to obtain a second element data set;
[0019] Calculating the mean of the first element data set and the second element data set respectively to obtain a first coordinate mean and a second coordinate mean;
[0020] Target coordinate data of each lens image is generated according to the first coordinate mean and the second coordinate mean.
[0021] Optionally, in a fourth implementation of the first aspect of the present invention, calculating the offset standard deviation of the target coordinate data of each lens image to obtain the offset standard deviation of each lens image includes:
[0022] Calculating a plurality of first element differences of each lens image according to the plurality of first coordinate elements of each lens image and the first coordinate mean;
[0023] Calculating a plurality of second element differences of each lens image according to the plurality of second coordinate elements of each lens image and the second coordinate mean;
[0024] A variance operation is performed on a plurality of first element differences of each lens image and a plurality of second element differences of each lens image to obtain an offset standard deviation of each lens image.
[0025] Optionally, in a fifth implementation of the first aspect of the present invention, generating the system offset of the target lens according to the offset standard deviation of each lens image includes:
[0026] Add up the offset standard deviations of each lens image to obtain the total offset standard deviation;
[0027] Calculating the mean of the offset standard deviations on the offset standard deviation sum to obtain total standard deviation data;
[0028] A system offset of the target lens is generated according to the total standard deviation data.
[0029] A second aspect of the present invention provides an image-based lens quality testing device, the image-based lens quality testing device comprising:
[0030] An acquisition module is used to acquire lens images of the target lens to be detected according to a preset image acquisition strategy to obtain multiple lens images;
[0031] A processing module, configured to extract multiple center coordinates of each lens image respectively, and calculate an offset standard deviation of each lens image based on the multiple center coordinates of each lens image;
[0032] A generating module is used to generate the system offset of the target lens according to the offset standard deviation of each lens image.
[0033] Optionally, in a first implementation of the second aspect of the present invention, the acquisition module is specifically configured to:
[0034] Set image acquisition points based on preset image acquisition strategies;
[0035] Lens images of the target lens to be detected are collected according to the image collection points to obtain a plurality of lens images.
[0036] Optionally, in a second implementation of the second aspect of the present invention, the processing module further includes:
[0037] an extraction unit, configured to calculate the center coordinates of each of the plurality of lens images to obtain a plurality of center coordinates of each lens image;
[0038] a conversion unit, configured to generate target coordinate data of each lens image according to a plurality of circle center coordinates of each lens image;
[0039] The calculation unit is used to calculate the offset standard deviation of the target coordinate data of each lens image to obtain the offset standard deviation of each lens image.
[0040] Optionally, in a third implementation of the second aspect of the present invention, the conversion unit is specifically configured to:
[0041] Extracting coordinate elements from a plurality of circle center coordinates of each lens image to obtain a plurality of first coordinate elements and a plurality of second coordinate elements of each lens image;
[0042] Performing an addition operation on a plurality of first coordinate elements of each lens image to obtain a first element data set, and performing an addition operation on a plurality of second coordinate elements of each lens image to obtain a second element data set;
[0043] Calculating the mean of the first element data set and the second element data set respectively to obtain a first coordinate mean and a second coordinate mean;
[0044] Target coordinate data of each lens image is generated according to the first coordinate mean and the second coordinate mean.
[0045] Optionally, in a fourth implementation of the second aspect of the present invention, the computing unit is specifically configured to:
[0046] Calculating a plurality of first element differences of each lens image according to the plurality of first coordinate elements of each lens image and the first coordinate mean;
[0047] Calculating a plurality of second element differences of each lens image according to the plurality of second coordinate elements of each lens image and the second coordinate mean;
[0048] A variance operation is performed on a plurality of first element differences of each lens image and a plurality of second element differences of each lens image to obtain an offset standard deviation of each lens image.
[0049] Optionally, in a fifth implementation of the second aspect of the present invention, the generating module is specifically configured to:
[0050] Add up the offset standard deviations of each lens image to obtain the total offset standard deviation;
[0051] Calculating the mean of the offset standard deviations on the offset standard deviation sum to obtain total standard deviation data;
[0052] A system offset of the target lens is generated according to the total standard deviation data.
[0053] The third aspect of the present invention provides an image-based lens quality testing device, which includes: a metal frame, a camera and a calibration target; the metal frame is a frame made of external aluminum alloy, the camera is fixed on a crossbeam in the metal frame, and the calibration target is fixed on a cross plate opposite to the camera.
[0054] A fourth aspect of the present invention provides a computer-readable storage medium having instructions stored therein, which, when executed on a computer, enables the computer to execute the above-mentioned image-based lens quality testing method.
[0055] In the technical solution provided by the present invention, lens images of a target lens to be inspected are captured according to a preset image capture strategy to obtain multiple lens images; multiple center coordinates of each lens image are extracted respectively, and the offset standard deviation of each lens image is calculated based on the multiple center coordinates of each lens image; and the system offset of the target lens is generated based on the offset standard deviation of each lens image. The present invention improves the accuracy of lens calibration by setting multiple image capture points to capture multiple lens images, and obtains the final system standard deviation by calculating the offset standard deviation of each lens, thereby improving the analysis accuracy of the lens offset and thereby improving the accuracy of the lens quality test. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 1 is a schematic diagram of an embodiment of an image-based lens quality testing method according to an embodiment of the present invention;
[0057] Figure 2 Schematic diagram of an embodiment of an image-based lens quality testing device according to an embodiment of the present invention;
[0058] Figure 3 2 is a schematic diagram of another embodiment of an image-based lens quality testing device according to an embodiment of the present invention;
[0059] Figure 4 Schematic diagram of an embodiment of an image-based lens quality testing device in an embodiment of the present invention. DETAILED DESCRIPTION
[0060] Embodiments of the present invention provide an image-based lens quality testing method, apparatus, device, and storage medium for improving the accuracy of lens offset analysis. In the present specification, claims, and accompanying drawings, the terms "first," "second," "third," "fourth," and so forth (if any) are used to distinguish similar items and are not necessarily intended to describe a particular order or precedence. It should be understood that such terms are interchangeable where appropriate, such that the embodiments described herein can be implemented in an order other than that illustrated or described herein. Furthermore, the terms "including," "comprising," "having," and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, product, or apparatus.
[0061] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 An embodiment of the image-based lens quality testing method in the embodiment of the present invention includes:
[0062] 101. Capturing lens images of a target lens to be inspected according to a preset image acquisition strategy to obtain a plurality of lens images;
[0063] It is understandable that the execution subject of the present invention can be an image-based lens quality testing device, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking the server as the execution subject as an example.
[0064] Specifically, image acquisition points are set based on a preset image acquisition strategy; lens images of a target lens to be detected are acquired according to the image acquisition points to obtain a plurality of lens images.
[0065] The detection process includes the following steps:
[0066] (1) After loading the test lens onto the camera, adjust the aperture and focal length;
[0067] (2) Open the camera SDK software and take images of the front, back, left, right, top, and bottom positions;
[0068] (3) Open the lens detection software to check whether the lens is qualified and give the test results.
[0069] Specifically, the server draws corresponding stereoscopic fields of view based on the simulation parameters of each image acquisition point, and displays the image acquisition range and installation information of each image acquisition point in a three-dimensional virtual environment. According to the displayed image acquisition range of each image acquisition point, the server adjusts the installation parameters of each image acquisition point so that each image acquisition point is located at a corresponding priority configuration position, thereby obtaining a plurality of calibrated image acquisition points. According to the calibrated plurality of image acquisition points, lens images of the target lens to be detected are captured based on the calibrated plurality of image acquisition points to obtain a plurality of lens images.
[0070] 102. Extract multiple center coordinates of each lens image respectively, and calculate the offset standard deviation of each lens image based on the multiple center coordinates of each lens image;
[0071] Specifically, the center coordinates of multiple lens images are calculated respectively to obtain multiple center coordinates of each lens image; the target coordinate data of each lens image is generated according to the multiple center coordinates of each lens image; the offset standard deviation of the target coordinate data of each lens image is calculated to obtain the offset standard deviation of each lens image.
[0072] Among them, the preset center extraction function is called to extract the center coordinates of multiple lens images through the lens image data measured three times. Among them, the server pre-processes the lens image after spot sampling, and then performs polishing area matching and initial lens image estimation under the resolution of white light interferometer. Finally, the removal function is obtained with high precision, which solves the problem that the field of view of the white light interferometer is small and it is difficult to accurately match the lens image of the workpiece before and after spot sampling, and improves the accuracy of removal function extraction. It also improves the degree of automation of jet removal function extraction. It uses a highly universal algorithm to pre-process the lens image after spot sampling, match the spot sampling area, interpolate the initial lens image, and calculate the removal function, which greatly reduces the complexity of manual operation. The server then obtains the first coordinate information of the measurement point in the coordinate system from the specified area, and the second coordinate information of the measurement point in the second coordinate system. Based on the distance relationship between the specified point and multiple measurement points in the first coordinate system, and the distance relationship between the specified point and multiple measurement points in the second coordinate system, the coordinate information of the specified point in the second coordinate system is determined; each specified point has preset coordinate information in the first coordinate system; based on the preset coordinate information and the coordinate information of the specified point in the second coordinate system, the coordinate system conversion parameters between the first coordinate system and the second coordinate system are determined, and the offset standard deviation of the target coordinate data of each lens image is calculated to obtain the offset standard deviation of each lens image.
[0073] Optionally, coordinate elements are extracted from multiple center coordinates of each lens image to obtain multiple first coordinate elements and multiple second coordinate elements of each lens image; the multiple first coordinate elements of each lens image are added to obtain a first element data set, and the multiple second coordinate elements of each lens image are added to obtain a second element data set; the means of the first element data set and the second element data set are respectively calculated to obtain a first coordinate mean and a second coordinate mean; and the target coordinate data of each lens image is generated based on the first coordinate mean and the second coordinate mean.
[0074] The server's target image includes an element distribution map, and a pre-trained extraction model is used to extract element information from the element distribution map, where the element information includes the element type and coordinates. Compared to the prior art method of determining whether the target image contains a target element based on a pre-defined reference shape, this greatly improves the accuracy of element extraction and has better generalization. The server also extracts data with the same digit from multiple multiplication elements to generate input data, accumulates and adds the values of the multiplication-accumulation operation results, and stores the accumulated addition values in a data memory as the multiplication element for the next multiplication-accumulation operation to obtain the first coordinate mean and the second coordinate mean. Target coordinate data for each lens image is generated based on the first coordinate mean and the second coordinate mean.
[0075] Optionally, multiple first element differences of each lens image are calculated based on the multiple first coordinate elements and the first coordinate mean of each lens image; multiple second element differences of each lens image are calculated based on the multiple second coordinate elements and the second coordinate mean of each lens image; and variance operation is performed on the multiple first element differences of each lens image and the multiple second element differences of each lens image to obtain the offset standard deviation of each lens image.
[0076] Among them, the first coordinate element and the first coordinate mean are obtained for error removal processing, the time-frequency domain expression of the first coordinate element and the first coordinate mean after error removal and the weight of the time-frequency point are obtained, the weighted covariance matrix corresponding to the time-frequency point is obtained through the weight of the time-frequency point and the time-frequency domain expression, the weighted operation of the spatial spectrum is performed through the weighted covariance matrix to obtain the spatial spectrum of the first coordinate element and the first coordinate mean weighted according to the time-frequency point, and the multiple second element differences of each lens image are calculated according to the multiple second coordinate elements and the second coordinate mean of each lens image; the variance operation is performed on the multiple first element differences of each lens image and the multiple second element differences of each lens image to obtain the offset standard deviation of each lens image.
[0077] 103. Generate the system offset of the target lens according to the offset standard deviation of each lens image.
[0078] Specifically, the offset standard deviation of each lens image is summed to obtain the offset standard deviation sum; the offset standard deviation mean is calculated for the offset standard deviation sum to obtain total standard deviation data; and the system offset of the target lens is generated based on the total standard deviation data.
[0079] Among them, the mean, standard deviation and number of local population data of the offset standard deviation of each lens image are calculated, the mean of the collected data population is calculated according to the formula, the standard deviation of the population is calculated using the formula to obtain the total offset standard deviation, and the mean of the offset standard deviation is calculated for the total offset standard deviation to obtain the total standard deviation data; the system offset of the target lens is generated according to the total standard deviation data, which significantly reduces the amount of calculation. In addition, since there is no need to frequently read all the local populations stored in different locations, the actual calculation efficiency will be greatly improved.
[0080] In an embodiment of the present invention, lens images of a target lens to be inspected are captured according to a preset image capture strategy to obtain multiple lens images; multiple center coordinates of each lens image are extracted respectively, and the offset standard deviation of each lens image is calculated based on the multiple center coordinates of each lens image; and a system offset of the target lens is generated based on the offset standard deviation of each lens image. The present invention improves the accuracy of lens calibration by setting multiple image capture points to capture multiple lens images, and obtains a final system standard deviation by calculating the offset standard deviation of each lens, thereby improving the analysis accuracy of the lens offset and thereby improving the accuracy of the lens quality test.
[0081] The above describes the lens quality testing method based on an image in an embodiment of the present invention. The following describes the lens quality testing device based on an image in an embodiment of the present invention. Figure 2 In one embodiment of the present invention, an image-based lens quality testing device includes:
[0082] The acquisition module 201 is used to acquire lens images of the target lens to be detected according to a preset image acquisition strategy to obtain multiple lens images;
[0083] The processing module 202 is used to extract multiple center coordinates of each lens image respectively, and calculate the offset standard deviation of each lens image according to the multiple center coordinates of each lens image;
[0084] The generating module 203 is configured to generate a system offset of a target lens according to the offset standard deviation of each lens image.
[0085] In an embodiment of the present invention, lens images of a target lens to be inspected are captured according to a preset image capture strategy to obtain multiple lens images; multiple center coordinates of each lens image are extracted respectively, and the offset standard deviation of each lens image is calculated based on the multiple center coordinates of each lens image; and a system offset of the target lens is generated based on the offset standard deviation of each lens image. The present invention improves the accuracy of lens calibration by setting multiple image capture points to capture multiple lens images, and obtains a final system standard deviation by calculating the offset standard deviation of each lens, thereby improving the analysis accuracy of the lens offset and thereby improving the accuracy of the lens quality test.
[0086] See also Figure 3 Another embodiment of the image-based lens quality testing device in the embodiment of the present invention includes:
[0087] The acquisition module 201 is used to acquire lens images of the target lens to be detected according to a preset image acquisition strategy to obtain multiple lens images;
[0088] The processing module 202 is used to extract multiple center coordinates of each lens image respectively, and calculate the offset standard deviation of each lens image according to the multiple center coordinates of each lens image;
[0089] The generating module 203 is configured to generate the system offset of the target lens according to the offset standard deviation of each lens image.
[0090] Optionally, the acquisition module 201 is specifically configured to:
[0091] Set image acquisition points based on preset image acquisition strategies;
[0092] Lens images of the target lens to be detected are collected according to the image collection points to obtain a plurality of lens images.
[0093] Optionally, the processing module 202 further includes:
[0094] An extraction unit 2021 is configured to calculate the center coordinates of each of the plurality of lens images to obtain a plurality of center coordinates of each lens image;
[0095] A conversion unit 2022, configured to generate target coordinate data of each lens image according to a plurality of circle center coordinates of each lens image;
[0096] The calculation unit 2023 is used to calculate the offset standard deviation of the target coordinate data of each lens image to obtain the offset standard deviation of each lens image.
[0097] Optionally, the conversion unit 2022 is specifically configured to:
[0098] Extracting coordinate elements from a plurality of circle center coordinates of each lens image to obtain a plurality of first coordinate elements and a plurality of second coordinate elements of each lens image;
[0099] Performing an addition operation on a plurality of first coordinate elements of each lens image to obtain a first element data set, and performing an addition operation on a plurality of second coordinate elements of each lens image to obtain a second element data set;
[0100] Calculating the mean of the first element data set and the second element data set respectively to obtain a first coordinate mean and a second coordinate mean;
[0101] Target coordinate data of each lens image is generated according to the first coordinate mean and the second coordinate mean.
[0102] Optionally, the calculation unit 2023 is specifically configured to:
[0103] Calculating a plurality of first element differences of each lens image according to the plurality of first coordinate elements of each lens image and the first coordinate mean;
[0104] Calculating a plurality of second element differences of each lens image according to the plurality of second coordinate elements of each lens image and the second coordinate mean;
[0105] A variance operation is performed on a plurality of first element differences of each lens image and a plurality of second element differences of each lens image to obtain an offset standard deviation of each lens image.
[0106] Optionally, the generating module 203 is specifically configured to:
[0107] Add up the offset standard deviations of each lens image to obtain the total offset standard deviation;
[0108] Calculating the mean of the offset standard deviations on the offset standard deviation sum to obtain total standard deviation data;
[0109] A system offset of the target lens is generated according to the total standard deviation data.
[0110] In an embodiment of the present invention, lens images of a target lens to be inspected are captured according to a preset image capture strategy to obtain multiple lens images; multiple center coordinates of each lens image are extracted respectively, and the offset standard deviation of each lens image is calculated based on the multiple center coordinates of each lens image; and a system offset of the target lens is generated based on the offset standard deviation of each lens image. The present invention improves the accuracy of lens calibration by setting multiple image capture points to capture multiple lens images, and obtains a final system standard deviation by calculating the offset standard deviation of each lens, thereby improving the analysis accuracy of the lens offset and thereby improving the accuracy of lens quality testing.
[0111] above Figure 2 and Figure 3 The image-based lens quality testing device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The image-based lens quality testing device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0112] Figure 4 This is a structural schematic diagram of an image-based lens quality testing device provided by an embodiment of the present invention, wherein the image-based lens quality testing device includes: a metal frame, a camera, and a calibration target; the metal frame is a frame made of an external aluminum alloy, the camera is fixed on a crossbeam in the metal frame, and the calibration target is fixed on a cross plate opposite to the camera, wherein the top is a white solid circle with a black background.
[0113] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to execute the steps of the image-based lens quality testing method.
[0114] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0115] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0116] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A lens quality testing method based on an image, characterized in that: The image-based lens quality testing method includes: According to a preset image acquisition strategy, lens images of the target lens to be inspected are acquired to obtain multiple lens images; Extract multiple center coordinates of each lens image respectively, and calculate the offset standard deviation of each lens image according to the multiple center coordinates of each lens image; specifically include: respectively calculating the center coordinates of the multiple lens images to obtain multiple center coordinates of each lens image; extracting coordinate elements from the multiple center coordinates of each lens image to obtain multiple first coordinate elements and multiple second coordinate elements of each lens image; adding the multiple first coordinate elements of each lens image to obtain a first element data set, and adding the multiple second coordinate elements of each lens image to obtain a second element data set; respectively calculating the center coordinates of the multiple lens images to obtain multiple center coordinates of each lens image; extracting coordinate elements from the multiple center coordinates of each lens image to obtain multiple first coordinate elements and multiple second coordinate elements of each lens image; adding the multiple first coordinate elements of each lens image to obtain a first element data set, and adding the multiple second coordinate elements of each lens image to obtain a second element data set; respectively calculating the center coordinates of the multiple lens images to obtain multiple center coordinates of each lens image; performing mean calculation on the element data set and the second element data set to obtain a first coordinate mean and a second coordinate mean; generating target coordinate data for each lens image based on the first coordinate mean and the second coordinate mean; calculating a plurality of first element differences for each lens image based on a plurality of first coordinate elements of each lens image and the first coordinate mean; calculating a plurality of second element differences for each lens image based on a plurality of second coordinate elements of each lens image and the second coordinate mean; performing variance calculation on the plurality of first element differences for each lens image and the plurality of second element differences for each lens image to obtain an offset standard deviation for each lens image; The method comprises the steps of: generating a system offset of the target lens according to the offset standard deviation of each lens image; performing a sum operation on the offset standard deviation of each lens image to obtain a total offset standard deviation; calculating a mean of the offset standard deviation of the total offset standard deviation to obtain total standard deviation data; and generating the system offset of the target lens according to the total standard deviation data.
2. The image-based lens quality testing method according to claim 1, wherein: The lens image acquisition of the target lens to be detected is performed according to the preset image acquisition strategy to obtain multiple lens images, including: Set image acquisition points based on preset image acquisition strategies; Lens images of the target lens to be detected are collected according to the image collection points to obtain a plurality of lens images.
3. An image-based lens quality testing device, characterized in that: The image-based lens quality testing device comprises: An acquisition module is used to acquire lens images of the target lens to be detected according to a preset image acquisition strategy to obtain multiple lens images; The processing module is used to extract multiple center coordinates of each lens image respectively, and calculate the offset standard deviation of each lens image according to the multiple center coordinates of each lens image; specifically comprising: performing center coordinate calculation on the multiple lens images respectively to obtain multiple center coordinates of each lens image; performing coordinate element extraction on the multiple center coordinates of each lens image to obtain multiple first coordinate elements and multiple second coordinate elements of each lens image; performing addition operation on the multiple first coordinate elements of each lens image to obtain a first element data set, and performing addition operation on the multiple second coordinate elements of each lens image to obtain a second element data set; performing addition operation on the multiple first coordinate elements of each lens image respectively to obtain a first element data set; performing addition operation on the multiple second coordinate elements of each lens image respectively to obtain a second element data set. performing mean calculation on the first element data set and the second element data set to obtain a first coordinate mean and a second coordinate mean; generating target coordinate data for each lens image based on the first coordinate mean and the second coordinate mean; calculating a plurality of first element differences of each lens image based on a plurality of first coordinate elements of each lens image and the first coordinate mean; calculating a plurality of second element differences of each lens image based on a plurality of second coordinate elements of each lens image and the second coordinate mean; performing variance calculation on the plurality of first element differences of each lens image and the plurality of second element differences of each lens image to obtain an offset standard deviation of each lens image; The generation module is used to generate the system offset of the target lens according to the offset standard deviation of each lens image. The generation module specifically comprises: summing the offset standard deviations of each lens image to obtain a total offset standard deviation; calculating the mean of the offset standard deviations of the total offset standard deviations to obtain total standard deviation data; and generating the system offset of the target lens according to the total standard deviation data.
4. The image-based lens quality testing device according to claim 3, wherein: The acquisition module is specifically used for: Set image acquisition points based on preset image acquisition strategies; Lens images of the target lens to be detected are collected according to the image collection points to obtain a plurality of lens images.
5. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the image-based lens quality testing method according to claim 1 or 2 is implemented.
Citation Information
Patent Citations
Position compensation detection and correction method, camera module and manufacturing method thereof
CN112543321A