Optical center testing method, optical center testing device and electronic equipment

Through the inverse distortion correction method, the Euro-type distance of characteristic points is identified and calculated, the inverse distortion distance coefficient is generated, the image is transformed into the inverse distortion image domain, and the optical center is iteratively determined, which solves the problem of low accuracy of traditional optical center tests and improves the accuracy of optical center tests.

CN114677441BActive Publication Date: 2025-08-12YUYAO SUNNY OPTICAL INTELLIGENCE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210358537.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-11-20
Filing Date
2022-04-06
Publication Date
2025-08-12
Estimated Expiration
2042-04-06

AI Technical Summary

Technical Problem

The traditional optical center testing method has low accuracy, which affects the image's true characteristics reflection of the subject, and is limited by the light source uniformity and the calibration accuracy of the measurement system.

Method used

Through anti-distortion correction, we obtain the test plate image, identify feature points, calculate the Euro-style distance, generate the inverse distortion distance coefficient, transform the image into the inverse distortion image domain, and iteratively determine the final optical center.

Benefits of technology

It improves the accuracy of the photocenter test, reduces image distortion, and enhances the accuracy of the alignment between the photocenter and the center of the photosensitive chip.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114677441B_ABST
    Figure CN114677441B_ABST
Patent Text Reader

Abstract

Disclosed are an optical center testing method, an optical center testing device, and an electronic device. The optical center testing method first acquires a target image of a test target, wherein the test target includes multiple feature points spaced equally apart. Next, the target image is transformed into an anti-distortion image domain to correct the image through anti-distortion correction. Finally, a final optical center is determined by evaluating and verifying a preset optical center. Thus, the optical center testing method improves the accuracy of the optical center test through anti-distortion correction and establishes an evaluation method for evaluating the accuracy of the preset optical center, further improving the accuracy of the optical center test.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of camera modules, and more specifically to an optical center testing method, an optical center testing device, and electronic equipment for camera modules. Background Art

[0002] With the popularization of mobile electronic devices, the relevant technologies of camera modules used in mobile electronic devices to help users obtain images (for example, videos or pictures) have developed and progressed rapidly. In recent years, camera modules have been widely used in many fields such as medical care, security, and industrial production.

[0003] The optical system of the camera module mainly includes an optical lens and a photosensitive chip. The imaging light passes through the optical lens of the optical lens and reaches the photosensitive chip. After receiving the imaging light, the photosensitive area of the photosensitive chip converts the light signal into an electrical signal and forms an image through the imaging circuit.

[0004] During the imaging process, the optical center of the camera module (the optical center of the optical lens) must be aligned with the center of the photosensitive area of the photosensitive chip. A misalignment of the optical center can lead to problems such as partial loss of the initial image and shifted positions of characteristic features. Consequently, the accuracy of the optical center test affects how well the image reflects the true characteristics of the subject. However, traditional optical center testing methods suffer from low accuracy.

[0005] Therefore, a new optical center testing method is expected to improve the accuracy of optical center testing. Summary of the Invention

[0006] One advantage of the present application is that it provides an optical center testing method, an optical center testing device, and an electronic device, wherein the optical center testing method improves the accuracy of the optical center testing by means of anti-distortion correction.

[0007] Another advantage of the present application is that it provides an optical center testing method, an optical center testing device and an electronic device, wherein the optical center testing method constructs an evaluation method for evaluating the accuracy of a preset optical center, and the evaluation method can be used to determine the final optical center to improve the accuracy of the optical center test.

[0008] In order to achieve at least one of the above advantages or other advantages and purposes, according to one aspect of the present application, an optical center testing method is provided, which includes:

[0009] Step 1: Acquire a target image of a test target, wherein the test target includes a plurality of feature points with equal spacing between them;

[0010] Step 2: Identify the plurality of feature points from the target image;

[0011] Step 3: Preset an optical center and calculate the Euclidean distances between the optical center and the multiple feature points respectively;

[0012] Step 4: generating an anti-distortion distance coefficient based on the Euclidean distance between the optical center and the plurality of feature points;

[0013] Step 5: transforming the target image into an anti-distortion image domain based on the Euclidean distance between the optical center and the plurality of feature points and the anti-distortion distance coefficient, so as to obtain anti-distortion coordinates corresponding to the plurality of feature points in the anti-distortion image domain respectively;

[0014] Step 6: generating a feature value representing the uniformity of distribution of the plurality of feature points in the dedistorted image domain based on the Euclidean distance between each feature point in the dedistorted image domain and other feature points; and

[0015] Step 7: Preset a new optical center and iteratively execute steps 3 to 6 to obtain multiple eigenvalues, and determine the optical center corresponding to the smallest of the multiple eigenvalues as the final optical center.

