Prejudgment focusing method and device of optical fingerprint camera and test system

By predicting the resolution of the optical fingerprint camera and selectively performing active correction and focus adjustment, the problem of poor resolution caused by inaccurate lens installation is solved, saving time and cost.

CN120111367APending Publication Date: 2025-06-06TRULY OPTO-ELECTRONICS TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510161366.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The prior art fails to effectively solve the problem of poor resolution caused by inaccurate lens installation in optical fingerprint cameras, and actively correcting and focusing on all optical fingerprint cameras will waste time.

Method used

By obtaining the object distance between the lens of the optical fingerprint camera and the test image, driving the camera to take the test image, calculating the image distance between the sensor and the lens, predicting the resolution force, and only actively correcting and focusing the cameras with the resolution force that do not meet the standards.

Benefits of technology

It effectively avoids poor resolution of some optical fingerprint cameras with large errors, and saves time and cost of actively correcting and focusing all cameras.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120111367A_ABST
    Figure CN120111367A_ABST
Patent Text Reader

Abstract

The invention discloses a pre-judgment focusing method for an optical fingerprint camera. The pre-judgment focusing method comprises the following steps: acquiring an object distance between a lens of the optical fingerprint camera and a test chart; driving the optical fingerprint camera to shoot so as to obtain a test image of the test image on a sensor of the optical fingerprint camera; respectively calculating an image distance measurement value and an image distance theoretical value between the sensor and the lens according to the test image and the object distance; pre-judging the resolution of the optical fingerprint camera according to the difference between the image distance measurement value and the image distance theoretical value; aA focusing is carried out on the optical fingerprint camera with the pre-judged analytic power not reaching the standard. According to the pre-judgment focusing method, the analytical power of the optical fingerprint camera is pre-judged, so that AA focusing is selectively carried out on part of optical fingerprint cameras, and the time cost is saved. The invention discloses a pre-judgment focusing device and a test system of an optical fingerprint camera.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to camera correction technology, and in particular to a pre-judgment focusing method, device and testing system for an optical fingerprint camera. Background Art

[0002] AA (Active Alignment) focusing refers to the process of adjusting the relative position between the lens and the sensor according to the camera's resolution curve to achieve the optimal resolution of the camera.

[0003] Compared with ordinary cameras that need to capture the image of the entire scene and have higher requirements for the alignment accuracy of the lens and sensor, optical fingerprint cameras mainly focus on the image quality and details of the fingerprint area rather than the imaging effect of the entire picture, so the alignment accuracy requirements of the lens and sensor are relatively low. Therefore, the existing technology generally does not perform AA focusing on optical fingerprint cameras.

[0004] However, due to the large appearance error, some optical fingerprint cameras also have inaccurate lens mounting, resulting in poor resolution. At this time, if all optical fingerprint cameras are subjected to AA focusing, it will undoubtedly waste a lot of time and cost. Summary of the invention

[0005] In order to solve the above-mentioned deficiencies of the prior art, the present invention provides a pre-judgment focusing method, device and testing system for an optical fingerprint camera, which pre-judges the resolution of the optical fingerprint camera, thereby selectively performing AA focusing on some optical fingerprint cameras to save time cost.

[0006] The technical problem to be solved by the present invention is achieved through the following technical solutions:

[0007] A pre-judgment focusing method for an optical fingerprint camera comprises the following steps:

[0008] Step 1: Obtaining the object distance between the lens of the optical fingerprint camera and the test image;

[0009] Step 2: driving the optical fingerprint camera to shoot, so as to obtain a test image of the test pattern on the sensor of the optical fingerprint camera;

[0010] Step 3: Calculate the measured image distance and the theoretical image distance between the sensor and the lens according to the test image and the object distance;

[0011] Step 4: Predicting the resolution of the optical fingerprint camera according to the difference between the image distance measurement value and the image distance theoretical value;

[0012] Step 5: Perform AA focusing on the optical fingerprint camera whose resolution is not up to standard.

[0013] Further, the test image has a calibration pattern; in step 3, the steps of calculating the image distance measurement value between the sensor and the lens according to the test image and the object distance are as follows:

[0014] Step a31: in the test image, calculating and obtaining the image size of the calibration pattern;

