Camera module resolution testing method and testing device

By determining the optical center position at the algorithm level, performing anti-distortion processing and correcting the ESF curve, the problems of high testing difficulty and low efficiency in camera module resolution testing are solved, and efficient, multi-module resolution testing is achieved.

CN115018919BActive Publication Date: 2025-09-23YUYAO SUNNY OPTICAL INTELLIGENCE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210358527.6
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-09-23
Estimated Expiration
2042-04-06

AI Technical Summary

Technical Problem

The existing technology has problems of great testing difficulty and low efficiency in the resolution test of camera modules, especially due to the distortion effect when the camera module collects the target image, which requires centering processing and increases the difficulty of testing.

Method used

By determining the optical center position at the algorithm level, an image of a test target with a test pattern is obtained, and anti-distortion processing is performed. The optical center and anti-distortion parameters are determined in an iterative cycle to generate a final anti-distortion image. The ESF curve is corrected to determine the resolution value, thus avoiding physical centering processing.

Benefits of technology

It reduces the difficulty of resolution testing, improves test efficiency, supports simultaneous testing of multiple modules, reduces the requirements for test standards, and improves the versatility of standards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115018919B_ABST
    Figure CN115018919B_ABST
Patent Text Reader

Abstract

Disclosed are a method and device for testing the resolution of a camera module. In the method, first, a target image of a test target having a test pattern is acquired; then, the target image is subjected to dedistortion processing to obtain the position of the optical center, dedistortion parameters, and a final dedistortion image; then, the ESF curve of the hypotenuse of the acquired final dedistortion image is corrected, and the resolution value of the camera module is determined based on the corrected ESF curve. The method can determine the optical center position at the algorithmic level, eliminating the need for physical centering of the camera module to test the resolution of the camera module. This reduces the difficulty of testing the resolution and improves its efficiency.
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 a method for testing the resolution of a camera module and its testing device and electronic equipment. 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 resolving power of a camera module is an important indicator for evaluating its imaging performance. Currently, the spatial frequency response (SFR) method is a commonly used method for testing the resolving power of a camera module. This method typically involves capturing an image of a target with a test pattern drawn on it and analyzing the image to determine the resolving power.

[0004] It's understandable that, due to the inherent structural limitations of the camera module, the image of the target captured by the camera module will inevitably be distorted. For example, when shooting full-frame, significant distortion often occurs around the edges of the image. The spatial frequency response method primarily analyzes the knife edge (slanted straight line) of the test pattern to determine the resolution of the camera module. Distortion of the target image will cause the image of the knife edge to bend, affecting the resolution test results.

[0005] Currently, the impact of image distortion on resolution testing is often reduced by drawing an anti-distortion target. However, testing resolution using an anti-distortion target presents challenges such as high test difficulty and low test efficiency.

[0006] Therefore, a new analytical power testing method is expected. Summary of the Invention

[0007] One advantage of the present application is that it provides a method for testing the resolution of a camera module and a testing device thereof, wherein the method for testing the resolution of a camera module can obtain the optical center of the camera module from the algorithm level, and the resolution test of the camera module can be achieved without physically aligning the camera module.

[0008] Another advantage of the present application is that it provides a method for testing the resolution of a camera module, a device for testing the resolution of a camera module, and an electronic device. The method for testing the resolution of a camera module does not require centering of the camera module, which can reduce the difficulty of the resolution test and improve the efficiency of the resolution test.

[0009] Another advantage of the present application is that it provides a resolution testing method for a camera module, a resolution testing device for a camera module, and an electronic device. In the resolution testing method for the camera module, since the resolution testing method for the camera module reduces the requirements for the test target plate, the versatility of the target plate is relatively improved.

[0010] In the resolution testing method of the camera module, simultaneous testing of multiple modules is supported, which can improve the efficiency of resolution testing.

[0011] To achieve at least one of the above advantages or other advantages and purposes, according to one aspect of the present application, a method for testing the resolution of a camera module is provided, comprising:

[0012] Acquiring a target image of a test target having a test pattern, wherein the test pattern has oblique edges extending within a plane defined by the test pattern;

[0013] Performing an anti-distortion process on the target image to generate an anti-distortion image, and determining the position of the optical center and anti-distortion parameters in an iterative manner based on the target image and the anti-distortion image;

[0014] performing anti-distortion processing on the target image using the optical center and the anti-distortion parameters to generate a final anti-distortion image;

[0015] Obtaining an ESF curve of the hypotenuse of the final dedistorted image;

[0016] determining a correction coefficient for each pixel on the oblique edge based on a polar coordinate distance between each pixel on the oblique edge and the optical center on the target image and an anti-distorted polar coordinate distance between each pixel on the oblique edge and the optical center on the final anti-distorted image;

[0017] Correcting the ESF curve based on the correction coefficient of each pixel point on the hypotenuse to obtain a corrected ESF curve; and

[0018] The resolution value of the camera module is determined based on the corrected ESF curve.

[0019] The ESF curve is corrected based on the correction coefficient of each pixel point on the hypotenuse to obtain a corrected ESF curve, including: compressing each pixel point of the ESF curve based on the correction coefficient of each pixel point on the hypotenuse as a compression ratio; and supplementing each pixel point on the ESF curve into a complete pixel point based on the original pixel value of each pixel point on the compressed ESF curve and the original pixel value of the pixel point adjacent to the pixel point to obtain the corrected ESF curve.