[0016] In the optical center testing method according to the present application, based on the Euclidean distance between each feature point of the multiple feature points and other feature points in the anti-distortion image domain, a characteristic value for representing the distribution uniformity of the multiple feature points in the anti-distortion image domain is generated, including: determining a plurality of first spacing characterization values based on the Euclidean distance between each feature point of the multiple feature points and at least two other feature points in the anti-distortion image domain, wherein each first spacing characterization value is used to represent the average level of the Euclidean distance between each feature point in the test group formed by the at least two other feature points in the anti-distortion image domain; determining a plurality of second spacing characterization values based on the plurality of first spacing characterization values, wherein each second spacing characterization value is used to represent the difference between every two of the first spacing characterization values; and determining a characteristic value for representing the distribution uniformity of the multiple feature points in the anti-distortion image domain based on the plurality of second spacing characterization values.

[0017] In the optical center testing method according to the present application, each of the first distance characterization values is a median value of at least two distances between each feature point in the anti-distortion image domain and at least two other feature points.

[0018] In the optical center testing method according to the present application, each of the second spacing characterization values is the absolute value of the difference between every two of the first spacing characterization values.

[0019] In the optical center testing method according to the present application, the characteristic value is the minimum value among the multiple second spacing characterization values.

[0020] In the optical center testing method according to the present application, the characteristic value is an average value of the multiple second spacing characterization values.

[0021] In the optical center testing method according to the present application, the coordinates of the i-th feature point are (Xi, Yi), the coordinates of the preset optical center are (Cx, Cy), an optical center is preset and the Euclidean distances between the optical center and the multiple feature points are calculated respectively, including: calculating the Euclidean distances between the optical center and the multiple feature points using the following formula: Di = sqrt((Xi–Cx)*(Xi–Cx)+(Yi–Cy)*(Yi–Cy)), wherein Di represents the Euclidean distance between the optical center and the i-th feature point; wherein, Based on the Euclidean distance between the optical center and the multiple feature points, an anti-distortion distance coefficient is generated, including: calculating the anti-distortion distance coefficient using the following formula, the formula being: Ri = abs((K1*pow(Di,(n-1))+K2*pow(Di,(n-2))+……+K(n-1)*pow(Di,1)+Kn), wherein Ri represents the i-th anti-distortion distance coefficient corresponding to the Euclidean distance between the optical center and the i-th feature point, and K1, K2, …, K(n-1), and Kn represent n anti-distortion parameters.

[0022] According to another aspect of the present application, an optical center testing device is provided, comprising:

[0023] An image acquisition unit, configured to execute step 1: acquiring a target image of a test target, wherein the test target includes a plurality of feature points that are equally spaced from each other;

[0024] A feature point recognition unit, configured to perform step 2: recognizing the plurality of feature points from the target image;

[0025] The first distance determining unit is configured to execute step 3: presetting an optical center and respectively calculating the Euclidean distances between the optical center and the plurality of feature points;

[0026] A second distance determining unit is configured to perform step 4: generating an anti-distortion distance coefficient based on the Euclidean distance between the optical center and the plurality of feature points;

[0027] an image domain transformation unit, configured to perform step 5: transforming the target image into an anti-distortion image domain based on the Euclidean distance between the optical center and the plurality of feature points and the anti-distortion distance coefficient, so as to respectively obtain anti-distortion coordinates corresponding to the plurality of feature points in the anti-distortion image domain;

[0028] an evaluation unit, configured to perform step 6: generating a feature value representing a degree of uniformity of distribution of the plurality of feature points in the dedistorted image domain based on a Euclidean distance between each feature point in the plurality of feature points and other feature points in the dedistorted image domain; and

[0029] The verification unit is used to execute step 7: preset a new optical center and iteratively execute steps 3 to 6 to obtain multiple eigenvalues, and determine the optical center corresponding to the smallest one among the multiple eigenvalues as the final optical center.

[0030] In the optical center testing device according to the present application, the evaluation unit is further used to: determine a plurality of first spacing characterization values based on the Euclidean distance between each feature point of the plurality of feature points and at least two other feature points in the anti-distortion image domain, wherein each first spacing characterization value is used to characterize the average level of the Euclidean distance between each feature point in the test group formed by the at least two other feature points in the anti-distortion image domain; determine a plurality of second spacing characterization values based on the plurality of first spacing characterization values, wherein each second spacing characterization value is used to characterize the difference between each two first spacing characterization values; and determine a characteristic value used to represent the uniformity of the distribution of the plurality of feature points in the anti-distortion image domain based on the plurality of second spacing characterization values.

[0031] According to another aspect of the present application, there is provided an electronic device, comprising:

[0032] Memory; and

[0033] A processor, wherein computer program instructions are stored in the memory, and when the computer program instructions are executed by the processor, the processor executes the optical center testing method as described above.

[0034] Further objectives and advantages of the present application will be fully reflected through understanding of the following description and drawings.

[0035] These and other objects, features and advantages of the present application are fully reflected in the following detailed description, drawings and claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] These and / or other aspects and advantages of the present application will become more clear and easier to understand from the following detailed description of the embodiments of the present application in conjunction with the accompanying drawings, in which:

[0037] Figure 1 The figure illustrates a flow chart of an optical center testing method according to an embodiment of the present application.