[0015] Step a32: Calculate the image distance h2 between the lens and the sensor according to the following formula:

[0016]

[0017] Wherein, d1 and d2 are the image size and physical size of the calibration figure respectively, h1 is the object distance between the lens and the test figure, and h2 is the measured value of the image distance between the lens and the sensor.

[0018] Furthermore, the calibration figure has at least one side, and the image length and physical length of the at least one side are respectively used as the image size and physical size of the calibration figure.

[0019] Furthermore, in step 3, the steps of calculating the theoretical value of the image distance between the sensor and the lens according to the test image are as follows:

[0020] Step b31: Use Gaussian formula The theoretical value of the image distance between the sensor of the optical fingerprint camera and the lens is calculated, wherein h1 is the object distance between the lens and the test chart, h' is the theoretical value of the image distance between the sensor and the lens, and f is the focal length of the lens.

[0021] Furthermore, in step 4, according to the difference between the image distance measurement value and the image distance theoretical value, the step of predicting the resolution of the optical fingerprint camera is as follows:

[0022] Step 41: Calculate the image distance difference between the measured image distance value and the theoretical image distance value;

[0023] Step 42: Compare the image distance difference with a preset threshold value. If the image distance difference is greater than the preset threshold value, it is predicted that the resolution of the optical fingerprint camera does not meet the standard. If the image distance difference is less than or equal to the preset threshold value, it is predicted that the resolution of the optical fingerprint camera meets the standard.

[0024] Furthermore, in step 5, the steps of performing AA focusing on the optical fingerprint camera are as follows:

[0025] Step 51: Calculate and obtain the optical center of the test image;

[0026] Step 52: Calculate the position offset between the optical center and the image center of the test image;

[0027] Step 53: According to the position offset, move the relative position between the lens and the sensor so that the optical center coincides with the image center.

[0028] Furthermore, the test image has a calibration pattern; in step 51, the steps of calculating and obtaining the optical center of the test image are as follows:

[0029] Step 511: performing binarization processing on the test image;

[0030] Step 512: Identify the calibration pattern in the test image after binarization processing;

[0031] Step 513: removing the calibration pattern from the test image;

[0032] Step 514: Calculate the optical center in the test image without the calibration pattern.

[0033] A testing system for an optical fingerprint camera, comprising:

[0034] A test image, used for the optical fingerprint camera to take pictures;

[0035] A rangefinder, used to measure the object distance between the lens of the optical fingerprint camera and the test image;

[0036] The lower computer is used to drive the optical fingerprint camera to shoot the test chart to obtain a test image of the test chart on the sensor of the optical fingerprint camera;

[0037] A focusing device, used to perform AA focusing on an optical fingerprint camera whose resolution is predicted to be substandard;

[0038] The upper computer is used to obtain the object distance from the rangefinder and the test image from the lower computer, and respectively calculate the image distance measurement value and the image distance theoretical value between the sensor and the lens according to the test image and the object distance, and then predict the resolution of the optical fingerprint camera according to the difference between the image distance measurement value and the image distance theoretical value, and control the focusing device to perform AA focusing on the optical fingerprint camera whose resolution is predicted to be unsatisfactory.

[0039] Furthermore, the host computer includes:

[0040] A first acquisition module, used for acquiring the object distance from the rangefinder;

[0041] A second acquisition module, used for acquiring the test image from the lower computer;

[0042] A first calculation module, used to calculate a measured image distance value and a theoretical image distance value between the sensor and the lens according to the test image and the object distance;

[0043] A resolution prediction module, used to predict the resolution of the optical fingerprint camera according to the difference between the image distance measurement value and the image distance theoretical value;

[0044] A second calculation module, used for calculating the position offset between the optical center and the image center according to the test image;

[0045] The focus control module is used to control the focus device to perform AA focus on the optical fingerprint camera whose resolution is predicted to be substandard according to the position offset.

[0046] A predictive focusing device for an optical fingerprint camera comprises a processor and a memory connected to each other, wherein the memory stores a computer program for execution by the processor, and the processor performs the predictive focusing method when executing the computer program.