[0020] Based on the original pixel values ​​of each pixel point on the compressed ESF curve and the original pixel values ​​of the pixel points adjacent to the pixel point, each pixel point on the ESF curve is supplemented into a complete pixel point to obtain the corrected ESF curve, including: calculating the weighted sum of the original pixel values ​​of each pixel point on the compressed ESF curve and the original pixel values ​​of the pixel points adjacent to the pixel point, wherein the sum of the weight values ​​of each pixel point is 1. In this way, each pixel point on the ESF curve is supplemented into a complete pixel point.

[0021] Based on the polar coordinate distance between each pixel point on the oblique edge and the optical center on the target image and the anti-distortion polar coordinate distance between each pixel point on the oblique edge and the optical center on the final anti-distortion image, determining the correction coefficient of each pixel point on the oblique edge, including: calculating the correction coefficient by the following formula, the formula is: Ratio_i = Dedge_i / Redge_i, where Ratio_i represents the correction coefficient, Dedge_i represents the polar coordinate distance between the pixel point on the oblique edge in the target image and the optical center, and Redge_i represents the anti-distortion distance between the pixel point on the oblique edge and the optical center in the anti-distortion image.

[0022] Performing anti-distortion processing on the target image using the optical center and the anti-distortion parameter to generate a final anti-distorted image, comprising:

[0023] The target image is subjected to anti-distortion processing using the optical center and the anti-distortion parameters to generate an initial anti-distortion processing image; and the initial anti-distortion processing image is subjected to bilinear interpolation processing to obtain a final anti-distortion image.

[0024] The target image is subjected to anti-distortion processing to generate an anti-distortion image, and the position of the optical center and anti-distortion parameters are determined in a cyclic and iterative manner based on the target image and the anti-distortion image, comprising: step a: identifying multiple feature points from the target image; step b: presetting an optical center and anti-distortion parameters and respectively calculating polar coordinate distances between the optical center and the multiple feature points on the target image; step c: generating an anti-distortion distance based on the polar coordinate distances between the optical center and the multiple feature points on the target image and the anti-distortion parameters; step d: generating the anti-distortion image based on the position of the optical center and the anti-distortion distance; step e: generating a eigenvalue representing the uniformity of distribution of the multiple feature points in the anti-distortion image based on the target image and the anti-distortion image; and step f: presetting a new optical center and new anti-distortion parameters and iteratively executing steps a to e to obtain multiple eigenvalues, and determining the optical center and anti-distortion parameter corresponding to the smallest of the multiple eigenvalues ​​as the final optical center and final anti-distortion parameter.

[0025] Acquiring a target image of a test target having a test pattern includes: acquiring an image to be processed of the test target; and performing adaptive binarization processing on the image to be processed to obtain a binarized image.

[0026] Obtaining the image to be processed of the test target includes: obtaining an original image of the test target; performing demosaicing on the original image to obtain an RGB image of the test target; and performing grayscale conversion on pixel data of the RGB image to obtain a grayscale image of the test target.

[0027] According to another aspect of the present application, a device for testing the resolution of a camera module is provided, comprising:

[0028] an image acquisition unit, configured to acquire a target image of a test target having a test pattern, wherein the test pattern has a slanted edge extending within a plane set therein;

[0029] a parameter determination unit, configured to perform an anti-distortion process on the target image to generate an anti-distortion image, and determine the position of the optical center and anti-distortion parameters in an iterative manner based on the target image and the anti-distortion image;

[0030] an anti-distortion image determining unit, configured to perform anti-distortion processing on the target image using the optical center and the anti-distortion parameters to generate a final anti-distortion image;

[0031] a curve acquisition unit, configured to obtain an ESF curve of the hypotenuse of the final dedistorted image;

[0032] a correction coefficient determining unit, configured to determine a correction coefficient for each pixel point on the oblique edge based on a polar coordinate distance between each pixel point on the oblique edge and the optical center on the target image and an anti-distortion polar coordinate distance between each pixel point on the oblique edge and the optical center on the final anti-distortion image;

[0033] a curve correction unit, configured to correct the ESF curve based on a correction coefficient of each pixel point on the hypotenuse to obtain a corrected ESF curve; and

[0034] A resolution value determining unit is used to determine the resolution value of the camera module based on the corrected ESF curve.

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

[0036] Memory; and

[0037] The processor stores computer program instructions in the memory, and when the computer program instructions are executed by the processor, the processor executes the resolution testing method of the camera module as described above.

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

[0039] 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

[0040] 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:

[0041] Figure 1 The figure illustrates a flow chart of a method for testing the resolution of a camera module according to an embodiment of the present application.

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

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

[0044] Figure 4 A schematic diagram of an anti-distorted image according to an embodiment of the present application is illustrated.

[0045] Figure 5 A schematic diagram of an ESF curve according to an embodiment of the present application is shown.

[0046] Figure 6FIG2 is a schematic diagram of a corrected ESF curve according to an embodiment of the present application. DETAILED DESCRIPTION

[0047] 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.

[0048] Application Overview

[0049] As mentioned above, the resolving power of a camera module is an important indicator for evaluating its imaging performance. Currently, the spatial frequency response (SFR) test is a commonly used method for testing the resolving power of a camera module. When testing the resolving power of a camera module using SFR, the resolving power of the camera module is typically determined by capturing an image of a target plate with a test pattern drawn on it and analyzing the image.

[0050] Due to the inherent structural limitations of the camera module, the image captured by the target is inevitably distorted, affecting the resolution test results. Currently, the effect of image distortion on resolution testing is often reduced by drawing an anti-distortion target. However, testing resolution using an anti-distortion target presents challenges such as high test difficulty and low test efficiency.