[0038] Figure 2 FIG2 is a schematic diagram of a target according to an embodiment of the present application.

[0039] Figure 3 FIG2 is a schematic diagram of a target image according to an embodiment of the present application.

[0040] Figure 4 A schematic diagram of an ideal anti-distorted image according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0041] The following description is intended to disclose the present application so that those skilled in the art can implement the present application. The embodiments described below are for illustrative purposes only, and those skilled in the art may conceive of other obvious variations. The basic principles of the present application defined in the following description may be applied to other embodiments, variations, improvements, equivalents, and other technical solutions that do not depart from the spirit and scope of the present application.

[0042] Application Overview

[0043] As mentioned above, during the imaging process, the optical center of the camera module (the optical center of the optical lens) must be aligned with the center of the photosensitive area of the photosensitive chip. A shift in the optical center can lead to problems such as partial loss of the initial image and positional shifts in characteristic features. Accordingly, the accuracy of the optical center test affects how well the image reflects the true characteristics of the subject. However, traditional optical center testing methods suffer from low test accuracy.

[0044] Specifically, traditional optical center testing methods mainly include the light source method and the mark method. The light source method mainly determines the optical center of the camera module by determining the point of strongest light sensitivity on the photosensitive chip. The mark method mainly determines the optical center of the camera module by determining the center of the characteristic point of the target image and the corresponding position of the photosensitive chip.

[0045] The light source method is limited by the uniformity of the incident light. When the incident light is uneven, the optical center, determined by the point where the light sensor has the strongest light, is less accurate. Furthermore, the light source method is limited by the test distance. When the test target is farther away, the optical center becomes more difficult to measure and its accuracy decreases.

[0046] The mark method is limited by the prior calibration of the measurement system used to test the optical center, and requires extremely high positional accuracy from the measurement system. For example, planar offsets and angular deviations between the test platform and the target plate of the test system can significantly affect the test results. Furthermore, in practical applications, due to the inherent characteristics of the camera module's optical lens, the initial image captured by the camera module is inevitably distorted, resulting in image distortion. This further reduces the accuracy of the camera module's optical center, determined by the corresponding position of the center of the target image's feature points and the photosensitive chip.

[0047] The inventors of the present application perform distortion correction on the initial image through inverse distortion correction to obtain an image that can reflect the real features of the subject as much as possible, and determine the position of the optical center to improve the test accuracy of the optical center.

[0048] Based on this, the present application proposes an optical center testing method, which includes: step 1: obtaining a target plate image of a test target plate, wherein the test target plate includes a plurality of feature points with equal spacing between each other; step 2: identifying the plurality of feature points from the target plate image; step 3: presetting an optical center and calculating the Euclidean distances between the optical center and the plurality of feature points respectively; step 4: generating an anti-distortion distance coefficient based on the Euclidean distances between the optical center and the plurality of feature points; step 5: generating an anti-distortion distance coefficient based on the Euclidean distances between the optical center and the plurality of feature points and the anti-distortion distance coefficient. The target image is transformed into an anti-distortion image domain to respectively obtain anti-distortion coordinates corresponding to the multiple feature points in the anti-distortion image domain; Step 6: Based on the Euclidean distance between each feature point of the multiple feature points and other feature points in the anti-distortion image domain, generate a eigenvalue for representing the uniformity of distribution of the multiple feature points in the anti-distortion image domain; and Step 7: Preset a new optical center and iteratively execute Steps 3 to 6 to obtain multiple eigenvalues, and determine the optical center corresponding to the smallest of the multiple eigenvalues as the final optical center.

[0049] In addition, the present application also provides an optical center testing device, which includes: an image acquisition unit, used to perform step 1: obtain a target plate image of a test target plate, wherein the test target plate includes a plurality of feature points with equal spacing between each other; a feature point recognition unit, used to perform step 2: recognize the plurality of feature points from the target plate image; a first distance determination unit, used to perform step 3: preset an optical center and respectively calculate the Euclidean distances between the optical center and the plurality of feature points; a second distance determination unit, used to perform step 4: generate an anti-distortion distance coefficient based on the Euclidean distances between the optical center and the plurality of feature points; an image domain transformation unit, used to perform step 5: generate an anti-distortion distance coefficient based on the Euclidean distances between the optical center and the plurality of feature points; The target image is transformed into an anti-distortion image domain by using the Euclidean distance between the feature points and the anti-distortion distance coefficient to respectively obtain the anti-distortion coordinates corresponding to the multiple feature points in the anti-distortion image domain; an evaluation unit is used to perform step 6: based on the Euclidean distance between each feature point of the multiple feature points and other feature points in the anti-distortion image domain, generate a eigenvalue for representing the uniformity of distribution of the multiple feature points in the anti-distortion image domain; and a verification unit is used to perform step 7: presetting a new optical center and iteratively performing steps 3 to 6 to obtain multiple eigenvalues, and determining the optical center corresponding to the smallest of the multiple eigenvalues as the final optical center.