[0047] The present invention has the following beneficial effects: the predictive focusing method of the present invention aims at the characteristic that most optical fingerprint cameras do not need to perform AA focusing. The resolution of the optical fingerprint camera is first predicted by the difference between the image distance measured value and the image distance theoretical value of the optical fingerprint camera, and AA focusing is only performed on the optical fingerprint camera whose resolution is predicted to be unsatisfactory, while AA focusing is not performed on the optical fingerprint camera whose resolution is predicted to be up to the standard. This can avoid poor resolution of some optical fingerprint cameras with large errors and avoid performing AA focusing on all optical fingerprint cameras, so as to save time cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 Schematic diagram of the structure of an optical fingerprint camera.

[0049] Figure 2 This is a functional block diagram of the test system provided by the present invention.

[0050] Figure 3 Schematic diagram of the imaging of the test image by the optical fingerprint camera.

[0051] Figure 4 A flowchart of the pre-judgment focusing method provided by the present invention.

[0052] Figure 5 This is a block diagram of step 3 in the test system provided by the present invention.

[0053] Figure 6 This is a block diagram of step 5 in the test system provided by the present invention.

[0054] Figure 7 This is a block diagram of step 51 in the test system provided by the present invention.

[0055] Figure 8 Another principle block diagram of the test system provided by the present invention.

[0056] Fig. 9 This is a principle block diagram of the predictive focusing device provided by the present invention. DETAILED DESCRIPTION

[0057] The present invention is described in detail below in conjunction with the accompanying drawings and embodiments, examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0058] In the description of the present invention, it is necessary to understand that the terms "size", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside" and "outside" etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0059] In addition, the terms "first", "second", and "third" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first", "second", and "third" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0060] In the present invention, unless otherwise clearly specified and limited, the terms "install", "connect", "connect", "fix", "set" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0061] Embodiment 1

[0062] A predictive focusing method for an optical fingerprint camera. Figure 1As shown, the optical fingerprint camera 10 includes a PCB board 11, a sensor 12, a base carrier 13 and a lens 14. The sensor 12 is bound to the surface of the PCB board 11, and the base carrier 13 is adhesively fixed on the surface of the PCB board 11 and surrounds the sensor 12; the base carrier 13 is provided with a lens barrel 131 aligned with the sensor 12, and the lens 14 is mounted in the lens barrel 131 of the base carrier 13.

[0063] AA focusing refers to adjusting the relative position between the lens 14 and the sensor 12 so that the optical center of the lens 14 is aligned with the center of the sensor 12, and then using glue to bond and fix the lens 14 to the lens barrel 131, thereby fixing the relative position between the lens 14 and the sensor 12.

[0064] like Figure 2 and 4 As shown, the pre-judgment focusing method comprises the following steps:

[0065] Step 1: Obtain the object distance between the lens 14 of the optical fingerprint camera 10 and the test image 30.

[0066] In step 100, if Figure 2 As shown, the optical fingerprint camera 10 is first fixed on a test bracket 20, the test chart 30 is placed in front of the lens 14 of the optical fingerprint camera 10, and then the optical fingerprint camera 10 is connected to the lower computer 40, and then the lower computer 40 is connected to the upper computer 50; the upper computer 50 is also connected to a rangefinder 60 and a focusing device 70.

[0067] The lower computer 40 is a development board with a single-chip microcomputer, which can be programmed to write the driver of the optical fingerprint camera 10; the upper computer 50 is a host such as a mobile phone, a computer, a tablet, etc., which is installed with a test software. The tester controls the lower computer 40 to test the optical fingerprint camera 10 by operating the test software in the upper computer 50.

[0068] After the test system is built, the distance between the lens 14 and the test chart 30 is measured by the distance meter 60 , and the distance is input into the test software. The distance meter 60 may be, but is not limited to, a laser distance meter 60 .

[0069] Step 2: driving the optical fingerprint camera 10 to shoot, so as to obtain a test image of the test pattern 30 on the sensor 12 of the optical fingerprint camera 10 .

[0070] In step 2, the upper computer 50 sends a test instruction to the lower computer 40. After receiving the test instruction, the lower computer 40 drives the optical fingerprint camera 10 to shoot the test image 30 in front of it, so as to obtain the test image.

[0071] Step 3: Calculate the measured image distance and the theoretical image distance between the sensor 12 and the lens 14 according to the test image and the object distance.