[0051] Specifically, under ideal conditions, an anti-distortion pattern is drawn on a target plate, and the lines in the anti-distortion pattern are curved. In the target plate image captured by the camera module, the curved lines are distorted, and the image appears as a straight line. However, the anti-distortion target plate must be drawn under the premise of ensuring that the optical center of the camera module is aligned with the center of the photosensitive chip. In other words, in the process of performing a resolution test using an anti-distortion target plate, the camera module needs to be centered. The process is difficult and the efficiency of the resolution test is low. In addition, the anti-distortion parameters of different camera modules are different, and the camera module needs to be re-centered. Then, the anti-distortion target plate needs to be re-drawn according to the anti-distortion parameters of the camera module.

[0052] This shows that when performing resolution testing using an anti-distortion target, centering the image increases the difficulty and affects test efficiency. The inventors of this application have determined the position of the optical center at the algorithmic level, enabling resolution testing of the camera module without physically centering the module. This approach reduces the difficulty of resolution testing and improves its efficiency.

[0053] Based on this, the present application proposes a method for testing the resolution of a camera module, which includes: obtaining a target image of a test target having a test pattern, wherein the test pattern has a hypotenuse extending within a plane set by the test pattern; performing anti-distortion processing on the target image to generate an anti-distortion image, and determining the position of the optical center and anti-distortion parameters in a cyclic iterative manner based on the target image and the anti-distortion image; performing anti-distortion processing on the target image using the optical center and the anti-distortion parameters to generate a final anti-distortion image; obtaining an ESF curve of the hypotenuse of the final anti-distortion image; determining a correction coefficient for each pixel on the hypotenuse based on the polar coordinate distance between each pixel on the hypotenuse and the optical center on the target image and the anti-distortion polar coordinate distance between each pixel on the hypotenuse and the optical center on the final anti-distortion image; correcting the ESF curve based on the correction coefficient of each pixel on the hypotenuse to obtain a corrected ESF curve; and determining the resolution value of the camera module based on the corrected ESF curve.

[0054] In addition, the present application also provides a resolution test device for a camera module, which includes: an image acquisition unit for acquiring a target plate image of a test target plate having a test pattern, wherein the test pattern has a bevel extending in a plane set by the test pattern; a parameter determination unit for performing an anti-distortion process on the target plate image to generate an anti-distortion image, and determining the position of the optical center and the anti-distortion parameters in a cyclic iterative manner based on the target plate image and the anti-distortion image; an anti-distortion image determination unit for performing an anti-distortion process on the target plate image using the optical center and the anti-distortion parameters to generate a final anti-distortion image; a curve acquisition unit for obtaining The ESF curve of the hypotenuse of the final anti-distortion image; a correction coefficient determination unit, used to determine the correction coefficient of each pixel point on the hypotenuse based on the polar coordinate distance between each pixel point on the hypotenuse and the optical center on the target image and the anti-distortion polar coordinate distance between each pixel point on the hypotenuse and the optical center on the final anti-distortion image; a curve correction unit, used to correct the ESF curve based on the correction coefficient of each pixel point on the hypotenuse to obtain a corrected ESF curve; and a resolution value determination unit, used to determine the resolution value of the camera module based on the corrected ESF curve.

[0055] 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 resolution testing method of the camera module as described above.

[0056] 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.

[0057] Exemplary Optical Testing Methods

[0058] like Figures 1 to 6 As shown, the resolution test method of the camera module according to the embodiment of the present application is explained. Figure 1 As shown, the resolution test method of the camera module includes: S110, obtaining a target image of a test target having a test pattern, wherein the test pattern has a bevel extending in a plane set by the test pattern; 120, performing an anti-distortion process on the target image to generate an anti-distortion image, and determining the position of the optical center and the anti-distortion parameters in a cyclic iterative manner based on the target image and the anti-distortion image; S130, performing an anti-distortion process on the target image using the optical center and the anti-distortion parameters to generate a final anti-distortion image; 140, obtaining the final The ESF curve of the hypotenuse of the dedistorted image; 150, determining the correction coefficient of each pixel point on the hypotenuse based on the polar coordinate distance between each pixel point on the hypotenuse and the optical center on the target image and the dedistorted polar coordinate distance between each pixel point on the hypotenuse and the optical center on the final dedistorted image; 160, correcting the ESF curve based on the correction coefficient of each pixel point on the hypotenuse to obtain a corrected ESF curve;, S170, determining the resolution value of the camera module based on the corrected ESF curve.

[0059] In step S110, a target image of a test target having a test pattern is acquired. Figure 2 As shown, the test pattern has a beveled edge extending within the plane in which it is set. By analyzing the image of the beveled edge, the resolution test result of the camera module can be obtained. It is worth mentioning that in the embodiment of the present application, the test pattern includes multiple repeating units. During the resolution test, it supports simultaneous testing of multiple modules, eliminating the need to align the optical center of the camera module with the center of the test target, thereby improving the efficiency of the resolution test.

[0060] Specifically, in the process of obtaining the target plate image of the test target plate with the test pattern, first, the original image of the test target plate is obtained by the camera module, and then the original image can be processed to facilitate the subsequent resolution test. Since each pixel in the sensor chip of the camera module only outputs single color information (single channel information), the original image can be first demosaiced to convert the original image into an RGB image (true color image). Color restoration can be performed by bilinear interpolation algorithm, adaptive color layer interpolation algorithm, Pixel Grouping interpolation algorithm, Lu's weighted algorithm, successive approximation interpolation algorithm and gradient correction interpolation (high-quality linear interpolation). Bilinear interpolation interpolates the missing values ​​in each channel by taking the average value of its adjacent pixels, which may produce false colors at the edge of the image, resulting in inaccurate interpolation. Preferably, the original image is demosaiced by the gradient correction interpolation, which is relatively simple and accurate.