[0050] The present application also provides an electronic device, comprising: a memory; and a processor, wherein computer program instructions are stored in the memory, and when the computer program instructions are executed by the processor, the processor executes the optical center testing method as described above.

[0051] After introducing the basic principles of the present application, various non-limiting embodiments of the present application will be described in detail with reference to the accompanying drawings.

[0052] Exemplary stents

[0053] like Figures 1 to 4 As shown, the optical center testing method according to the embodiment of the present application is explained. Figure 1 As shown, the optical center testing method includes: step 1, obtaining a target image of a test target, wherein the test target includes a plurality of feature points with equal spacing between each other; step 2, identifying the plurality of feature points from the target image; step 3, presetting an optical center and calculating the Euclidean distances between the optical center and the plurality of feature points; step 4, generating an anti-distortion distance coefficient based on the Euclidean distances between the optical center and the plurality of feature points; step 5, transforming the target image into an anti-distortion image domain based on the Euclidean distances between the optical center and the plurality of feature points and the anti-distortion distance coefficients, so as to obtain anti-distortion coordinates corresponding to the plurality of feature points in the anti-distortion image domain; step 6, generating a eigenvalue representing the uniformity of distribution of the plurality of feature points in the anti-distortion image domain based on the Euclidean distances between each feature point in the anti-distortion image domain and other feature points; step 7, presetting a new optical center and iteratively executing steps 3 to 6 to obtain a plurality of eigenvalues, and determining the optical center corresponding to the smallest of the plurality of eigenvalues as the final optical center.

[0054] In step 1, a target image of a test target is obtained. Specifically, Figure 2 As shown, the test target includes multiple feature points that are equally spaced from each other. That is, the distance between every two adjacent feature points is the same. In this embodiment of the present application, the multiple feature points have the same shape, and preferably, the shapes of the feature points are centrally symmetrical. The multiple feature points are evenly distributed in at least two regions of the target, and the at least two regions are symmetrical about the geometric center of the target.

[0055] As mentioned above, due to the inherent characteristics of the optical lens of the camera module, the target plate image captured by the camera module will inevitably be distorted, resulting in image distortion, such as Figure 3In order to obtain an image that can reflect the true characteristics of the target plate (i.e., the subject) as much as possible, the image needs to be corrected. In the embodiment of the present application, the corrected image is obtained by anti-distortion correction, and the position of the optical center is determined to improve the accuracy of the optical center test.

[0056] In the process of obtaining a corrected image through anti-distortion correction, the target image needs to be transformed into the anti-distortion image domain. Specifically, first, multiple feature points need to be identified; then, the Euclidean distances between the multiple feature points in the target image and the preset optical center are obtained; then, the Euclidean distances between the multiple feature points in the target image and the preset optical center are converted into the anti-distortion domain to obtain anti-distortion distance coefficients; then, the anti-distortion coordinates corresponding to the multiple feature points in the anti-distortion image domain are obtained using the Euclidean distances and the anti-distortion distance coefficients, thereby achieving the transformation from the target image to the anti-distortion image domain.

[0057] Accordingly, first, in step 2, the plurality of feature points are identified from the target image. The shapes of the plurality of feature points in the target image are distorted relative to their shapes in the target, and the relative positions of the plurality of feature points in the target image are also changed relative to their relative positions in the target, such as Figure 3 shown.

[0058] Next, in step 3, an optical center is preset and the Euclidean distances between the optical center and the multiple feature points are calculated respectively. Specifically, the coordinates of the i-th feature point in the target image are (Xi, Yi), the coordinates of the preset optical center are (Cx, Cy), and the Euclidean distance between the optical center and the i-th feature point in the target image is represented by Di. The Euclidean distance between the optical center and the multiple feature points can be calculated by the following formula: Di = sqrt((Xi–Cx)*(Xi–Cx)+(Yi–Cy)*(Yi–Cy)), where sqrt((Xi–Cx)*(Xi–Cx)+(Yi–Cy)*(Yi–Cy)) represents the value obtained by taking the square root of ((Xi–Cx)*(Xi–Cx)+(Yi–Cy)*(Yi–Cy)).

[0059] Accordingly, step 3, presetting an optical center and respectively calculating the Euclidean distances between the optical center and the plurality of feature points, includes:

[0060] The Euclidean distance between the optical center and the multiple feature points is calculated using the following formula: Di = sqrt((Xi–Cx)*(Xi–Cx)+(Yi–Cy)*(Yi–Cy)), where Di represents the Euclidean distance between the optical center and the i-th feature point.

[0061] It's worth noting that in the embodiments of the present application, during the process of correcting the target image through dedistortion correction, a preset optical center is utilized to transform the target image into the dedistorted image domain. That is, the preset optical center may not necessarily be the final optical center; the optical center position must be preset multiple times and evaluated to determine the final optical center. Accordingly, the optical center testing method of the embodiments of the present application establishes an evaluation method for assessing the accuracy of the preset optical center, and this evaluation method can be used to determine the final optical center. This will be discussed in detail in the detailed description of the evaluation method.