[0072] In step 3, the host computer 50 obtains the object distance from the rangefinder 60 and the test image from the slave computer 40, and then respectively calculates the image distance measurement value and the image distance theoretical value between the sensor 12 and the lens 14.

[0073] Among them, Figure 3 As shown, a triangle is formed between the test chart 30 and the optical center of the lens 14, and a triangle is also formed between the sensor 12 and the optical center of the lens 14. The two triangles are similar triangles. Therefore, the image distance measurement value between the sensor 12 and the lens 14 can be calculated based on the physical size and image size of the test chart 30 using the similar triangle theorem; and when imaging, the physical size and image size of the test chart 30 satisfy a certain magnification ratio, and the magnification ratio is only related to the image distance, the object distance and the focal length. Therefore, the relationship between the image distance, the object distance and the focal length can be used to calculate the theoretical value of the image distance between the sensor 12 and the lens 14.

[0074] Preferably, the test chart 30 has a calibration figure 31, and the image size and physical size of the calibration figure 31 are used instead of the image size and physical size of the test chart 30 to calculate the image distance measurement value, so that the optical fingerprint camera 10 only needs to completely capture the calibration figure 31 in the test image, and there is no need to make the projection range of the test chart 30 on the sensor 12 coincide with the photosensitivity range of the sensor 12.

[0075] Specifically, Figure 5 As shown, in step 3, the steps of calculating the image distance measurement value between the sensor 12 and the lens 14 according to the test image and the object distance are as follows:

[0076] Step a31: in the test image, calculate and obtain the image size of the calibration pattern 31.

[0077] In step a31, the calibration pattern has at least one side, and the image length and physical length of one of the sides can be used as the image size and physical size of the calibration pattern respectively. In order to further improve the measurement accuracy, the average value of the image lengths of two or more sides can also be used as the image size of the calibration pattern 31.

[0078] In this embodiment, the calibration figure 31 is a polygon, and preferably, the calibration figure 31 is a rectangle, and its side is inclined relative to the side of the test figure 30 .

[0079] When calculating the image length of at least one side of the calibration figure 31, a plane rectangular coordinate system XY is constructed with the horizontal direction of the test image as the X-axis, the vertical direction as the Y-axis, and the length of a single pixel as the unit length, and all pixels in the test image are traversed to obtain the coordinate values ​​and grayscale values ​​of all pixels. Then, the test image is edge identified according to the grayscale values ​​of all pixels to obtain the straight line equations of each side of the calibration figure 31, and then the coordinates of the intersection of each side are calculated according to each straight line equation, so as to obtain the coordinate values ​​of each corner point of the calibration figure 31. Finally, the image length of at least one side is calculated according to the coordinate values ​​of two adjacent corner points and the length of a single pixel.

[0080] Step a32: Calculate the image distance between the lens 14 and the sensor 12 according to the following formula:

[0081]

[0082] Wherein, d1 and d2 are the image size and physical size of the calibration figure 31 respectively, h1 is the object distance between the lens 14 and the test figure 30 , and h2 is the measured value of the image distance between the lens 14 and the sensor 12 .

[0083] Corresponding to the use of the image length of one of the side edges as the image size of the calibration figure 31 in step a31, in this step a32, the physical length of the same side edge can be used as the physical size of the calibration figure 31. In order to further improve the measurement accuracy, the average value of the physical lengths of the same two or more side edges can also be used as the physical size of the calibration figure 31.

[0084] In addition, in step 3, the steps of calculating the theoretical value of the image distance between the sensor 12 and the lens 14 according to the object distance are as follows:

[0085] Step b31: Use Gaussian formula The theoretical value of the image distance between the sensor 12 and the lens 14 is calculated, wherein h1 is the object distance between the lens 14 and the test chart 30 , h′ is the theoretical value of the image distance between the sensor 12 and the lens 14 , and f is the focal length of the lens 14 .

[0086] Step 4: Predict whether the resolution of the optical fingerprint camera 10 meets the standard according to the difference between the image distance measurement value and the image distance theoretical value.