[0061] Next, since the brightness values ​​of each channel in the RGB image are inconsistent, the RGB image is converted into a grayscale image. The pixel value in the grayscale image can be calculated by the following formula Y = 0.299*R + 0.587*G + 0.114*B, where R, G, and B represent the pixel values ​​corresponding to the red, green, and blue channels, respectively.

[0062] Next, the grayscale image is divided into regions to improve contrast. Because the brightness of different fields in the grayscale image varies significantly, applying the same threshold will result in the dark edges being indistinguishable. Therefore, adaptive binarization is performed to obtain a binary image. The grayscale image is divided into blocks, each ensuring similar image brightness. Different thresholds are selected for binarization within each block, converting the grayscale image into a black and white image, reducing the data volume and highlighting the target outline.

[0063] Accordingly, step S110, acquiring a target image of a test target having a test pattern, includes: acquiring an image of the test target to be processed; and performing adaptive binarization processing on the image to be processed to obtain a binarized image. Acquiring an image of the test target to be processed includes: acquiring an original image of the test target; performing demosaicing processing on the original image to obtain an RGB image of the test target; and performing grayscale conversion on pixel data of the RGB image to obtain a grayscale image of the test target.

[0064] As mentioned above, due to the structure of the camera module itself, the image of the test target plate captured by the camera module will inevitably be distorted, resulting in image distortion, such as Figure 3As shown. Accordingly, the oblique edge of the test pattern in the target image is bent, making it impossible to perform a resolution test. To this end, the distorted target image needs to be corrected to "straighten" the curved oblique edge in the target image, thereby allowing subsequent resolution testing. In an embodiment of the present application, an anti-distortion image is obtained by performing an anti-distortion process on the target image, and the position of the optical center and the anti-distortion parameters are determined in an iterative manner based on the target image and the anti-distortion image.

[0065] Accordingly, in step S120, the target plate image is subjected to anti-distortion processing to generate an anti-distortion image, and the position of the optical center and the anti-distortion parameters are determined in a cyclic iterative manner based on the target plate image and the anti-distortion image. That is to say, in the embodiment of the present application, the resolution test method of the camera module can determine the optical center position from the algorithm level, and the resolution test of the camera module can be achieved without performing physical centering processing on the camera module. Since the resolution test method of the camera module does not require centering processing on the camera module, the difficulty of the resolution test can be reduced and the efficiency of the resolution test can be improved. In this process, there is no need to draw an anti-distortion target plate, which reduces the requirements for the test target plate and the versatility of the target plate is relatively improved.

[0066] Specifically, in one embodiment of the present application, the optical center and the anti-distortion parameters are preset and then determined in an iterative manner. In this embodiment, the test pattern of the test target further comprises a plurality of feature points spaced equidistant from one another, each having the same shape. Preferably, the feature points are centrally symmetrical, such as a circle. In the process of determining the position of the optical center and the anti-distortion parameters, first, step a is performed: a plurality of feature points are identified from the target image; step b is performed: an optical center and anti-distortion parameters are preset and the polar coordinate distances between the optical center and the plurality of feature points on the target image are respectively calculated; step c is performed: an anti-distortion distance is generated based on the polar coordinate distances between the optical center and the plurality of feature points on the target image and the anti-distortion parameters; then, step d is performed: an anti-distortion image is generated based on the position of the optical center and the anti-distortion distance; step e is performed: a eigenvalue representing the uniformity of distribution of the plurality of feature points in the anti-distortion image is generated based on the target image and the anti-distortion image; and finally, step f is performed: a new optical center and a new anti-distortion parameter are preset and steps a to e are iteratively performed to obtain a plurality of the eigenvalues, and the optical center and anti-distortion parameter corresponding to the smallest of the plurality of eigenvalues ​​are determined as the final optical center and the final anti-distortion parameter.

[0067] Accordingly, in this specific example, step S120 includes: step a: identifying multiple feature points from the target image; step b: presetting an optical center and anti-distortion parameters and respectively calculating the polar coordinate distances between the optical center and the multiple feature points on the target image; step c: generating an anti-distortion distance based on the polar coordinate distances between the optical center and the multiple feature points on the target image and the anti-distortion parameters; step d: generating the anti-distortion image based on the position of the optical center and the anti-distortion distance; step e: generating a eigenvalue for representing the uniformity of distribution of the multiple feature points in the anti-distortion image based on the target image and the anti-distortion image; and step f: presetting a new optical center and new anti-distortion parameters and iteratively performing steps a to e to obtain multiple eigenvalues, and determining the optical center and anti-distortion parameter corresponding to the smallest of the multiple eigenvalues ​​as the final optical center and the final anti-distortion parameter.

[0068] In step b, an optical center and anti-distortion parameters are preset, and the polar coordinate distances between the optical center and the multiple feature points on the target image are calculated. 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 polar coordinate distances between the optical center and the multiple feature points on the target image are represented by Di. The polar coordinate distances between the optical center and the multiple feature points on the target image can be calculated using 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)).

