AF module movement starting position test method and device
The focus platform drives the AF module to move step by step and calculates the SFR value, and uses the weight ratio and proportion factor to process the data to accurately determine the starting position of the AF module movement, solving the problems of low automatic focus accuracy and misjudgment in the existing technology, and improving the testing accuracy and production efficiency.
Patent Information
- Application Number
- CN202311260064.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2043-09-26
AI Technical Summary
When testing the starting position of the AF module, the prior art is affected by external factors, resulting in low autofocus accuracy, and errors in the judgment of the starting position of the AF software driver, resulting in the normal AF module being misjudged as a bad product.
The focus platform uses m steps to drive the camera's AF module to perform directional motion and dedication motion, calculate the SFR value at each step of driving, and use the weight proportional factor and proportional factor for data processing to determine the starting step of the AF module's movement.
Accurately test to obtain the true starting position of the AF module movement, improve the accuracy of the camera's autofocus, and avoid misjudgment of production tests caused by inaccurate configuration of the AF software.
Smart Images

Figure CN117319638B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of camera testing, and in particular to a method and device for testing the starting position of an AF module movement. Background Art
[0002] Existing laser testing AF module systems (such as the attached Figure 1 The method for testing the starting position of the AF module (auto focus optical module) movement is to use the infrared laser 100 to illuminate the lens surface of the camera 200 and capture the information of the reflected light, and then identify the change of the distance when the AF module physically moves by measuring the information of the reflected light, so as to obtain the following Figure 2 The AF module motion curve shown in FIG. 1 is with mA as the horizontal axis and um as the vertical axis, wherein the horizontal axis represents the current value used to drive the AF module to move, and the horizontal axis represents the distance of the physical movement of the AF module. The starting point of the linear interval of the AF module motion curve is used as the starting position (start step) of the AF module motion, and the position of 5um of the vertical axis is conventionally used as a reference, and the end point of the linear interval of the AF module motion curve is used as the end position (end step) of the AF module motion, and the rated stroke position is generally used as a reference. Finally, the AF parameter of the starting point is used as the reference point for the initial position of the AF module motion of the camera 200 driven by the AF software of the terminal platform;
[0003] However, by using the infrared laser 100 to monitor the movement of the AF module hardware, only the movement performance of the AF module hardware of the camera 200 is tested. The physical movement of the AF module will be affected by many external factors, such as the overall jitter of the camera 200, which will lead to low focusing accuracy of the terminal platform driving the AF module movement. In the actual autofocus shooting process, the terminal platform (Qualcomm & MTK) will use the SFR analysis value obtained from the actual test to determine whether the AF module is moving when performing autofocus. The SFR value is not only related to the movement of the AF module itself, but also to other factors such as the MTF capability of the lens optics, the test chart and the ambient light. Therefore, there is an error between the AF module motion curve obtained by the laser monitoring test to determine the starting position of the AF module movement driven by the AF software of the terminal platform and the SFR value obtained by the test during actual focusing to determine the starting position of the AF module movement, and then due to the problem of inaccurate software calibration, a normal AF module is judged as a defective product during the actual production test. Summary of the invention
[0004] The purpose of the present invention is to provide a method and device for testing the starting position of the AF module movement, which can accurately test and obtain the true starting position of the AF module movement, and use this step number parameter as a reference for the starting point when the focusing platform automatically focuses, thereby effectively improving the accuracy of the camera autofocus and avoiding misjudgment of AF module hardware test failure during production testing due to inaccurate autofocus parameters configured by AF software.
[0005] In order to achieve the above object, the present invention discloses a method for testing the starting position of the AF module movement, wherein the focusing platform drives the AF module of the camera to move forward and backward in m steps respectively, where m is a natural number, and the testing method comprises:
[0006] S101, calculating the SFR value corresponding to the camera when the focusing platform is driven one step at a time, so as to obtain a destination SFR data group and a return SFR data group, wherein the destination SFR data group and the return SFR data group respectively include m SFR values;
[0007] S102, using a weight proportional factor to calculate the weight proportion of SFR values of the same number of steps in the outgoing SFR data group and the return SFR data group to obtain a weighted SFR data group, wherein the weighted SFR data group includes m weighted SFR values;
[0008] S103, taking the number of steps corresponding to the largest weighted SFR value in the weighted SFR data group as the maximum number of steps;
[0009] S104, performing difference calculation on two adjacent weighted SFR values in the weighted SFR data group to obtain a diff data group, wherein the diff data group includes m-1 diff values;
[0010] S105, using a proportion factor to perform weighted calculation on the diff values corresponding to the maximum step number and the steps before the maximum step number in the diff data group to obtain a weighted diff data group, wherein the number of weighted diff values in the weighted diff data group is consistent with the value of the maximum step number;
[0011] S106, comparing the weighted diff values in the weighted diff data group with a preset threshold in sequence, and taking the previous step number corresponding to the first weighted diff value greater than the threshold number as the starting step number of the AF module movement.
[0012] Furthermore, the step S102 includes:
[0013] S1021, performing mean processing on the SFR values of the same number of steps in the outgoing SFR data group and the return SFR data group to obtain a mean SFR data group, wherein the mean SFR data group includes m mean SFR values;
[0014] S1022, using the largest mean SFR value in the mean SFR data group to perform weight ratio calculation on each mean SFR value in the mean SFR data group to obtain a first weight ratio factor group and a second weight ratio factor group, wherein the first weight ratio factor group and the second weight ratio factor group respectively include n weight ratio factors;
[0015] S1023, using the first formula to calculate the SFR values of the same number of steps in the outgoing SFR data group and the return SFR data group in turn, and obtain m weighted SFR values W n , the first formula is W n =A n *δ1 n +B n *δ2 n , where A n is the SFR value in the destination SFR data set, B n is the SFR value in the return SFR data set, δ1 n is the first weight proportional factor in the first weight proportional factor group, δ2 n is the second weight proportional factor in the second weight proportional factor group, n is a natural number, n≤m.
[0016] Furthermore, the weight ratio calculation includes: calculating the first weight ratio factor δ1 using the second formula and the third formula respectively. n and the second weight scaling factor δ2 n , the second formula is δ1 n =1-C n / C max , the third formula is δ2 n =C n / C max , where C max is the maximum mean SFR value in the mean SFR data set, C n is the mean SFR value in the mean SFR data set.
[0017] Furthermore, the difference calculation includes: calculating the diff value D using the fourth formula n , the fourth formula is D n =W n+1 -W n , where W n is the weighted SFR value in the weighted SFR data group, n is a natural number, n≤m.
[0018] Furthermore, the weighted calculation includes: calculating the weighted diff value H using the fifth formula n, the fifth formula is H n =D n-2 *Δ1+D n-1 *Δ2+D n *Δ3+D n+1 *Δ4+D n+2 *Δ5, where D n is the diff value in the diff data set, the proportion factors include a first factor Δ1, a second factor Δ2, a third factor Δ3, a fourth factor Δ4 and a fifth factor Δ5, and n is a natural number, n≤m.
[0019] Further, the first factor Δ1 and the fifth factor Δ5 are 0.1, the second factor Δ2 and the fourth factor Δ4 are 0.2, and the third factor Δ3 is 0.4.
[0020] Further, the camera includes a shooting end, the shooting end is provided with a teleconverter and is arranged corresponding to the SFR test chart, and the calculation of the SFR value corresponding to the camera when the focusing platform is driven one step includes:
[0021] Each time the focusing platform is driven one step, the camera is driven to shoot a test chart;
[0022] Intercept the captured test chart according to the preset central ROI area;
[0023] The captured image is calculated using the AF algorithm to obtain the corresponding SFR value.
[0024] In order to achieve the above object, the present invention discloses a starting position test device for AF module movement, comprising:
[0025] The first calculation module is used to calculate the SFR value corresponding to the camera when the focus platform is driven one step at a time;
[0026] The second calculation module is used to calculate the weight proportion of the SFR values of the same number of steps in the outgoing SFR data group and the return SFR data group using the weight proportion factor;
[0027] A value-taking module, used for taking the number of steps corresponding to the largest weighted SFR value in the weighted SFR data group as the maximum number of steps;
[0028] The third calculation module is used to calculate the difference between two adjacent weighted SFR values in the weighted SFR data group;
[0029] A fourth calculation module, used for performing weighted calculation on the diff values corresponding to the maximum value step number and the steps before the maximum value step number in the diff data group by using the proportion factor;
[0030] The comparison module is used to compare the weighted diff values in the weighted diff data group with the preset thresholds in sequence.
[0031] In order to achieve the above object, the present invention discloses a starting position test system for AF module movement, comprising:
[0032] one or more processors;
[0033] One or more memories are used to store one or more programs. When one or more of the programs are executed by the processor, the processor implements the starting position test method of the AF module movement as described above.
[0034] In order to achieve the above-mentioned purpose, the present invention discloses a computer-readable storage medium having a program stored thereon, characterized in that when the program is executed by a processor, the starting position test method of the AF module movement as described above is implemented.
[0035] In order to achieve the above object, the present invention discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of an electronic device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the electronic device executes the starting position test method of the AF module movement as described above.
[0036] In the present application, the AF module of the camera is driven to perform forward and backward motion in cooperation with the focusing platform, and the SFR test system is used to calculate the SFR value corresponding to the camera each time the focusing platform is driven one step, so as to obtain a forward SFR data group and a backward SFR data group; then, the weight proportion factor is used to perform weight proportion calculation on the data in the forward and backward SFR data groups, so as to obtain a weighted SFR data group, and the number of steps corresponding to the maximum value in the data group is taken as the maximum value step; then, a diff data group is calculated from the weighted SFR data group; finally, the proportion factor is used to perform weighted calculation on the diff values corresponding to the maximum value step and the number of steps before the maximum value step in the diff data group, so as to obtain a weighted diff data group; by comparing the weighted diff values in the weighted diff data group with the threshold one by one, the number of steps before the number of steps corresponding to the first weighted diff value greater than the threshold is taken as the starting number of steps for the movement of the AF module. The SFR value returned by the actual test when the AF module is moving is used as a reference to construct an SFR focus curve at the center ROI position, so as to monitor and feedback the movement status of the AF module, and then the SFR data corresponding to the curve is digitized, so as to accurately test and obtain the true starting position of the AF module movement. This step parameter is used as a reference for the starting point of the focus platform when automatically focusing, which effectively improves the accuracy of the camera's autofocus and avoids misjudgment of AF module hardware test failure during production testing due to inaccurate autofocus parameters configured by the AF software. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a structural diagram of an existing laser testing AF module system.
[0038] Figure 2 This is the AF module motion curve diagram obtained by testing the existing laser test AF module system.
[0039] Figure 3 It is a structural schematic diagram of an SFR test system used when testing the SFR value in the starting position test method of the AF module movement according to an embodiment of the present invention.
[0040] Figure 4 The figure is a flow chart of a method for testing the starting position of the AF module movement according to an embodiment of the present invention.
[0041] Figure 5 It is a schematic diagram of a test chart image captured by a camera when testing the SFR value in the starting position test method of the AF module movement according to an embodiment of the present invention.
[0042] Figure 6 Graphs showing the outward SFR curve and the return SFR curve in the starting position test method of the AF module movement according to an embodiment of the present invention.
[0043] Figure 7 This is a weighted SFR curve diagram of the starting position test method of the AF module movement according to an embodiment of the present invention.
[0044] Figure 8 This is a weighted SFR rising edge curve diagram in the starting position test method of the AF module movement in an embodiment of the present invention.
[0045] Fig. 9 It is a weighted SFR rising edge curve and a weighted diff curve diagram in the starting position test method of the AF module movement in an embodiment of the present invention.
[0046] Fig.10 This is a module diagram of a starting position testing device for AF module movement according to an embodiment of the present invention.
[0047] Fig.11 This is a module diagram of the starting position testing system for the AF module movement according to an embodiment of the present invention. DETAILED DESCRIPTION
[0048] In order to explain the technical content, structural features, achieved objectives and effects of the present invention in detail, the following is a detailed description in conjunction with the implementation methods and the accompanying drawings.
[0049] Embodiment 1
[0050] See also Figures 3 to 11 The present invention discloses a method for testing the starting position of an AF module movement. The focusing platform 10 drives the AF module of the camera 200 to move forward and backward in m steps, respectively, where m is a natural number. The testing method includes:
[0051] S101, calculating the SFR value corresponding to the camera 200 when the focusing platform 10 drives one step each time, so as to obtain a forward SFR data group and a return SFR data group, wherein the forward SFR data group and the return SFR data group respectively include m SFR values;
[0052] Further, the camera 200 includes a shooting end 201, the shooting end 201 is provided with a teleconverter 300 and is arranged corresponding to the SFR test chart 400, and the SFR value corresponding to the camera 200 when the focusing platform 10 is driven one step includes:
[0053] 1. Each time the focusing platform 10 is driven one step, the camera 200 is driven to shoot a test Chart;
[0054] 2. Capture the captured test chart according to the preset ROI area;
[0055] 3. Use the AF algorithm to calculate the captured image to obtain the corresponding SFR value.
[0056] The present invention uses the test chart environment required for the camera 200 test itself to test the SFR data of the camera 200, and processes the data to obtain the initial position of the AF module movement, without using a laser test system to monitor the movement of the AF module, thereby effectively reducing the production cost of the camera 200.
[0057] Specifically, in this embodiment, before the test is performed, it is necessary to first build an SFR focus test environment, construct an SFR test chart 400, place the camera 200 to be tested corresponding to the SFR test chart 400, and specify the size of the central area ROI position of the SFR test on the SFR test platform in advance; the SFR test chart 400 used ( Figure 5 ) is a checkerboard chart, and the ROI area pre-set on the SFR test platform is Figure 5 The box area in the figure is the central area of the test Chart, but is not limited thereto. It is a conventional technique in the art that the SFR test platform uses the captured image to calculate the SFR value through the AF algorithm, so it will not be described in detail.
[0058] Specifically, in this embodiment, m=30, and the focusing platform 10 drives the AF module to move forward and backward with 30 steps respectively, but it is not limited thereto. In some embodiments, the value of m can be adjusted accordingly according to the actual situation of the focusing platform 10 driving the AF module to move. The focusing platform 10 generates a corresponding magnetic field to drive the AF module to move by adjusting the current of the coil in the AF module. Therefore, the whole process of the focusing platform 10 controlling the magnitude of the current passed into the coil is divided into m steps, and the corresponding steps can correspond to the movement position of the AF module. After the starting step of the AF module movement is obtained later, it is used as the focus starting point of the focusing platform 10.
[0059] It can be understood that, in this embodiment, the focusing platform 10 first drives the AF module to move forward with 30 steps, and then executes steps 1 to 3 once for each step to obtain the SFR value corresponding to the camera 200 under the step, and then obtains 30 SFR values to form a forward SFR data set, and then the focusing platform 10 drives the AF module to move backward with 30 steps again, and similarly executes steps 1 to 3 once for each step to obtain another 30 SFR values to form a backward SFR data set. When the number of steps is used as the horizontal coordinate and the SFR value corresponding to the number of steps is used as the vertical coordinate, the forward SFR data set and the backward SFR data set can be converted to obtain the following: Figure 6 The outgoing SFR curve and the return SFR curve are shown, but not limited to them.
[0060] S102, using a weight proportion factor to calculate the weight proportion of SFR values of the same number of steps in the outgoing SFR data group and the return SFR data group to obtain a weighted SFR data group, wherein the weighted SFR data group includes m weighted SFR values;
[0061] Further, step S102 includes:
[0062] S1021, performing mean processing on the SFR values of the same number of steps in the outgoing SFR data group and the return SFR data group to obtain a mean SFR data group, wherein the mean SFR data group includes m mean SFR values;
[0063] Specifically, in this embodiment, the outbound SFR data group includes A: (A1, A2...A29, A30), the return SFR data group includes B: (B1, B2...B29, B30), the mean SFR data group includes C: (C1, C2...C29, C30), and the mean SFR value in the mean SFR data group is obtained by Cn=Avg(An, Bn), for example, C1=Avg(A1, B1), C2=Avg(A2, B2).
[0064] S1022, using the largest mean SFR value in the mean SFR data group to perform weight ratio calculation on each mean SFR value in the mean SFR data group to obtain a first weight ratio factor group and a second weight ratio factor group, wherein the first weight ratio factor group and the second weight ratio factor group respectively include n weight ratio factors;
[0065] Specifically, in this embodiment, the largest mean SFR value C in the mean SFR data set is max By C max =Max(C1, C2...Cn), but not limited to this.
[0066] Furthermore, the weight ratio calculation includes: calculating the first weight ratio factor δ1 using the second formula and the third formula respectively. n and the second weight scaling factor δ2 n , the second formula is δ1 n =1-C n / C max , the third formula is δ2 n =C n / C max , where C max is the maximum mean SFR value in the mean SFR data set, C n is the mean SFR value in the mean SFR data set.
[0067] Specifically, in this embodiment, the first weight proportional factor group includes δ1: (δ11, δ12…δ1 n), the first weight scale factor in the first weight scale factor group is obtained by δ1 n =1-C n / C max We obtain, for example, δ11 = 1 - C1 / C max ,δ12=1-C2 / C max ; The second weight proportional factor group includes δ2: (δ21, δ22…δ2 n ), the second weight scale factor in the second weight scale factor group is obtained by δ2 n =C n / C max We obtain, for example, δ21 = C1 / C max , δ22=C2 / C max ; but not limited to this.
[0068] It is understandable that, in some embodiments, the first weight proportional factor δ1 may also be calculated using the third formula: n , and calculate the second weight proportional factor δ2 using the second formula n For example, the first weight scale factor in the first weight scale factor group is obtained by δ1 n =C n / C max The second weight proportional factor in the second weight proportional factor group is obtained by δ2 n =1-C n / C max get.
[0069] S1023, using the first formula to calculate the SFR values of the same number of steps in the outgoing SFR data group and the return SFR data group in turn, and obtain m weighted SFR values W n , the first formula is W n =A n *δ1 n +B n *δ2 n , where A n is the SFR value in the destination SFR data group, B n To return the SFR value in the SFR data set, δ1 n is the first weight scaling factor in the first weight scaling factor group, δ2 n is the second weight proportional factor in the second weight proportional factor group, n is a natural number, n≤m.
[0070] Calculation using the first formula can place more emphasis on the contribution ratio of the directional motion stroke to the weighted SFR value, which is helpful in reflecting the actual situation when the user uses the camera 200.
[0071] Specifically, in this embodiment, it can be known from the second formula and the third formula that the weighted SFR data set includes W: (W1, W2...W n ), the weighted SFR values in the weighted SFR data set are obtained by W n =A n *(1-C n / C max )+B n *(C n / C max ) to obtain, for example, W1 = A1 * (1-C1 / C max )+B1*(C1 / C max ), W2=A2*(1-C2 / C max )+B2*(C2 / C max ), but not limited thereto, in other embodiments, the weighted SFR value in the weighted SFR data set can also be obtained by W n =A n *(C n / C max )+B n *(1-C n / C max ) is obtained; 30 weighted SFR values are calculated by the first formula to form a weighted SFR data group. When the number of steps is used as the horizontal coordinate and the SFR value corresponding to the number of steps is used as the vertical coordinate, the weighted SFR data group is converted to obtain Figure 7 The weighted SFR curves are shown, but not limited to these.
[0072] S103, taking the number of steps corresponding to the largest weighted SFR value in the weighted SFR data group as the maximum number of steps;
[0073] Specifically, in this embodiment, the largest weighted SFR value W in the weighted SFR data set is max1 By W max1 =Max(W1,W2…W n ) and record the corresponding number of steps, i.e. the maximum number of steps max1; according to the largest weighted SFR value W in the weighted SFR data group max1 right Figure 7 The rising edge of the weighted SFR curve in is intercepted to obtain Figure 8 The weighted SFR rising edge curve is shown, but is not limited to this.
[0074] S104, performing difference calculation on two adjacent weighted SFR values in the weighted SFR data group to obtain a diff data group, wherein the diff data group includes m-1 diff values;
[0075] Further, the difference calculation includes: calculating the diff value D using the fourth formula n, the fourth formula is D n =W n+1 -W n , where W n is the weighted SFR value in the weighted SFR data group, n is a natural number, n≤m.
[0076] It can be understood that, in this embodiment, according to the fourth formula, the diff value D corresponding to the current weight SFR value n It is obtained by subtracting the current weight SFR value from the next weight SFR value. For example, D1 = W2-W1, D2 = W3-W2, and D 30 No calculation is performed.
[0077] S105, using the proportion factor to perform weighted calculation on the diff values corresponding to the maximum step number and the steps before the maximum step number in the diff data group to obtain a weighted diff data group, wherein the number of weighted diff values in the weighted diff data group is consistent with the value of the maximum step number;
[0078] Furthermore, the weighted calculation includes: calculating the weighted diff value H using the fifth formula n , the fifth formula is H n =D n-2 *Δ1+D n-1 *Δ2+D n *Δ3+D n+1 *Δ4+D n+2 *Δ5, where D n is the diff value in the diff data set, the proportion factors include a first factor Δ1, a second factor Δ2, a third factor Δ3, a fourth factor Δ4 and a fifth factor Δ5, and n is a natural number, n≤m.
[0079] The above calculation using five proportion factors can increase the normalization processing of the data, effectively avoid the misjudgment of the result caused by an abnormal value in one of the values, and is conducive to improving the accuracy of the starting step number of the AF module movement obtained subsequently.
[0080] It can be understood that in this embodiment, five proportion factors are used to perform weighted calculation on the current diff value, so the first two diff values and the last two diff values of the current diff value need to be used for calculation, so the diff value of the diff data group is intercepted according to the maximum value step number max1 to obtain the weighted calculation diff data group D1: (D1, D2...D max1 , D max1+1 , D max1+2 ), but are not limited to them.
[0081] Specifically, in this embodiment, when the diff values in the weighted calculation diff data set are used for weighted calculation, since the diff values D1 and D2 cannot be weighted, the corresponding weighted diff values H1 and H2 are not calculated. Figure 8 The diff value corresponding to the weighted SFR rising edge curve is reconstructed. The weighted diff data group includes H (H1, H2...H max1 ), the weighted diff values in the weighted diff data set are calculated by H n =D n-2 *Δ1+D n-1 *Δ2+D n *Δ3+D n+1 *Δ4+D n+2 *Δ5 is calculated, for example,
[0082] H3=D1*Δ1+D2*Δ2+D3*Δ3+D4*Δ4+D5*Δ5,
[0083] H4=D2*Δ1+D3*Δ2+D4*Δ3+D5*Δ4+D6*Δ5,
[0084] …,
[0085] H max1 =D max1-2 *Δ1+D max1-1 *Δ2+D max1 *Δ3+D max1+1 *Δ4+D max1+2 *Δ5.
[0086] But not limited to this, with the number of steps as the horizontal axis and the diff value corresponding to the number of steps as the vertical axis, the weighted diff data set is converted into Fig. 9 The weighted diff curve is shown.
[0087] It should be noted that in some embodiments, the proportion factors may also include only three, namely, a first factor Δ1, a second factor Δ2 and a third factor Δ3. The fifth formula is H n =D n-1 *Δ1+D n *Δ2+D n+1 *Δ3, but not limited to this.
[0088] Further, the first factor Δ1 and the fifth factor Δ5 are 0.1, the second factor Δ2 and the fourth factor Δ4 are 0.2, and the third factor Δ3 is 0.4. However, it is not limited thereto. In some embodiments, the proportion factors may include only three, the first factor Δ1 and the third factor Δ3 are 0.25, and the second factor Δ2 is 0.5.
[0089] S106, comparing the weighted diff values in the weighted diff data set with a preset threshold in sequence, and taking the previous step number corresponding to the first weighted diff value greater than the threshold number as the starting step number of the AF module movement.
[0090] By analyzing the SFR curve obtained by the SFR test system, the actual starting step number N of the AF module focus is obtained. start The step number parameter of the starting point position is used as the reference point of the whole machine AF software, which is conducive to maintaining the consistency between the test identification of the AF module movement state and the focus state of the whole machine platform, and reducing the mismeasurement of subsequent yield test.
[0091] Specifically, in this embodiment, the threshold is set to 0.05, but is not limited thereto. In some embodiments, the threshold may be adjusted accordingly according to actual conditions; Fig. 9 As shown, the threshold is formed as a threshold line, compared with Fig. 9 The weighted diff curve in the figure is gradually increased from 1 step, and the relationship between the weighted diff curve and the threshold line is observed, that is, the weighted diff value corresponding to the step number is compared with the threshold. When the weighted diff curve exceeds the threshold line, the first weighted diff value greater than the threshold corresponds to the previous step number, then this step number is taken as the starting step number N of the AF module movement. start , the focusing platform 10 corresponding to the number of steps controls the current passed into the coil in the AF module, which serves as the focusing starting point of the AF module controlled by the focusing platform 10;
[0092] Similarly, when the threshold line is about to overtake the weighted diff curve, the number of steps after the last weighted diff value greater than the threshold is the end step number N of the AF module movement. end .
[0093] In the present application, the AF module of the camera 200 is driven to perform forward and backward motion in cooperation with the focusing platform 10, and the SFR test system is used to calculate the SFR value corresponding to the camera 200 each time the focusing platform 10 is driven one step, so as to obtain a forward SFR data group and a backward SFR data group; then, the weight proportion factor is used to perform weight proportion calculation on the data in the forward and backward SFR data groups to obtain a weighted SFR data group, and the number of steps corresponding to the maximum value in the data group is taken as the maximum value step; then, a diff data group is calculated from the weighted SFR data group; finally, the proportion factor is used to perform weighted calculation on the diff values corresponding to the maximum value step and the number of steps before the maximum value step in the diff data group to obtain a weighted diff data group; by comparing the weighted diff values in the weighted diff data group with the threshold one by one, the number of steps before the number of steps corresponding to the first weighted diff value greater than the threshold is taken as the starting number of steps for the AF module movement. The SFR value actually returned by the test when the AF module moves is used as a reference to construct an SFR focus curve at the center ROI position, so as to monitor and feedback the movement state of the AF module, and then the SFR data corresponding to the curve is digitized, so as to accurately test and obtain the true starting position of the AF module movement, and use this step number parameter as a reference for the starting point when the focusing platform 10 automatically focuses, thereby effectively improving the accuracy of the camera 200 in autofocusing, and avoiding misjudgment of AF module hardware test failure during production testing due to inaccurate autofocus parameters configured by the AF software.
[0094] Embodiment 2
[0095] See also Fig.10 The present invention also discloses a starting position test device for AF module movement, which comprises:
[0096] A first calculation module 501 is used to calculate the SFR value corresponding to the camera 200 when the focusing platform 10 drives one step at a time;
[0097] The second calculation module 502 is used to calculate the weight proportion of the SFR values of the same number of steps in the outgoing SFR data group and the return SFR data group using the weight proportion factor;
[0098] A value taking module 503, configured to take the number of steps corresponding to the maximum weighted SFR value in the weighted SFR data group as the maximum number of steps;
[0099] The third calculation module 504 is used to calculate the difference between two adjacent weighted SFR values in the weighted SFR data group;
[0100] A fourth calculation module 505 is used to perform weighted calculation on the diff values corresponding to the maximum value step number and the steps before the maximum value step number in the diff data group using the proportion factor;
[0101] The comparison module 506 is used to compare the weighted diff values in the weighted diff data group with the preset thresholds in sequence.
[0102] Embodiment 3
[0103] See also Fig.11 The present invention also discloses a starting position test system for AF module movement, which comprises:
[0104] One or more processors 601;
[0105] One or more memories 602 are used to store one or more programs. When the one or more programs are executed by the processor, the processor implements the starting position test method of the AF module movement as described in the first embodiment.
[0106] Embodiment 4
[0107] The embodiment of the present invention further discloses a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the method for testing the starting position of the AF module movement as described in the first embodiment above is implemented.
[0108] Embodiment 5
[0109] The embodiment of the present application discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of an electronic device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the electronic device executes the above-mentioned starting position test method of the AF module movement.
[0110] It should be understood that in the embodiments of the present application, the processor referred to may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0111] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by hardware related to computer program instructions, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0112] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of rights of the present invention. Therefore, equivalent changes made according to the scope of the patent application of the present invention are still within the scope covered by the present invention.
Claims
1. A method for testing the starting position of AF module movement, characterized in that: The focusing platform drives the AF module of the camera to move forward and backward in m steps respectively, where m is a natural number. The test method includes: S101, calculating the SFR value corresponding to the camera when the focusing platform is driven one step at a time, so as to obtain a destination SFR data group and a return SFR data group, wherein the destination SFR data group and the return SFR data group respectively include m SFR values; S102, using a weight proportional factor to calculate the weight proportion of SFR values of the same number of steps in the outgoing SFR data group and the return SFR data group to obtain a weighted SFR data group, wherein the weighted SFR data group includes m weighted SFR values; S103, taking the number of steps corresponding to the largest weighted SFR value in the weighted SFR data group as the maximum number of steps; S104, performing difference calculation on two adjacent weighted SFR values in the weighted SFR data group to obtain a diff data group, wherein the diff data group includes m-1 diff values; S105, using a proportion factor to perform weighted calculation on the diff values corresponding to the maximum step number and the steps before the maximum step number in the diff data group to obtain a weighted diff data group, wherein the number of weighted diff values in the weighted diff data group is consistent with the value of the maximum step number; S106, comparing the weighted diff values in the weighted diff data group with a preset threshold in sequence, and taking the previous step number corresponding to the first weighted diff value greater than the threshold number as the starting step number of the AF module movement.
2. The method for testing the starting position of the AF module movement according to claim 1, characterized in that: The step S102 includes: S1021, performing mean processing on the SFR values of the same number of steps in the outgoing SFR data group and the return SFR data group to obtain a mean SFR data group, wherein the mean SFR data group includes m mean SFR values; S1022, using the largest mean SFR value in the mean SFR data group to perform weight ratio calculation on each mean SFR value in the mean SFR data group to obtain a first weight ratio factor group and a second weight ratio factor group, wherein the first weight ratio factor group and the second weight ratio factor group respectively include n weight ratio factors; S1023, using the first formula to calculate the SFR values of the same number of steps in the outgoing SFR data group and the return SFR data group in turn, and obtain m weighted SFR values W n , the first formula is W n =A n *δ1 n +B n *δ2 n , where A n is the SFR value in the destination SFR data set, B n is the SFR value in the return SFR data set, δ1 n is the first weight proportional factor in the first weight proportional factor group, δ2 n is the second weight proportional factor in the second weight proportional factor group, n is a natural number, n≤m.
3. The method for testing the starting position of the AF module movement according to claim 2, characterized in that: The weight ratio calculation includes: calculating the first weight ratio factor δ1 using the second formula and the third formula respectively. n and the second weight scaling factor δ2 n , the second formula is δ1 n =1-C n / C max , the third formula is δ2 n =C n / C max , where C max is the maximum mean SFR value in the mean SFR data set, C n is the mean SFR value in the mean SFR data set.
4. The method for testing the starting position of the AF module movement according to claim 1, characterized in that: The difference calculation includes: calculating the diff value D using the fourth formula n , the fourth formula is D n =W n+1 -W n , where W n is the weighted SFR value in the weighted SFR data group, n is a natural number, n≤m.
5. The method for testing the starting position of the AF module movement according to claim 1, characterized in that: The weighted calculation includes: calculating the weighted diff value H using the fifth formula n , the fifth formula is H n =D n-2 *Δ1+D n-1 *Δ2+D n *Δ3+D n+1 *Δ4+D n+2 *Δ5, where D n is the diff value in the diff data set, the proportion factors include a first factor Δ1, a second factor Δ2, a third factor Δ3, a fourth factor Δ4 and a fifth factor Δ5, and n is a natural number, n≤m.
6. The method for testing the starting position of the AF module movement according to claim 5, characterized in that: The first factor Δ1 and the fifth factor Δ5 are 0.1, the second factor Δ2 and the fourth factor Δ4 are 0.2, and the third factor Δ3 is 0.
4.
7. The method for testing the starting position of the AF module movement according to claim 1, characterized in that: The camera includes a shooting end, the shooting end is provided with a teleconverter and is arranged corresponding to the SFR test chart, and the calculation of the SFR value corresponding to the camera when the focusing platform is driven one step includes: Each time the focusing platform is driven one step, the camera is driven to shoot a test chart; Intercept the captured test chart according to the preset central ROI area; The captured image is calculated using the AF algorithm to obtain the corresponding SFR value.
8. A device for testing the starting position of AF module movement, characterized in that: include: The first calculation module is used to calculate the SFR value corresponding to the camera when the focus platform is driven one step at a time; The second calculation module is used to calculate the weight proportion of the SFR values of the same number of steps in the outgoing SFR data group and the return SFR data group using the weight proportion factor; A value-taking module, used for taking the number of steps corresponding to the largest weighted SFR value in the weighted SFR data group as the maximum number of steps; The third calculation module is used to calculate the difference between two adjacent weighted SFR values in the weighted SFR data group; A fourth calculation module, used for performing weighted calculation on the diff values corresponding to the maximum value step number and the steps before the maximum value step number in the diff data group by using the proportion factor; The comparison module is used to compare the weighted diff values in the weighted diff data group with the preset thresholds in sequence.
9. A starting position test system for AF module movement, characterized in that: include: one or more processors; One or more memories are used to store one or more programs. When one or more of the programs are executed by the processor, the processor implements the starting position test method of the AF module movement as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by the processor, the starting position testing method of the AF module movement as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Camera focusing method and system
CN116112793A
Audio channel spatial translation
EP1527655A2