[0087] In step 4, if the difference between the image distance measurement value and the image distance theoretical value is small, it can be predicted that the resolution of the optical fingerprint camera 10 meets the standard, and the optical fingerprint camera 10 does not need to perform AA focusing. The lens 14 and the lens barrel 131 can be directly bonded and fixed by the glue, so as to fix the relative position between the lens 14 and the sensor 12; if the difference between the image distance measurement value and the image distance theoretical value is large, it can be predicted that the resolution of the optical fingerprint camera 10 does not meet the standard, and the optical fingerprint camera 10 needs to perform AA focusing. After completing AA focusing, the lens 14 and the lens barrel 131 are bonded and fixed by the glue, so as to fix the relative position between the lens 14 and the sensor 12.

[0088] Specifically, in step 4, the steps of predicting whether the resolution of the optical fingerprint camera 10 meets the standard according to the difference between the image distance measurement value and the image distance theoretical value are as follows:

[0089] Step 41: Calculate the image distance difference between the measured image distance value and the theoretical image distance value.

[0090] Step 42: Compare the image distance difference with a preset threshold value. If the image distance difference is greater than the preset threshold value, it is predicted that the resolution of the optical fingerprint camera 10 does not meet the standard. If the image distance difference is less than or equal to the preset threshold value, it is predicted that the resolution of the optical fingerprint camera 10 meets the standard.

[0091] Step 5: Perform AA focusing on the optical fingerprint camera 10 whose resolution is predicted to be substandard.

[0092] In step 5, the host computer 50 sends a focusing instruction to the focusing device 70. After receiving the focusing instruction, the focusing device 70 adjusts the relative position between the lens 14 and the sensor 12 so that the optical center of the lens 14 is aligned with the center of the sensor 12.

[0093] Preferably, the present embodiment uses the test image to calculate the position offset of the optical fingerprint camera 10 without using a special resolution test chart 30 to simplify the test process.

[0094] Specifically, Figure 6 As shown, in step 5, the steps of performing AA focusing on the optical fingerprint camera 10 whose resolution is predicted to be substandard are as follows:

[0095] Step 51: Calculate and obtain the optical center of the test image.

[0096] In step 51, in the plane rectangular coordinate system XY, the optical center can be calculated according to the coordinate values ​​and grayscale values ​​of all pixel points in the test image by using the grayscale centroid method, Gaussian fitting method, circular fitting method or Hough transform method. This is the prior art and will not be elaborated in detail.

[0097] In order to prevent the pixel grayscale of the calibration pattern 31 from affecting the calculation of the optical center, the calibration pattern 31 needs to be removed from the test image when calculating the optical center. Figure 7 As shown, in step 51, the steps of calculating and obtaining the optical center of the test image are as follows:

[0098] Step 511: binarize the test image.

[0099] In step 511, the gray values ​​of all pixels in the test image are sorted to obtain the maximum gray value, and then 70%-80 of the maximum gray value is taken as a binarization threshold, and then the test image is binarized according to the binarization threshold.

[0100] Step 512: Identify the calibration pattern 31 in the test image after the binarization process.

[0101] In step 512, an edge detection algorithm is used in the test image after binarization to identify the edge of the calibration figure 31, so as to determine the graphic range of the calibration figure 31. This is a prior art and will not be described in detail.

[0102] Step 513: Remove the calibration pattern 31 from the test image.

[0103] In step 513, the grayscale values ​​of all pixels within the determined graphic range are uniformly set to 255, so that the pixel grayscales of the calibration graphic 31 and other places tend to be consistent.

[0104] Step 514: Calculate the optical center in the test image without the calibration pattern 31.

[0105] In step 514, in the test image without the calibration pattern 31, the optical center can be calculated by using the grayscale centroid method, Gaussian fitting method, circular fitting method or Hough transform method, which is a prior art and will not be elaborated in detail.

[0106] Step 52: Calculate the position offset between the optical center and the image center of the test image.

[0107] In step 52, the image center is the intersection of the horizontal center axis and the vertical center axis of the test image, which can be obtained according to the intermediate values ​​of the horizontal resolution and the vertical resolution of the test image.

[0108] Assuming that the coordinate value of the optical center is (X1, Y1), and the coordinate value of the image center is (X2, Y2), then the lateral offset ΔX between the optical center and the image center is X1-X2, and the longitudinal offset ΔY is Y1-Y2, where the positive and negative values ​​of ΔX and ΔY represent positive offset and reverse offset, respectively, and the size represents the offset distance.