[0069] In step c, based on the polar coordinate distance between the optical center and the multiple feature points on the target image and the anti-distortion parameters, an anti-distortion distance is generated. Specifically, the anti-distortion distance can be calculated by 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 anti-distortion distance corresponding to the Euclidean distance between the optical center and the i-th feature point, K1, K2, K3, K4, and K5 represent five anti-distortion parameters, pow(Di,4) represents the fourth power of Di, and pow(Di,3) represents The cube of Di, pow(Di,2) represents the square of Di, pow(Di,1) represents the first power of Di, and abs((K1*pow(Di,4)+K2*pow(Di,3)+K3*pow(Di,2)+K4*pow(Di,1)+K5) represents the absolute value of (abs((K1*pow(Di,4)+K2*pow(Di,3)+K3*pow(Di,2)+K4*pow(Di,1)+K5)).

[0070] In step e: based on the target image and the anti-distortion image, a characteristic value is generated to represent the uniformity of distribution of the multiple feature points in the anti-distortion image. In this way, the accuracy of the preset optical center and anti-distortion parameters is evaluated, and then it is determined whether the preset optical center and anti-distortion parameters are used as the final optical center and anti-distortion parameters.

[0071] Theoretically, when the accuracy of the preset optical center is high, under this preset condition, 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 this specific example, the accuracy of the preset optical center is evaluated by the distribution uniformity of the multiple feature points in the anti-distortion image domain.

[0072] In this specific example, a smaller eigenvalue indicates a higher distribution uniformity of the multiple feature points in the anti-distortion image domain, that is, the multiple feature points are more uniform in the anti-distortion image, and can better reflect the actual distribution of the multiple feature points in the test target.

[0073] Accordingly, in step f, a new optical center and new anti-distortion parameters are preset, and steps a through e are iteratively performed to obtain multiple eigenvalues. The optical center and anti-distortion parameters corresponding to the smallest of the multiple eigenvalues ​​are determined as the final optical center and final anti-distortion parameters. The preset new optical center position can be calculated based on the current optical center position and a preset functional relationship. In other words, the new optical center position can be calculated based on the current optical center position and the preset functional relationship and used as the preset new optical center position.

[0074] It is worth noting that in this specific example, while determining the final optical center and the final anti-distortion parameters, the anti-distorted image generated in iterative step d corresponding to the final optical center and the final anti-distortion parameters can be determined as the final anti-distorted image. That is, the anti-distorted image corresponding to the smallest of the multiple eigenvalues ​​is determined as the final anti-distorted image. Of course, the target image can also be anti-distorted using the optical center and the anti-distortion parameters to generate the final anti-distorted image.

[0075] It is also worth mentioning that the position of the optical center and the anti-distortion parameters can be determined by other methods, which are not limited to the present application.

[0076] In step S130, the target image is subjected to anti-distortion processing using the optical center and the anti-distortion parameters to generate a final anti-distortion image. Specifically, the final anti-distortion image can be generated by calculating in steps b to d above, or by other methods, which are not limited to the present application. In the final anti-distortion image obtained after anti-distortion correction, the oblique edges are "straightened", as shown in FIG. Figure 4 As shown, it is convenient for subsequent analytical testing.

[0077] It is worth mentioning that from the target image to the anti-distortion image, in the process of "straightening" the oblique edge, the entire image is stretched, and blank pixel coordinates will appear between each pixel point, resulting in pixel discontinuity problems. The bilinear interpolation algorithm or other interpolation algorithms can be used to interpolate the pixels around the image to obtain the final anti-distortion image.

[0078] Correspondingly, step S130 performs anti-distortion processing on the target image using the optical center and the anti-distortion parameters to generate a final anti-distortion image, including performing anti-distortion processing on the target image using the optical center and the anti-distortion parameters and generating an initial anti-distortion processing image; and performing bilinear interpolation processing on the initial anti-distortion processing image to obtain a final anti-distortion image.

[0079] In step S140, the ESF curve of the oblique edge of the final dedistorted image is obtained (e.g. Figure 5The edge spread function ESF is the grayscale distribution function of the oblique edge, directly reflecting the grayscale distribution of the oblique edge, and the pixel points of the oblique edge correspond one-to-one to the pixel points of the ESF curve.

[0080] After obtaining the ESF curve of the hypotenuse, the ESF curve needs to be corrected to improve the accuracy of the resolution test. It is worth mentioning that the point spread function (PSF, Point Spread Function), the line spread function (LSF, LineSpread Function) and the edge spread function (ESF, Edge Spread Function) can all be used to express the resolution. The point spread function PSF is the brightness distribution function after the point light source is imaged. The point spread function is symmetrical about the central circle, and the brightness distribution along the x-axis is usually used as the point spread function of the imaging system. The line spread function LSF represents the process of change of the edge spread function ESF. LSF and PSF are the results after ESF difference and differentiation, respectively. Therefore, the ESF data that can directly reflect the grayscale distribution of the hypotenuse is corrected instead of the LSF data or PSF data. Specifically, the ESF curve can be corrected by a correction coefficient.

[0081] Accordingly, in step S150, a correction coefficient for each pixel on the oblique edge is determined based on the polar coordinate distance between each pixel on the oblique edge and the optical center on the target image and the dedistorted polar coordinate distance between each pixel on the oblique edge and the optical center on the final dedistorted image. Specifically, the correction coefficient can be calculated using the following formula:

[0082] Ratio_i=Dedge_i / Redge_i, where Ratio_i represents the correction coefficient, Dedge_i represents the polar coordinate distance between the pixel point on the hypotenuse in the target image and the optical center, and Redge_i represents the anti-distortion distance between the pixel point on the hypotenuse in the anti-distortion image and the optical center.

[0083] The polar coordinate distance between each pixel point on the oblique edge of the target image and the optical center and the anti-distortion polar coordinate distance between each pixel point on the oblique edge and the optical center on the final anti-distortion image can be calculated by the calculation formulas in steps b and c in the above specific examples, or can be calculated by other methods, which is not limited to this application.

[0084] In step S160, the ESF curve is corrected based on the correction coefficients of each pixel point on the hypotenuse to obtain a corrected ESF curve. Since the pixel points of the hypotenuse correspond one-to-one to the pixel points of the ESF curve, the ESF curve can be corrected by the correction coefficients. Specifically, each pixel point on the ESF curve has a corresponding correction ratio. First, each pixel point of the ESF curve is compressed based on the correction coefficients of each pixel point on the hypotenuse as a compression ratio; then, each pixel point on the ESF curve is supplemented into a complete pixel point based on the original pixel value of each pixel point on the compressed ESF curve and the original pixel value of the pixel point adjacent to the pixel point, so as to obtain the corrected ESF curve (such as Figure 6 shown).

[0085] Correspondingly, step S160 corrects the ESF curve based on the correction coefficient of each pixel point on the hypotenuse to obtain a corrected ESF curve, including: compressing each pixel point of the ESF curve based on the correction coefficient of each pixel point on the hypotenuse as a compression ratio; and supplementing each pixel point on the ESF curve into a complete pixel point based on the original pixel value of each pixel point on the compressed ESF curve and the original pixel value of the pixel point adjacent to the pixel point to obtain the corrected ESF curve.

[0086] Based on the original pixel values ​​of each pixel point on the compressed ESF curve and the original pixel values ​​of the pixel points adjacent to the pixel point, each pixel point on the ESF curve is supplemented into a complete pixel point to obtain the corrected ESF curve, including: calculating the weighted sum of the original pixel values ​​of each pixel point on the compressed ESF curve and the original pixel values ​​of the pixel points adjacent to the pixel point, wherein the sum of the weight values ​​of each pixel point is 1. In this way, each pixel point on the ESF curve is supplemented into a complete pixel point.

[0087] The following example illustrates this: the correction coefficients for the first, second, and third pixels on the ESF curve are 0.70, 0.69, and 0.68, respectively, and the pixel values ​​are 101, 102, and 103, respectively. After compression, the compressed pixel value of the first pixel is 101*0.7. The first pixel can be completed to a complete pixel by the second pixel, and the new pixel value is 101*0.7+102*(1-0.7). The remaining pixel value of the second pixel is 102*(0.69-(1-0.7)), which can be completed by the third pixel, and the new pixel value is 102*(0.69-(1-0.7))+103*(1-(0.69-(1-0.7))), and so on.

[0088] In step S170, the resolution value of the camera module is determined based on the corrected ESF curve. Preferably, first, an LSF curve is obtained by derivation based on the corrected ESF curve, and then the resolution value at each frequency is obtained by Fourier transform (FFT). Alternatively, first, a PSF curve is obtained by derivation based on the corrected ESF curve, and then the resolution value at each frequency is obtained by Fourier transform (FFT).

[0089] In summary, the resolution testing method of the camera module is explained. The resolution testing method of the camera module can determine the optical center position from the algorithm level, and the resolution test of the camera module can be achieved without performing physical centering processing on the camera module. In this way, the difficulty of resolution testing is reduced and the efficiency of resolution testing is improved.

[0090] Exemplary resolution testing device

[0091] According to another aspect of the present application, a resolution testing device 10 of a camera module is also provided. According to the resolution testing device 10 of the camera module of an embodiment of the present application, it includes: an image acquisition unit 11, a parameter determination unit 12, an anti-distortion image determination unit 13, a curve acquisition unit 14, a correction coefficient determination unit 15, a curve correction unit 16, and a resolution value determination unit 17.

[0092] Specifically, the image acquisition unit 11 is configured to acquire a target image of a test target having a test pattern, wherein the test pattern has a hypotenuse extending within a plane defined therein. The parameter determination unit 12 is configured to perform dedistortion processing on the target image to generate a dedistorted image, and to iteratively determine the position of the optical center and dedistortion parameters based on the target image and the dedistorted image. The dedistorted image determination unit 13 is configured to perform dedistortion processing on the target image using the optical center and the dedistortion parameters to generate a final dedistorted image. The curve acquisition unit 14 is configured to obtain an ESF curve of the hypotenuse of the final dedistorted image. The correction coefficient determination unit 15 is configured to determine a correction coefficient for each pixel on the hypotenuse based on the polar coordinate distance between each pixel on the hypotenuse and the optical center on the target image and the dedistorted polar coordinate distance between each pixel on the hypotenuse and the optical center on the final dedistorted image. The curve correction unit 16 is used to correct the ESF curve based on the correction coefficient of each pixel point on the hypotenuse to obtain a corrected ESF curve. The resolution value determination unit 17 is used to determine the resolution value of the camera module based on the corrected ESF curve.

[0093] In a specific example of the present application, the curve correction unit 16 is further used to compress each pixel point of the ESF curve based on the correction coefficient of each pixel point on the hypotenuse as a compression ratio; and, based on the original pixel value of each pixel point on the compressed ESF curve and the original pixel value of the pixel point adjacent to the pixel point, each pixel point on the ESF curve is supplemented into a complete pixel point to obtain the corrected ESF curve.

[0094] In a specific example of the present application, the curve correction unit 16 is further used to calculate the weighted sum of the original pixel value of each pixel point on the compressed ESF curve and the original pixel value of the pixel points adjacent to the pixel point, wherein the sum of the weight values ​​of each pixel point is 1. In this way, each pixel point on the ESF curve is supplemented into a complete pixel point.

[0095] In a specific example of the present application, the correction coefficient determination 15 is further used to calculate the correction coefficient by the following formula:

[0096] Ratio_i=Dedge_i / Redge_i, where Ratio_i represents the correction coefficient, Dedge_i represents the polar coordinate distance between the pixel point on the hypotenuse in the target image and the optical center, and Redge_i represents the anti-distortion distance between the pixel point on the hypotenuse in the anti-distortion image and the optical center.

[0097] In a specific example of the present application, the anti-distortion image determination unit 13 is further used to perform anti-distortion processing on the target plate image using the optical center and the anti-distortion parameters, and generate an anti-distortion initial processing image; and perform bilinear interpolation processing on the anti-distortion initial processing image to obtain a final anti-distortion image.

[0098] In a specific example of the present application, the parameter determination unit 12 is further used to perform step a: identifying multiple feature points from the target image; step b: presetting an optical center and anti-distortion parameters and respectively calculating the polar coordinate distances between the optical center and the multiple feature points on the target image; step c: generating an anti-distortion distance based on the polar coordinate distances between the optical center and the multiple feature points on the target image and the anti-distortion parameters; step d: generating the anti-distortion image based on the position of the optical center and the anti-distortion distance; step e: generating a eigenvalue for representing the uniformity of distribution of the multiple feature points in the anti-distortion image based on the target image and the anti-distortion image; and step f: presetting a new optical center and new anti-distortion parameters and iteratively performing steps a to e to obtain multiple eigenvalues, and determining the optical center and anti-distortion parameter corresponding to the smallest of the multiple eigenvalues ​​as the final optical center and the final anti-distortion parameter.

[0099] In a specific example of the present application, the image acquisition unit 11 is further configured to acquire the image to be processed of the test target; and perform adaptive binarization processing on the image to be processed to obtain a binarized image.

[0100] In a specific example of the present application, the image acquisition unit 11 is further used to acquire an original image of the test target; perform demosaicing on the original image to obtain an RGB image of the test target; and perform grayscale conversion on pixel data of the RGB image to obtain a grayscale image of the test target.

[0101] Here, the functions of the various units of the resolution test device 10 of the camera module have been referred to above. Figures 1 to 6 The description of the resolution testing method of the illustrated camera module has been introduced in detail, and therefore, its repeated description will be omitted.

[0102] In summary, the resolution testing device 10 of the camera module is explained. The resolution testing device 10 of the camera module can determine the optical center position from the algorithm level to reduce the difficulty of resolution testing and improve the efficiency of resolution testing.

[0103] Exemplary electronic devices

[0104] According to another aspect of the present application, an electronic device 80 is provided, the electronic device 80 comprising: a memory 81 and a processor 82, wherein the memory 81 stores computer program instructions, and when the computer program instructions are executed by the processor 82, the processor 82 executes a reference Figures 1 to 6 Here, the resolution test method of the camera module has been referenced above. Figures 1 to 4 The description of the resolution testing method of the illustrated camera module has been introduced in detail, and therefore, its repeated description will be omitted.

[0105] In summary, the electronic device 80 is explained, and the electronic device 80 can execute the optimized resolution test method of the camera module to determine the optical center position from the algorithm level, so as to reduce the difficulty of the resolution test and improve the efficiency of the resolution test.

[0106] Example Target

[0107] According to another aspect of the present application, a test target board 100 is provided. Figure 2 As shown, the test target 100 has a test pattern 110 having a beveled edge 111 extending within a plane defined by the test pattern 110 for use in resolving power testing. The test pattern 110 also has a plurality of feature points 112 spaced evenly apart for determining the optical center and anti-distortion parameters. The plurality of feature points 112 have the same shape and, preferably, are centrally symmetrical, such as a circle.

[0108] It is worth mentioning that in the embodiment of the present application, the test pattern 110 includes multiple repeating units, each test unit having at least one beveled edge 111. During the resolution test, simultaneous testing of multiple modules is supported, eliminating the need to align the optical center of the camera module with the center of the test target 100, thereby improving the efficiency of the resolution test.

[0109] In summary, the test target 100 is explained, and the test target 100 can be used for both resolution testing and optical center testing.

[0110] 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. A method for testing the resolution of a camera module, characterized in that: include: Acquiring a target image of a test target having a test pattern, wherein the test pattern has oblique edges extending within a plane defined by the test pattern; Performing an anti-distortion process on the target image to generate an anti-distortion image, and determining the position of the optical center and anti-distortion parameters in an iterative manner based on the target image and the anti-distortion image; performing anti-distortion processing on the target image using the optical center and the anti-distortion parameters to generate a final anti-distortion image; Obtaining an ESF curve of the hypotenuse of the final dedistorted image; determining a correction coefficient for each pixel on the oblique edge based on a polar coordinate distance between each pixel on the oblique edge and the optical center on the target image and an anti-distorted polar coordinate distance between each pixel on the oblique edge and the optical center on the final anti-distorted image; Correcting the ESF curve based on the correction coefficient of each pixel point on the hypotenuse to obtain a corrected ESF curve; and Determining a resolution value of the camera module based on the corrected ESF curve; Performing an anti-distortion process on the target image to generate an anti-distortion image, and determining the position of the optical center and anti-distortion parameters in an iterative manner based on the target image and the anti-distortion image, including: Step a: identifying a plurality of feature points from the target image; Step b: presetting an optical center and anti-distortion parameters and respectively calculating the polar coordinate distances between the optical center and the plurality of feature points on the target image; Step c: generating an anti-distortion distance based on the polar coordinate distance between the optical center and the plurality of feature points on the target image and the anti-distortion parameter; Step d: generating the anti-distortion image based on the position of the optical center and the anti-distortion distance; Step e: generating a feature value representing a degree of uniformity of distribution of the plurality of feature points in the dedistorted image based on the target image and the dedistorted image; and Step f: Preset a new optical center and new anti-distortion parameters and iteratively execute steps a to e to obtain multiple eigenvalues, and determine the optical center and anti-distortion parameters corresponding to the smallest of the multiple eigenvalues ​​as the final optical center and final anti-distortion parameters.

2. The method for testing the resolution of a camera module according to claim 1, wherein: Correcting the ESF curve based on the correction coefficient of each pixel point on the hypotenuse to obtain a corrected ESF curve includes: compressing each pixel point of the ESF curve based on the correction coefficient of each pixel point on the hypotenuse as a compression ratio; and Based on the compressed original pixel value of each pixel point on the ESF curve and the original pixel values ​​of the pixels adjacent to the pixel point, each pixel point on the ESF curve is supplemented into a complete pixel point to obtain the corrected ESF curve.

3. The method for testing the resolution of a camera module according to claim 2, wherein: Completing each pixel point on the ESF curve into a complete pixel point based on the original pixel value of each pixel point on the compressed ESF curve and the original pixel values ​​of the pixel points adjacent to the pixel point to obtain the corrected ESF curve, including: Calculate the weighted sum of the original pixel value of each pixel point on the compressed ESF curve and the original pixel values ​​of the pixels adjacent to the pixel point, where the sum of the weight values ​​of each pixel point is 1. In this way, each pixel point on the ESF curve is complemented into a complete pixel point.

4. The method for testing the resolution of a camera module according to claim 1, wherein: Determining a correction coefficient for each pixel point on the oblique edge based on a polar coordinate distance between each pixel point on the oblique edge and the optical center on the target image and an anti-distortion polar coordinate distance between each pixel point on the oblique edge and the optical center on the final anti-distortion image includes calculating the correction coefficient using the following formula: Ratio_i=Dedge_i / Redge_i, where Ratio_i represents the correction coefficient, Dedge_i represents the polar coordinate distance between the pixel point on the hypotenuse in the target image and the optical center, and Redge_i represents the anti-distortion distance between the pixel point on the hypotenuse in the anti-distortion image and the optical center.

5. The method for testing the resolution of a camera module according to claim 1, wherein: Performing anti-distortion processing on the target image using the optical center and the anti-distortion parameter to generate a final anti-distorted image, comprising: Performing anti-distortion processing on the target image using the optical center and the anti-distortion parameters, and generating an initial anti-distortion processing image; and Perform bilinear interpolation processing on the dedistorted initial processed image to obtain a final dedistorted image.

6. The method for testing the resolution of a camera module according to claim 1, wherein: Acquire a target image of a test target having a test pattern, including: Acquiring an image to be processed of the test target; and Adaptively binarize the image to be processed to obtain a binarized image.

7. The method for testing the resolution of a camera module according to claim 6, wherein: Obtaining a to-be-processed image of the test target, including: Acquiring an original image of the test target; Performing demosaicing on the original image to obtain an RGB image of the test target; and Grayscale conversion is performed on the pixel data of the RGB image to obtain a grayscale image of the test target.

8. A camera module resolution test device, characterized in that: include: an image acquisition unit, configured to acquire a target image of a test target having a test pattern, wherein the test pattern has a slanted edge extending within a plane set therein; a parameter determination unit, configured to perform an anti-distortion process on the target image to generate an anti-distortion image, and determine the position of the optical center and anti-distortion parameters in an iterative manner based on the target image and the anti-distortion image; an anti-distortion image determining unit, configured to perform anti-distortion processing on the target image using the optical center and the anti-distortion parameters to generate a final anti-distortion image; a curve acquisition unit, configured to obtain an ESF curve of the hypotenuse of the final dedistorted image; a correction coefficient determining unit, configured to determine a correction coefficient for each pixel point on the oblique edge based on a polar coordinate distance between each pixel point on the oblique edge and the optical center on the target image and an anti-distortion polar coordinate distance between each pixel point on the oblique edge and the optical center on the final anti-distortion image; a curve correction unit, configured to correct the ESF curve based on a correction coefficient of each pixel point on the hypotenuse to obtain a corrected ESF curve; and a resolution value determining unit, configured to determine a resolution value of the camera module based on the corrected ESF curve; Performing an anti-distortion process on the target image to generate an anti-distortion image, and determining the position of the optical center and anti-distortion parameters in an iterative manner based on the target image and the anti-distortion image, including: Step a: identifying a plurality of feature points from the target image; Step b: presetting an optical center and anti-distortion parameters and respectively calculating the polar coordinate distances between the optical center and the plurality of feature points on the target image; Step c: generating an anti-distortion distance based on the polar coordinate distance between the optical center and the plurality of feature points on the target image and the anti-distortion parameter; Step d: generating the anti-distortion image based on the position of the optical center and the anti-distortion distance; Step e: generating a feature value representing a degree of uniformity of distribution of the plurality of feature points in the dedistorted image based on the target image and the dedistorted image; and Step f: Preset a new optical center and new anti-distortion parameters and iteratively execute steps a to e to obtain multiple eigenvalues, and determine the optical center and anti-distortion parameters corresponding to the smallest of the multiple eigenvalues ​​as the final optical center and final anti-distortion parameters.

9. 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 resolution testing method of the camera module as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Resolution test method and device, and storage medium

    CN112203080A

  • Test method and test system for wide-angle camera module

    CN112468800A