[0062] Then, in step 4, based on the Euclidean distance between the optical center and the multiple feature points, an anti-distortion distance coefficient is generated. Specifically, the anti-distortion distance coefficient can be calculated by the following formula: Ri = abs((K1*pow(Di,(n-1))+K2*pow(Di,(n-2))+……+K(n-1)*pow(Di,1)+Kn), wherein Ri represents the i-th anti-distortion distance coefficient corresponding to the Euclidean distance between the optical center and the i-th feature point; K1, K2, …, K(n-1), Kn represent the 1st, 2nd, …, (n-1), and nth anti-distortion parameters respectively; pow(Di,(n -1)) represents Di raised to the (n-1)th power, pow(Di,(n-2)) represents Di raised to the (n-2)th power, pow(Di,1) represents Di raised to the 1st power, and abs((K1*pow(Di,(n-1))+K2*pow(Di,(n-2))+……+K(n-1)*pow(Di,1)+Kn) represents the absolute value of ((K1*pow(Di,(n-1))+K2*pow(Di,(n-2))+……+K(n-1)*pow(Di,1)+Kn).

[0063] That is, step 4, generating an anti-distortion distance coefficient based on the Euclidean distance between the optical center and the plurality of feature points, includes:

[0064] The anti-distortion distance coefficient is calculated using the following formula: Ri = abs((K1*pow(Di,(n-1))+K2*pow(Di,(n-2))+…+K(n-1)*pow(Di,1)+Kn), where Ri represents the i-th anti-distortion distance coefficient corresponding to the Euclidean distance between the optical center and the i-th feature point, and K1, K2, …, K(n-1), and Kn represent n anti-distortion parameters.

[0065] It is worth mentioning that the anti-distortion distance coefficient is obtained by calculating the anti-distortion model, and the number of the anti-distortion parameters and the values of the anti-distortion parameters are determined according to the anti-distortion model.

[0066] In a specific example of the present application, the number of the anti-distortion parameters is 5. Accordingly, step 4, generating an anti-distortion distance coefficient based on the Euclidean distance between the optical center and the plurality of feature points, includes:

[0067] The anti-distortion distance coefficient is calculated using the following formula: Ri = abs((K1*pow(Di,4)+K2*pow(Di,3)+K3*pow(Di,2)+K4*pow(Di,1)+K5), where Ri represents the i-th anti-distortion distance coefficient corresponding to the Euclidean distance between the optical center and the i-th feature point, and K1, K2, K3, K4, and K5 represent five anti-distortion parameters.

[0068] Next, in step 5, the target image is transformed into an anti-distorted image domain based on the Euclidean distance between the optical center and the plurality of feature points and the anti-distortion distance coefficient, so as to obtain anti-distorted coordinates corresponding to the plurality of feature points in the anti-distorted image domain. Specifically, the anti-distorted coordinates corresponding to the plurality of feature points in the anti-distorted image domain can be obtained based on a functional relationship between the Euclidean distance between the optical center and the plurality of feature points and the anti-distortion distance coefficient.

[0069] In a specific embodiment of the present application, the dedistorted coordinates corresponding to the multiple feature points in the dedistorted image domain can be obtained based on the ratio between the Euclidean distance between the optical center and the multiple feature points and the dedistortion distance coefficient. It should be understood that the dedistorted coordinates corresponding to the multiple feature points in the dedistorted image domain can also be obtained based on other functional relationships between the Euclidean distance between the optical center and the multiple feature points and the dedistortion distance coefficient, and this application is not limited thereto.

[0070] In an embodiment of the present application, the target image can be transformed into the anti-distortion image domain through steps 2 to 5. As previously mentioned, in an embodiment of the present application, during the process of correcting the target image through anti-distortion correction, a preset optical center is used to achieve the transformation of the target image into the anti-distortion image domain. In other words, the preset optical center may not necessarily be the final optical center, and the position of the optical center needs to be preset multiple times, and the preset optical center needs to be evaluated to determine the final optical center. The optical center testing method of an embodiment of the present application constructs an evaluation method for evaluating the accuracy of the preset optical center, and the evaluation method can be used to determine the final optical center to improve the accuracy of the optical center test.

[0071] Specifically, in theory, when the accuracy of the preset optical center is high, under the preset conditions, the distribution characteristics of the multiple feature points in the anti-distortion image domain should be close to the distribution characteristics of the multiple feature points on the target, that is, the mutual spacing is equal, such as Figure 4 Therefore, in the embodiment of the present application, the accuracy of the preset optical center is evaluated by the uniformity of the distribution of the multiple feature points in the dedistorted image domain.

[0072] In step 6, based on the Euclidean distance between each feature point in the plurality of feature points and other feature points in the dedistorted image domain, a feature value is generated to represent the distribution uniformity of the plurality of feature points in the dedistorted image domain.

[0073] In a specific example of the present application, first, multiple first spacing representation values are determined based on the Euclidean distance between each feature point of the multiple feature points and at least two other feature points with the same number of feature points spaced therebetween in the anti-distorted image domain, wherein the number of feature points spaced therebetween may be 0, 1, 2, or other values. When the number of feature points spaced therebetween is 0, it indicates that at least two other feature points are adjacent to the feature point. Each first spacing representation value is used to represent the average level of the Euclidean distance between each feature point and each of the feature points in the test group formed by the at least two other feature points in the anti-distorted image domain. Next, multiple second spacing representation values are determined based on the multiple first spacing representation values, wherein each second spacing representation value is used to represent the difference between every two first spacing representation values. Then, a feature value representing the uniformity of distribution of the multiple feature points in the anti-distorted image domain is determined based on the multiple second spacing representation values.

[0074] Accordingly, step 6 includes: determining a plurality of first distance characterization values based on the Euclidean distance between each feature point in the plurality of feature points and at least two other feature points in the dedistorted image domain, wherein each first distance characterization value is used to characterize the average level of the Euclidean distance between each feature point in a test group formed by the at least two other feature points in the dedistorted image domain.

[0075] ; Determine a plurality of second spacing characterization values based on the plurality of first spacing characterization values, wherein each second spacing characterization value is used to characterize the difference between every two first spacing characterization values; and determine a feature value for representing the uniformity of distribution of the plurality of feature points in the anti-distorted image domain based on the plurality of second spacing characterization values.

[0076] Specifically, in one embodiment, each first distance representation value is represented by the median of at least two distances between each feature point and at least two other feature points in the dedistorted image domain. That is, each first distance representation value is the median of at least two distances between each feature point and at least two other feature points in the dedistorted image domain.

[0077] It should be understood that the first distance characterization value can also be represented by other values that can characterize the average level of the Euclidean distance between each feature point in the test group formed by at least two other feature points in the anti-distorted image domain, for example, the average value of at least two distances between each feature point and at least two other feature points in the anti-distorted image domain, which is not limited to this application.

[0078] In this specific embodiment, each second distance characterization value is represented by the absolute value of the difference between each two first distance characterization values (i.e., the difference between the average levels of the Euclidean distances between the feature points in each two test groups). In other words, each second distance characterization value is the absolute value of the difference between each two first distance characterization values.

[0079] It should be understood that the second spacing characterization value can also be represented by other values that can characterize the difference between each two first spacing characterization values, for example, the absolute value of the difference between the ratio of each two first spacing characterization values and 1, which is also not limited to this application.

[0080] In this specific embodiment, the minimum value among the plurality of second spacing representation values (i.e., the minimum value of the difference between the average levels of the Euclidean distances between the feature points in each two test groups) is used to represent the distribution uniformity of the plurality of feature points in the dedistorted image domain obtained under the preset condition (optical center). In other words, the feature value is the average value of the plurality of second spacing representation values.

[0081] It should be understood that other values may be used to represent the uniformity of distribution of the multiple feature points in the dedistorted image domain obtained under the preset condition (optical center), for example, the average value of the multiple second spacing representation values. Accordingly, in another specific embodiment of the present application, the feature value is the average value of the multiple second spacing representation values.

[0082] In step 7, a new optical center is preset and steps 3 to 6 are iteratively performed to obtain multiple eigenvalues. The optical center corresponding to the smallest of the multiple eigenvalues is determined as the final optical center. In other words, by presetting a new optical center and evaluating the accuracy of multiple preset optical centers to verify whether the preset optical center is the final optical center, the optical center testing accuracy is improved.

[0083] In summary, the optical center testing method is explained, which improves the accuracy of the optical center testing by anti-distortion correction, and constructs an evaluation method for evaluating the accuracy of the preset optical center to further improve the accuracy of the optical center testing.

[0084] Exemplary optical center testing apparatus

[0085] According to another aspect of the present application, an optical center testing device is also provided. According to the optical center testing device of an embodiment of the present application, it includes: an image acquisition unit, a feature point recognition unit, a first distance determination unit, a second distance determination unit, an image domain transformation unit, an evaluation unit, and a verification unit.

[0086] Specifically, the image acquisition unit is used to perform step 1: acquiring a target image of a test target, wherein the test target includes a plurality of feature points with equal spacing between each other;

[0087] The feature point recognition unit is used to perform step 2: recognizing the multiple feature points from the target image.

[0088] The first distance determination unit is used to perform step 3: presetting an optical center and respectively calculating the Euclidean distances between the optical center and the multiple feature points.

[0089] The second distance determining unit is configured to perform step 4: generating an anti-distortion distance coefficient based on the Euclidean distance between the optical center and the plurality of feature points.

[0090] The image domain transformation unit is used to perform step 5: transform the target image into an anti-distortion image domain based on the Euclidean distance between the optical center and the multiple feature points and the anti-distortion distance coefficient, so as to respectively obtain the anti-distortion coordinates corresponding to the multiple feature points in the anti-distortion image domain.

[0091] The evaluation unit is configured to perform step 6: generating a feature value representing a degree of distribution uniformity of the multiple feature points in the dedistorted image domain based on a Euclidean distance between each feature point in the multiple feature points and other feature points in the dedistorted image domain.

[0092] In particular, the evaluation unit is further used to: determine a plurality of first distance representation values based on the Euclidean distance between each feature point of the plurality of feature points and at least two other feature points in the anti-distorted image domain, wherein each first distance representation value is used to represent the average level of the Euclidean distance between each feature point in the test group formed by the at least two other feature points in the anti-distorted image domain; determine a plurality of second distance representation values based on the plurality of first distance representation values, wherein each second distance representation value is used to represent the difference between every two first distance representation values; and determine a feature value used to represent the uniformity of the distribution of the plurality of feature points in the anti-distorted image domain based on the plurality of second distance representation values.

[0093] The verification unit is used to perform step 7: preset a new optical center and iteratively perform steps 3 to 6 to obtain multiple eigenvalues, and determine the optical center corresponding to the smallest of the multiple eigenvalues as the final optical center.

[0094] Here, steps 1 to 7 have been referenced above. Figures 1 to 4 The optical center testing method is described in detail in the schematic, and therefore, its repeated description will be omitted.

[0095] In summary, the optical center testing device is explained, and the optical center testing device can improve the accuracy of optical center testing through an optimized optical center testing method.

[0096] Exemplary electronic devices

[0097] According to another aspect of the present application, an electronic device is provided, the electronic device comprising: a memory and a processor, wherein computer program instructions are stored in the memory, and when the computer program instructions are executed by the processor, the processor executes a reference Figures 1 to 4 Here, steps 1 to 7 have been referred to above. Figures 1 to 4 The optical center testing method is described in detail in the schematic, and therefore, its repeated description will be omitted.

[0098] In summary, the electronic device is explained, and the electronic device can execute an optimized optical center testing method to improve the accuracy of the optical center testing.

[0099] Example Target

[0100] According to another aspect of the present application, a test target is provided, such as Figure 2As shown, the test target includes a substrate and a plurality of first test patterns (first characteristic points) with equal spacing between each other and used for optical center testing, which are arranged on the substrate. That is, the spacing between every two adjacent first test patterns is equal to the same value.

[0101] In an embodiment of the present application, the multiple first test patterns have the same shape, and preferably, the first test patterns are centrally symmetrical. In one specific example of the present application, the first test pattern is circular; in other specific examples, the first test pattern can have other shapes. The multiple first test patterns are evenly distributed in at least two regions of the target, and the at least two regions are symmetrical about the geometric center of the target.

[0102] It is worth mentioning that the test target can also be used to test the spatial frequency response (SFR) of the camera module. Accordingly, the target further includes a plurality of second test patterns (second characteristic points) for the spatial frequency response test, each with equal spacing between them. The substrate has at least one substrate edge, and the second test pattern has at least one test edge, and the at least one test edge is tilted relative to the at least one substrate edge.

[0103] Specifically, the plurality of second test patterns include a central test pattern distributed in the central area of the target and a plurality of peripheral test patterns distributed symmetrically relative to the center of the target, wherein the center of the central test pattern is aligned with the center of the target.

[0104] It's worth noting that the test target can be used for both spatial frequency response and optical center testing. This design reduces the impact of instrument differences on test results and improves test accuracy. During the camera module packaging process, the test target can first be used to perform tilt correction for spatial frequency response. Then, active calibration is performed based on the relative position of the optical center (distortion center) and the photosensitive chip to ensure that the distortion center is aligned with the center of the photosensitive chip.

[0105] In summary, the test target is described, and the test target can reduce the impact of machine differences on spatial frequency response testing and optical center testing, thereby improving the test quality.

[0106] Those skilled in the art will understand that the embodiments of the present application described above and shown in the accompanying drawings are intended only as examples and do not limit the present application. The objectives of the present application have been fully and effectively achieved. The functional and structural principles of the present application have been demonstrated and explained in the embodiments. The embodiments of the present application may be modified or altered in any manner without departing from the principles described.

Claims

1. An optical center testing method, characterized in that: include: Step 1: Acquire a target image of a test target, wherein the test target includes a plurality of feature points with equal spacing between them; Step 2: Identify the plurality of feature points from the target image; Step 3: Preset an optical center and calculate the Euclidean distances between the optical center and the multiple feature points respectively; Step 4: generating an anti-distortion distance coefficient based on the Euclidean distance between the optical center and the plurality of feature points; Step 5: transforming the target image into an anti-distortion image domain based on the Euclidean distance between the optical center and the plurality of feature points and the anti-distortion distance coefficient, so as to obtain anti-distortion coordinates corresponding to the plurality of feature points in the anti-distortion image domain respectively; Step 6: generating a feature value representing the uniformity of distribution of the plurality of feature points in the dedistorted image domain based on the Euclidean distance between each feature point in the dedistorted image domain and other feature points; and Step 7: Preset a new optical center and iteratively execute steps 3 to 6 to obtain multiple eigenvalues, and determine the optical center corresponding to the smallest of the multiple eigenvalues as the final optical center.

2. The optical center testing method according to claim 1, wherein: Generating, based on the Euclidean distance between each feature point of the plurality of feature points and other feature points in the dedistorted image domain, a feature value for indicating a degree of uniformity of distribution of the plurality of feature points in the dedistorted image domain, comprising: determining a plurality of first distance representation values based on the Euclidean distance between each feature point of the plurality of feature points and at least two other feature points in the dedistorted image domain, wherein each first distance representation value is used to represent an average level of the Euclidean distance between each feature point and each of the feature points in a test group formed by the at least two other feature points in the dedistorted image domain; Determine a plurality of second distance characterization values based on the plurality of first distance characterization values, wherein each second distance characterization value is used to characterize a difference between every two first distance characterization values; and A feature value for representing a degree of uniformity of distribution of the plurality of feature points in the dedistorted image domain is determined based on the plurality of second distance representation values.

3. The optical center testing method according to claim 2, wherein: Each of the first distance characterization values is a median of at least two distances between each feature point in the dedistorted image domain and at least two other feature points.

4. The optical center testing method according to claim 2, wherein: Each of the second distance characterizing values is the absolute value of the difference between every two of the first distance characterizing values.

5. The optical center testing method according to claim 4, wherein: The characteristic value is the minimum value among the plurality of second distance characterization values.

6. The optical center testing method according to claim 4, wherein: The characteristic value is an average value of the plurality of second distance characterization values.

7. The optical center testing method according to claim 1, wherein: The coordinates of the i-th feature point are (Xi, Yi), the coordinates of the preset optical center are (Cx, Cy), an optical center is preset and the Euclidean distances between the optical center and the multiple feature points are calculated respectively, including: The Euclidean distance between the optical center and the plurality of feature points is calculated using the following formula: Di = sqrt((Xi–Cx)*(Xi–Cx)+(Yi–Cy)*(Yi–Cy)), where Di represents the Euclidean distance between the optical center and the i-th feature point; The step of generating an anti-distortion distance coefficient based on the Euclidean distance between the optical center and the plurality of feature points comprises: The anti-distortion distance coefficient is calculated using the following formula: Ri = abs((K1*pow(Di,(n-1))+K2*pow(Di,(n-2))+…+K(n-1)*pow(Di,1)+Kn), where Ri represents the i-th anti-distortion distance coefficient corresponding to the Euclidean distance between the optical center and the i-th feature point, and K1, K2, …, K(n-1), and Kn represent n anti-distortion parameters.

8. An optical center testing device, characterized in that: include: An image acquisition unit, configured to execute step 1: acquiring a target image of a test target, wherein the test target includes a plurality of feature points that are equally spaced from each other; A feature point recognition unit, configured to perform step 2: recognizing the plurality of feature points from the target image; The first distance determining unit is configured to execute step 3: presetting an optical center and respectively calculating the Euclidean distances between the optical center and the plurality of feature points; A second distance determining unit is configured to perform step 4: generating an anti-distortion distance coefficient based on the Euclidean distance between the optical center and the plurality of feature points; an image domain transformation unit, configured to perform step 5: transforming the target image into an anti-distortion image domain based on the Euclidean distance between the optical center and the plurality of feature points and the anti-distortion distance coefficient, so as to respectively obtain anti-distortion coordinates corresponding to the plurality of feature points in the anti-distortion image domain; an evaluation unit, configured to perform step 6: generating a feature value representing a degree of uniformity of distribution of the plurality of feature points in the dedistorted image domain based on a Euclidean distance between each feature point in the plurality of feature points and other feature points in the dedistorted image domain; and The verification unit is used to execute step 7: preset a new optical center and iteratively execute steps 3 to 6 to obtain multiple eigenvalues, and determine the optical center corresponding to the smallest one among the multiple eigenvalues as the final optical center.

9. The optical center testing device according to claim 8, wherein: The evaluation unit is further configured to: determining a plurality of first distance representation values based on the Euclidean distance between each feature point of the plurality of feature points and at least two other feature points in the dedistorted image domain, wherein each first distance representation value is used to represent an average level of the Euclidean distance between each feature point and each of the feature points in a test group formed by the at least two other feature points in the dedistorted image domain; Determine a plurality of second distance characterization values based on the plurality of first distance characterization values, wherein each second distance characterization value is used to characterize a difference between every two first distance characterization values; and A feature value for representing a degree of uniformity of distribution of the plurality of feature points in the dedistorted image domain is determined based on the plurality of second distance representation values.

10. An electronic device, characterized in that: include: Memory; and A processor, wherein computer program instructions are stored in the memory, and when the computer program instructions are executed by the processor, the processor executes the optical center testing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • An anti-distortion processing method and device for images

    CN108090880A

  • Method and device for calibrating structured-light three-dimensional scanning system

    WO2017101150A1