[0109] Step 53: According to the position offset, move the relative position between the lens 14 and the sensor 12 so that the optical center coincides with the image center.

[0110] In step 53, the focusing device 70 uses a robot to grab and move at least one of the lens 14 and the sensor 12 according to the lateral offset ΔX and the longitudinal offset ΔY, thereby correcting the position offset between the two and making the optical center coincide with the image center.

[0111] The predictive focusing method of the present invention aims at the characteristic that most optical fingerprint cameras 10 do not need to perform AA focusing. First, the resolution of the optical fingerprint camera 10 is predicted by the difference between the image distance measured value and the image distance theoretical value of the optical fingerprint camera 10, and AA focusing is performed only on the optical fingerprint camera 10 whose resolution is predicted to be unsatisfactory, while AA focusing is not performed on the optical fingerprint camera 10 whose resolution is predicted to be up to the standard. This can avoid poor resolution of some optical fingerprint cameras 10 with large errors and avoid performing AA focusing on all optical fingerprint cameras 10, so as to save time cost.

[0112] Embodiment 2

[0113] like Figure 2 and 8 As shown, a test system for an optical fingerprint camera is used to implement the pre-judgment focusing method described in Example 1; the test system includes:

[0114] Test image 30, used for the optical fingerprint camera 10 to take pictures;

[0115] A rangefinder 60, used to measure the object distance between the lens 14 of the optical fingerprint camera 10 and the test image 30;

[0116] The lower computer 40 is used to drive the optical fingerprint camera 10 to shoot the test chart 30 to obtain a test image of the test chart 30 on the sensor 12 of the optical fingerprint camera 10;

[0117] A focusing device 70, used for performing AA focusing on the optical fingerprint camera 10 whose resolution is predicted to be substandard;

[0118] The upper computer 50 is used to obtain the object distance from the rangefinder 60 and the test image from the lower computer 40, and respectively calculate the image distance measurement value and the image distance theoretical value between the sensor 12 and the lens 14 according to the test image and the object distance, and then predict the resolution of the optical fingerprint camera 10 according to the difference between the image distance measurement value and the image distance theoretical value, and control the focusing device 70 to perform AA focusing on the optical fingerprint camera 10 whose resolution is predicted to be unsatisfactory.

[0119] Wherein, the host computer 50 includes:

[0120] A first acquisition module, used for acquiring the object distance from the rangefinder 60;

[0121] A second acquisition module, used for acquiring the test image from the lower computer 40;

[0122] A first calculation module, used to calculate a measured image distance value and a theoretical image distance value between the sensor 12 and the lens 14 according to the test image and the object distance;

[0123] A resolution prediction module, used to predict the resolution of the optical fingerprint camera 10 according to the difference between the image distance measurement value and the image distance theoretical value;

[0124] A second calculation module, used for calculating the position offset between the optical center and the image center according to the test image;

[0125] The focus control module is used to control the focus device 70 to perform AA focus on the optical fingerprint camera 10 whose resolution is predicted to be substandard according to the position offset.

[0126] Embodiment 3

[0127] like Fig. 9 As shown, a pre-judgment focusing device for an optical fingerprint camera includes a processor and a memory connected to each other, wherein the memory stores a computer program for execution by the processor, and the processor performs the pre-judgment focusing method described in Example 1 when executing the computer program.

[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention rather than to limit them. Although the embodiments of the present invention have been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the embodiments of the present invention can still be modified or replaced by equivalents, and these modifications or equivalent replacements cannot cause the modified technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A pre-judgment focusing method for an optical fingerprint camera, characterized in that: The steps include: Step 1: Obtaining the object distance between the lens of the optical fingerprint camera and the test image; Step 2: driving the optical fingerprint camera to shoot, so as to obtain a test image of the test pattern on the sensor of the optical fingerprint camera; Step 3: Calculate the measured image distance and the theoretical image distance between the sensor and the lens according to the test image and the object distance; Step 4: Predicting the resolution of the optical fingerprint camera according to the difference between the image distance measurement value and the image distance theoretical value; Step 5: Perform AA focusing on the optical fingerprint camera whose resolution is not up to standard.

2. The predictive focusing method according to claim 1, characterized in that: The test chart has a calibration pattern; in step 3, the steps of calculating the image distance measurement value between the sensor and the lens according to the test image and the object distance are as follows: Step a31: in the test image, calculating and obtaining the image size of the calibration pattern; Step a32: Calculate the image distance h2 between the lens and the sensor according to the following formula: Wherein, d1 and d2 are the image size and physical size of the calibration figure respectively, h1 is the object distance between the lens and the test figure, and h2 is the measured value of the image distance between the lens and the sensor.

3. The predictive focusing method according to claim 2, characterized in that: The calibration figure has at least one side, and the image length and physical length of the at least one side are respectively used as the image size and physical size of the calibration figure.

4. The predictive focusing method according to claim 1, characterized in that: In step 3, the steps of calculating the theoretical value of the image distance between the sensor and the lens according to the test image are as follows: Step b31: Use Gaussian formula The theoretical value of the image distance between the sensor and the lens is calculated, wherein h1 is the object distance between the lens and the test chart, h' is the theoretical value of the image distance between the sensor and the lens, and f is the focal length of the lens.

5. The predictive focusing method according to claim 1, characterized in that: In step 4, the steps of predicting the resolution of the optical fingerprint camera according to the difference between the image distance measurement value and the image distance theoretical value are as follows: Step 41: Calculate the image distance difference between the measured image distance value and the theoretical image distance value; Step 42: Compare the image distance difference with a preset threshold value. If the image distance difference is greater than the preset threshold value, it is predicted that the resolution of the optical fingerprint camera does not meet the standard. If the image distance difference is less than or equal to the preset threshold value, it is predicted that the resolution of the optical fingerprint camera meets the standard.

6. The predictive focusing method according to claim 1, characterized in that: In step 5, the steps for performing AA focusing on the optical fingerprint camera whose resolution is not up to standard are as follows: Step 51: Calculate and obtain the optical center of the test image; Step 52: Calculate the position offset between the optical center and the image center of the test image; Step 53: According to the position offset, move the relative position between the lens and the sensor so that the optical center coincides with the image center.

7. The predictive focusing method according to claim 6, characterized in that: The test image has a calibration pattern; in step 51, the steps of calculating and obtaining the optical center of the test image are as follows: Step 511: performing binarization processing on the test image; Step 512: Identify the calibration pattern in the test image after binarization processing; Step 513: removing the calibration pattern from the test image; Step 514: Calculate the optical center in the test image without the calibration pattern.

8. A testing system for an optical fingerprint camera, characterized in that: include: A test image, used for the optical fingerprint camera to take pictures; A rangefinder, used to measure the object distance between the lens of the optical fingerprint camera and the test image; The lower computer is used to drive the optical fingerprint camera to shoot the test chart to obtain a test image of the test chart on the sensor of the optical fingerprint camera; A focusing device, used to perform AA focusing on an optical fingerprint camera whose resolution is predicted to be substandard; The upper computer is used to obtain the object distance from the rangefinder and the test image from the lower computer, and respectively calculate the image distance measurement value and the image distance theoretical value between the sensor and the lens according to the test image and the object distance, and then predict the resolution of the optical fingerprint camera according to the difference between the image distance measurement value and the image distance theoretical value, and control the focusing device to perform AA focusing on the optical fingerprint camera whose resolution is predicted to be unsatisfactory.

9. The test system according to claim 8, characterized in that: The host computer comprises: A first acquisition module, used for acquiring the object distance from the rangefinder; A second acquisition module, used for acquiring the test image from the lower computer; A first calculation module, used to calculate a measured image distance value and a theoretical image distance value between the sensor and the lens according to the test image and the object distance; A resolution prediction module, used to predict the resolution of the optical fingerprint camera according to the difference between the image distance measurement value and the image distance theoretical value; A second calculation module, used for calculating the position offset between the optical center and the image center according to the test image; The focus control module is used to control the focus device to perform AA focus on the optical fingerprint camera whose resolution is predicted to be substandard according to the position offset.

10. A pre-judgment focusing device for an optical fingerprint camera, characterized in that: The invention comprises a processor and a memory connected to each other, wherein the memory stores a computer program for execution by the processor, and the processor performs the predictive focusing method according to claim 1 when executing the computer program.