CN117319638A - Method and device for testing starting position of AF (automatic frequency) module movement - Google Patents

Method and device for testing starting position of AF (automatic frequency) module movement Download PDF

Info

Publication number
CN117319638A
CN117319638A CN202311260064.0A CN202311260064A CN117319638A CN 117319638 A CN117319638 A CN 117319638A CN 202311260064 A CN202311260064 A CN 202311260064A CN 117319638 A CN117319638 A CN 117319638A
Authority
CN
China
Prior art keywords
sfr
data set
value
weight
diff
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311260064.0A
Other languages
Chinese (zh)
Inventor
曹能富
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Qiyang Technology Co ltd
Original Assignee
Guangdong Qiyang Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Qiyang Technology Co ltd filed Critical Guangdong Qiyang Technology Co ltd
Priority to CN202311260064.0A priority Critical patent/CN117319638A/en
Publication of CN117319638A publication Critical patent/CN117319638A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/002Diagnosis, testing or measuring for television systems or their details for television cameras

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Focusing (AREA)

Abstract

The invention discloses a method and a device for testing the initial position of AF module movement, wherein the testing method comprises the steps of calculating SFR values of a focusing platform when a camera is driven by one step so as to obtain forward and backward SFR data sets; the SFR values in the forward and backward SFR data sets are calculated by using the weight proportion factors; taking the step number of the largest weight SFR value as the maximum step number; calculating the difference value of the SFR values of the two adjacent weights; weighting calculation is carried out on the diff value of the maximum step number and the previous step number in the diff data set by using the duty factor; and comparing the weighted diff value in the weighted diff data set with a preset threshold value in sequence, and taking the previous step number corresponding to the weighted diff value which is larger than the threshold value as the initial step number of the AF module. The method for testing the initial position of the AF module movement can accurately test and obtain the real initial position of the AF module movement, and the real initial position is used as an initial reference for automatic focusing of a focusing platform, so that the automatic focusing precision of a camera is effectively improved.

Description

Method and device for testing starting position of AF (automatic frequency) module movement
Technical Field
The invention relates to the technical field of camera testing, in particular to a method and a device for testing the initial position of AF (automatic frequency) module movement.
Background
The existing method for testing the initial position of the AF module (auto-focusing optical module) by using a laser testing AF module system (as shown in fig. 1) is that the lens surface of the camera 200 is irradiated by using an infrared laser 100, information of reflected light is captured, then the change of the distance when the AF module physically moves is identified by measuring the information of the reflected light, so as to obtain an AF module movement curve with mA as an abscissa and um as an ordinate, wherein the abscissa represents a current value used when driving the AF module, the abscissa represents the distance of the AF module physically moving, the initial point of a linear section of the AF module movement curve is taken as an AF module movement initial position (start step), the position of the ordinate is taken as a reference, the end point of the linear section of the AF module movement curve is taken as an AF module movement end position (end step), the AF parameter of the initial point is taken as a reference, and finally the AF software of the terminal platform is taken as a reference point of the initial position of the AF module driving the camera 200;
however, the infrared laser 100 is used to monitor the motion of the AF module hardware, the physical motion of the AF module is only affected by many external factors, such as the shake of the whole camera 200, so that the focusing precision of the AF module motion driven by the terminal platform is low, while in the process of actual automatic focusing and photographing, the terminal platform (high pass & MTK) can combine with the SFR analysis value obtained by the actual test to determine whether the AF module moves, the SFR value is related to the motion of the AF module itself, and is related to the MTF capability of lens optics, the test Chart diagram, environmental light and other factors, therefore, the laser monitoring test obtains a motion curve of the AF module to determine that the initial position of the AF module motion driven by the AF software of the terminal platform has an error with the initial position of the AF module motion determined by the SFR value obtained by the test in the actual focusing, so that the normal AF module is not good product is determined in the actual production and test process due to the problem of inaccurate software calibration.
Disclosure of Invention
The invention aims to provide a method and a device for testing the initial position of the movement of an AF module, which can accurately test and obtain the real initial position of the movement of the AF module, take the step number parameter as a reference of the initial point of the focusing platform during automatic focusing, effectively improve the automatic focusing precision of a camera and avoid misjudgment of the hardware test of the AF module during production test caused by the inaccuracy of the automatic focusing parameter configured by AF software.
In order to achieve the above object, the present invention discloses a method for testing a starting position of an AF module motion, in which a focusing platform drives an AF module of a camera to perform forward motion and backward motion in m steps, where m is a natural number, the method includes:
s101, calculating SFR values corresponding to the camera when the focusing platform drives one step, so as to obtain a forward SFR data set and a backward SFR data set, wherein the forward SFR data set and the backward SFR data set respectively comprise m SFR values;
s102, carrying out weight ratio calculation on SFR values of the phase synchronization number in the forward SFR data set and the backward SFR data set by using a weight proportion factor to obtain a weight SFR data set, wherein the weight SFR data set comprises m weight SFR values;
s103, taking the step number corresponding to the largest weight SFR value in the weight SFR data set as the maximum step number;
s104, performing difference value calculation on two adjacent weight SFR values in the weight SFR data set to obtain a diff data set, wherein the diff data set comprises m-1 diff values;
s105, carrying out weighted calculation on the maximum value step number and the diff value corresponding to the step number before the maximum value step number in the diff data set by using a duty factor to obtain a weighted diff data set, wherein the number of the weighted diff values in the weighted diff data set is consistent with the number of the maximum value step number;
s106, comparing the weighted diff values in the weighted diff data set with a preset threshold value in sequence, and taking the previous step number of the step number corresponding to the weighted diff value with the first value larger than the threshold value as the initial step number of the AF module.
Further, the step S102 includes:
s1021, carrying out mean value processing on SFR values of the phase synchronization numbers in the forward SFR data set and the backward SFR data set to obtain a mean SFR data set, wherein the mean SFR data set comprises m mean SFR values;
s1022, carrying out weight proportion calculation on each mean SFR value in the mean SFR data set by utilizing the largest mean SFR value in the mean SFR data set to obtain a first weight proportion factor set and a second weight proportion factor set, wherein the first weight proportion factor set and the second weight proportion factor set respectively comprise n weight proportion factors;
s1023, calculating SFR values of the phase synchronization numbers in the forward SFR data set and the backward SFR data set sequentially according to a first formula, and obtaining m weight SFR values W n The first formula is W n =A n *δ1 n +B n *δ2 n Wherein A is n For SFR values in the outgoing SFR dataset, B n For SFR values in the backward SFR dataset, δ1 n For a first weight scale factor of the first set of weight scale factors, delta 2 n And n is a natural number and is less than or equal to m for the second weight scale factors in the second weight scale factor group.
Further, the weight ratio calculation includes: calculating a first weight scale factor delta 1 according to a second formula and a third formula respectively n And a second weight scale factor delta 2 n The second formula is delta 1 n =1-C n /C max The third formula is delta 2 n =C n /C max Wherein C max For the largest mean SFR value, C in the mean SFR dataset n And (3) taking the mean SFR value as the mean SFR value in the mean SFR data set.
Further, the difference calculation includes: calculating diff value D in fourth formula n The fourth formula is D n =W n+1 -W n Wherein W is n And n is a natural number and is less than or equal to m for the weight SFR value in the weight SFR data set.
Further, the weighting calculation includes: calculating the weighted diff value H by a 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 And for the diff value in the diff data set, the duty factor comprises a first factor delta 1, a second factor delta 2, a third factor delta 3, a fourth factor delta 4 and a fifth factor delta 5, wherein n is a natural number, and n is less than or equal to m.
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.
Further, the camera includes the shooting end, the shooting end is provided with the increase distance mirror and corresponds the setting with SFR test chart card, calculate focusing platform every drive when one step the SFR value that the camera corresponds includes:
when the focusing platform drives one step, driving the camera to shoot a test Chart image;
intercepting a shot test Chart diagram according to a preset center ROI area;
and calculating the intercepted image by utilizing an AF algorithm to obtain a corresponding SFR value.
In order to achieve the above object, the present invention discloses a starting position testing device for AF module movement, comprising:
the first calculation module is used for calculating SFR values corresponding to the cameras when the focusing platform drives one step each time;
the second calculation module is used for calculating the weight ratio of SFR values of the phase synchronization numbers in the forward SFR data set and the backward SFR data set by using the weight ratio factors;
the value taking module is used for taking the step number corresponding to the largest weight SFR value in the weight SFR data set as the maximum step number;
the third calculation module is used for calculating the difference value of two adjacent weight SFR values in the weight SFR data set;
the fourth calculation module is used for carrying out weighted calculation on the maximum value step number and the diff value corresponding to the step number before the maximum value step number in the diff data set by using the duty factor;
and the comparison module is used for sequentially comparing the weighted diff values in the weighted diff data set with a preset threshold value.
In order to achieve the above object, the present invention discloses a start position test system for AF module movement, comprising:
one or more processors;
and one or more memories for storing one or more programs which, when executed by the processor, cause the processor to implement the start position test method of the AF module movement as described above.
In order to achieve the above object, the present invention discloses a computer-readable storage medium having a program stored thereon, characterized in that the program, when executed by a processor, implements a start position test method of AF module movement as described above.
To achieve the above object, the present invention discloses a computer program product or a computer program comprising computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions so that the electronic device performs the start position test method of the AF module movement as described above.
In the application, the AF module of the camera is driven to do forward movement and backward movement by matching with the focusing platform, and the SFR testing system is utilized to calculate the SFR value corresponding to the camera when the focusing platform drives one step at a time so as to obtain a forward SFR data set and a backward SFR data set; then, the weight ratio factor is utilized to calculate the weight ratio of the data in the forward and backward SFR data sets so as to obtain a weight SFR data set, and the step number corresponding to the maximum value in the data set is used as the maximum value step number; calculating by the weighted SFR data set to obtain diff data set; finally, weighting calculation is carried out on the maximum value step number in the diff data set and the diff value corresponding to the step number before the maximum value step number by using the duty factor so as to obtain a weighted diff data set; and comparing the weighted diff value in the weighted diff data set with the threshold value one by one, and taking the previous step number of the step number corresponding to the first weighted diff value which is larger than the threshold value as the initial step number of the AF module motion. And the SFR value returned by the actual test during the movement of the AF module is used as a reference to construct an SFR focus searching curve of the central ROI position, so that the movement state of the AF module is monitored and fed back, then the SFR data corresponding to the curve is subjected to data processing, further the real starting position of the movement of the AF module is accurately tested and obtained, the step number parameter is used as a reference of the starting point during the automatic focusing of the focusing platform, the automatic focusing precision of the camera is effectively improved, and the misjudgment of the hardware testing of the AF module during the production test due to the inaccuracy of the automatic focusing parameter configured by the AF software is avoided.
Drawings
FIG. 1 is a schematic diagram of a conventional AF module system for laser testing.
FIG. 2 is a graph of AF module motion obtained from testing an AF module system for laser testing.
FIG. 3 is a schematic diagram of an SFR test system used in testing SFR values in the method for testing the initial position of the AF module motion according to the embodiment of the invention.
Fig. 4 is a flowchart of a method for testing a start position of an AF module according to an embodiment of the present invention.
Fig. 5 is a schematic diagram of a test Chart shot by a camera when testing SFR values in the initial position test method of AF module movement according to the embodiment of the present invention.
FIG. 6 is a graph of the forward SFR curve and the backward SFR curve in the method for testing the initial position of the AF module motion according to the embodiment of the invention.
Fig. 7 is a graph of a weighted SFR in a method for testing a start position of an AF module movement according to an embodiment of the present invention.
Fig. 8 is a graph of rising edges of the weight SFR in the method for testing the initial position of the AF module movement according to the embodiment of the present invention.
Fig. 9 is a graph of the rising edge curve and the weighted diff curve of the weight SFR in the method for testing the initial position of the AF module motion according to the embodiment of the present invention.
FIG. 10 is a block diagram of an AF module movement start position testing apparatus according to an embodiment of the present invention.
FIG. 11 is a block diagram of a system for testing the initial position of an AF module in accordance with an embodiment of the present invention.
Detailed Description
In order to describe the technical content, the constructional features, the achieved objects and effects of the present invention in detail, the following description is made in connection with the embodiments and the accompanying drawings.
Example 1
Referring to fig. 3 to 11, the invention discloses a method for testing a start position of an AF module, wherein a focusing platform 10 drives the AF module of a camera 200 to move forward and backward respectively in m steps, m is a natural number, and the method comprises:
s101, calculating SFR values corresponding to the camera 200 when the focusing platform 10 drives one step, so as to obtain a forward SFR data set and a backward SFR data set, wherein the forward SFR data set and the backward SFR data set respectively comprise m SFR values;
further, the camera 200 includes a photographing end 201, the photographing end 201 is provided with a distance-increasing mirror 300 and is correspondingly arranged with the SFR test chart 400, and calculating the SFR value corresponding to the camera 200 when the focusing platform 10 drives one step includes:
1. when the focusing platform 10 drives one step, the camera 200 is driven to shoot a test Chart image;
2. intercepting a shot test Chart Chart according to a preset ROI area;
3. and calculating the intercepted image by utilizing an AF algorithm to obtain a corresponding SFR value.
The invention uses the camera 200 to test the SFR data of the camera 200 in the test chart environment which is needed by 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 AF module movement, thereby effectively reducing the production cost of the camera 200.
Specifically, in this embodiment, before testing, an SFR focusing test environment needs to be built, an SFR test chart 400 is built, the camera 200 to be tested is placed corresponding to the SFR test chart 400, and the size of the ROI position of the SFR test center region is specified on the SFR test platform in advance; the SFR test Chart 400 (fig. 5) is a checkerboard Chart, and the ROI area set in the SFR test platform in advance is the box area in fig. 5, i.e. the central area of the test Chart, but not limited thereto, and the SFR test platform calculates the SFR value by using the captured image through the AF algorithm, which is a conventional technology in the art, and therefore will not be described herein.
Specifically, in the present embodiment, m=30, the focusing platform 10 drives the AF module to move forward and backward respectively in 30 steps, but not limited thereto, and in some embodiments, the value of m may be adjusted accordingly according to the situation that the focusing platform 10 actually drives the AF module to move. The focusing platform 10 generates a corresponding magnetic field by adjusting the current of the coil in the AF module to drive the AF module to move, so that the whole process of controlling the current of the coil by the focusing platform 10 is divided into m steps (steps), the corresponding steps can be corresponding to the moving position of the AF module, and the corresponding steps are taken as the focusing starting point of the focusing platform 10 after the initial steps of the AF module are obtained.
It can be understood that in this embodiment, the focusing platform 10 drives the AF module to move forward with 30 steps, then, each step is driven, steps 1 to 3 are executed once to obtain SFR values corresponding to the camera 200 at the step, further 30 SFR values are obtained to form a forward SFR data set, then, the focusing platform 10 drives the AF module to move backward with 30 steps, and also, each step is driven, steps 1 to 3 are executed once to obtain another 30 SFR values to form a backward SFR data set. When the number of steps is on the abscissa and the SFR value corresponding to the number of steps is on the ordinate, the outgoing SFR data set and the incoming SFR data set may be converted to an outgoing SFR curve and an incoming SFR curve as shown in fig. 6, but is not limited thereto.
S102, carrying out weight ratio calculation on SFR values of phase synchronous numbers in a forward SFR data set and a backward SFR data set by using a weight proportion factor so as to obtain a weight SFR data set, wherein the weight SFR data set comprises m weight SFR values;
further, step S102 includes:
s1021, carrying out mean value processing on SFR values of the phase synchronization numbers in the forward SFR data set and the backward SFR data set to obtain a mean SFR data set, wherein the mean SFR data set comprises m mean SFR values;
specifically, in this embodiment, the outgoing SFR dataset includes A: (A1, A2 … a29, a 30) the backward SFR dataset comprises B: (B1, B2 … B29, B30), the mean SFR dataset comprises C: (C1, C2 … C29, C30), the mean SFR values in the mean SFR dataset are obtained by cn=avg (An, bn), for example c1=avg (A1, B1), c2=avg (A2, B2).
S1022, calculating weight proportion of each mean SFR value in the mean SFR data set by using the largest mean SFR value in the mean SFR data set to obtain a first weight proportion factor set and a second weight proportion factor set, wherein the first weight proportion factor set and the second weight proportion factor set respectively comprise n weight proportion factors;
specifically, in the present embodiment, the largest mean SFR value C in the mean SFR dataset max Through C max =max (C1, C2 … Cn), but is not limited thereto.
Further, the weight ratio calculation includes: calculating a first weight scale factor delta 1 according to a second formula and a third formula respectively n And a second weight scale factor delta 2 n The second formula is delta 1 n =1-C n /C max The third formula is delta 2 n =C n /C max Wherein C max For the largest mean SFR value, C in the mean SFR dataset n Is the mean SFR value in the mean SFR data set.
Specifically, in the present embodiment, the first weight scale factor group includes δ1: (δ1) 1 ,δ1 2 …δ1 n ) The first weight scale factor in the first weight scale factor group passes delta 1 n =1-C n /C max Obtained, for example, by delta 1 1 =1-C 1 /C max ,δ1 2 =1-C 2 /C max The method comprises the steps of carrying out a first treatment on the surface of the And the second set of weight scale factors includes δ2: (delta 2) 1 ,δ2 2 …δ2 n ) The second weight scale factor of the second weight scale factor group passes delta 2 n =C n /C max Obtained, for example, delta 2 1 =C 1 /C max ,δ2 2 =C 2 /C max The method comprises the steps of carrying out a first treatment on the surface of the But is not limited thereto.
It will be appreciated that in some embodiments, the first weight scaling factor δ1 may also be calculated in a third formula n And calculating a second weight scale factor delta 2 with a second formula n The method comprises the steps of carrying out a first treatment on the surface of the For example, the first weight scale factor in the first weight scale factor group passes delta 1 n =C n /C max Obtained, and a second of the second set of weight scale factorsWeight scale factor passing delta 2 n =1-C n /C max Obtained.
S1023, sequentially calculating SFR values of the phase synchronization numbers in the forward SFR data set and the backward SFR data set according to a first formula, and obtaining m weight SFR values W n The first formula is W n =A n *δ1 n +B n *δ2 n Wherein A is n To go to SFR value, B in SFR data group n For reverting SFR values in SFR data sets δ1 n Is the first weight scale factor in the first weight scale factor group, delta 2 n And n is a natural number and is less than or equal to m.
The calculation of the contribution ratio of the travel to the motion to the weight SFR value by using the first formula is more effective to reflect the situation when the user actually uses the camera 200.
Specifically, in the present embodiment, as known from the second formula and the third formula, the weighted SFR data set includes W: (W) 1 ,W 2 …W n ) The weight SFR value in the weight SFR data set passes W n =A n *(1-C n /C max )+B n *(C n /C max ) Obtained, for example, by W 1 =A 1 *(1-C 1 /C max )+B 1 *(C 1 /C max ),W 2 =A 2 *(1-C 2 /C max )+B 2 *(C 2 /C max ) But is not limited thereto, in other embodiments, the weighted SFR values in the weighted SFR dataset may also be represented by W n =A n *(C n /C max )+B n *(1-C n /C max ) Obtaining; 30 weight SFR values are calculated through a first formula to form a weight SFR data set, and when the steps are taken as an abscissa and SFR values corresponding to the steps are taken as an ordinate, the weight SFR data set is converted to obtain a weight SFR curve shown in fig. 7, but the method is not limited to the method.
S103, taking the step number corresponding to the largest weight SFR value in the weight SFR data set as the maximum step number;
concrete embodimentsIn the present embodiment, the largest weight SFR value W in the weight SFR data set max1 By W max1 =Max(W 1 ,W 2 …W n ) Obtaining and recording the corresponding step number, namely the maximum step number max1; according to the maximum weight SFR value W in the weight SFR data set max1 The rising edge of the weighted SFR curve in fig. 7 is truncated to obtain the weighted SFR rising edge curve as shown in fig. 8, but is not limited thereto.
S104, carrying out difference value calculation on two adjacent weight SFR values in the weight SFR data set to obtain a diff data set, wherein the diff data set comprises m-1 diff values;
further, the difference calculation includes: calculating diff value D in fourth formula n The fourth formula is D n =W n+1 -W n Wherein W is n And n is a natural number and is equal to or less than m, and is a weight SFR value in the weight SFR data set.
It will be appreciated that in this embodiment, as can be seen from the fourth equation, the diff value D corresponding to the current weight SFR value n Is obtained by subtracting the current weight SFR value from the latter weight SFR value, e.g., D 1 =W 2 -W 1 ,D 2 =W 3 -W 2 And D is 30 No calculation process is performed.
S105, carrying out weighted calculation on the maximum value step number and the diff value corresponding to the step number before the maximum value step number in the diff data set by using the duty factor so as to obtain a weighted diff data set, wherein the number of the weighted diff values in the weighted diff data set is consistent with the number of the maximum value step number;
further, the weighting calculation includes: calculating the weighted diff value H by a 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 For diff values in the diff data set, the duty factor comprises a first factor delta 1, a second factor delta 2, a third factor delta 3, a fourth factor delta 4 and a fifth factor delta 5, wherein n is a natural number, and n is less than or equal to m.
The normalization processing of the data can be increased by utilizing the five duty factors for calculation, so that the misjudgment of the result caused by one numerical value abnormality is effectively avoided, and the accuracy of the initial step number of the AF module movement obtained later is improved.
It will be appreciated that in the present embodiment, the present diff value is weighted by five duty factors, so that the first two diff values and the second two diff values of the present diff value need to be used for calculation, so that the diff values of the diff data set are intercepted according to the maximum step number max1 to obtain the weighted diff data set D1: (D) 1 ,D 2 …D max1 ,D max1+1 ,D max1+2 ) But is not limited thereto.
Specifically, in the present embodiment, when the weight calculation is performed using the diff value in the weight calculation diff data group, since the diff value D cannot be calculated 1 And D 2 The weighting calculation is performed so that the corresponding weighted diff value H 1 And H 2 Without calculation, the weighted diff data set includes H (H 1 ,H 2 …H max1 ) The weighted diff values in the weighted diff data set pass through H n =D n-2 *Δ1+D n-1 *Δ2+D n *Δ3+D n+1 *Δ4+D n+2 * Δ5 is calculated from the time of the calculation, for example,
H 3 =D 1 *Δ1+D 2 *Δ2+D 3 *Δ3+D 4 *Δ4+D 5 *Δ5,
H 4 =D 2 *Δ1+D 3 *Δ2+D 4 *Δ3+D 5 *Δ4+D 6 *Δ5,
…,
H max1 =D max1-2 *Δ1+D max1-1 *Δ2+D max1 *Δ3+D max1+1 *Δ4+D max1+2 *Δ5。
however, the present invention is not limited thereto, and the weighted diff curve shown in fig. 9 is obtained by converting the weighted diff data set with the number of steps as the abscissa and the diff value corresponding to the number of steps as the ordinate.
It should be noted that, in some embodiments, the duty factor may also include only three, respectively the firstFactor Δ1, a second factor Δ2, and a third factor Δ3, the fifth formula being H n =D n-1 *Δ1+D n *Δ2+D n+1 * Δ3, but is not limited thereto.
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. But is not limited thereto, in some embodiments the duty cycle factor may include only three, the first factor Δ1 and the third factor Δ3 being 0.25 and the second factor Δ2 being 0.5.
S106, comparing the weighted diff value in the weighted diff data set with a preset threshold value (threshold) in sequence, and taking the previous step number of the step number corresponding to the weighted diff value which is larger than the threshold value as the initial step number of the AF module.
The real initial step number N of the AF module focusing is obtained by analyzing the SFR curve obtained by the SFR test system start The step number parameter at the starting point position is used as a reference point of the whole machine AF software, so that consistency of the test identification AF module moving state and the focusing state of the whole machine platform is maintained, and false detection of subsequent yield test is reduced.
Specifically, in the present embodiment, the threshold is set to 0.05, but not limited thereto, and in some embodiments, the threshold may be adjusted accordingly according to the actual situation; as shown in FIG. 9, the threshold is formed as a threshold line, and the relationship between the weighted diff curve and the threshold line is observed by gradually increasing from 1 in the weighted diff curve in FIG. 9, i.e., the weighted diff value corresponding to the number of steps is compared with the threshold value, and when the weighted diff curve exceeds the threshold line, the first step number greater than the previous step number corresponding to the weighted diff value of the threshold value is regarded as the initial step number N of the AF module movement start The focusing platform 10 corresponding to the step number controls the current of the coil which is fed into the AF module, and is used as a focusing starting point for controlling the AF module by the focusing platform 10;
similarly, when the threshold line is about to reversely superpose the diff curve, the last step number corresponding to the weighted diff value larger than the threshold is N, which is the end step number of the AF module movement end
In the application, the AF module of the camera 200 is driven to move forward and backward by matching with the focusing platform 10, and SFR values corresponding to the camera 200 are calculated by using the SFR test system when the focusing platform 10 drives one step at a time so as to obtain a forward SFR data set and a backward SFR data set; then, the weight ratio factor is utilized to calculate the weight ratio of the data in the forward and backward SFR data sets so as to obtain a weight SFR data set, and the step number corresponding to the maximum value in the data set is used as the maximum value step number; calculating by the weighted SFR data set to obtain diff data set; finally, weighting calculation is carried out on the maximum value step number in the diff data set and the diff value corresponding to the step number before the maximum value step number by using the duty factor so as to obtain a weighted diff data set; and comparing the weighted diff value in the weighted diff data set with the threshold value one by one, and taking the previous step number of the step number corresponding to the first weighted diff value which is larger than the threshold value as the initial step number of the AF module motion. The SFR value returned by the actual test during the movement of the AF module is used as a reference to construct the SFR focus searching curve of the central 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 subjected to data processing, so that the real starting position of the movement of the AF module is accurately tested and obtained, the step number parameter is used as a reference of the starting point during the automatic focusing of the focusing platform 10, the automatic focusing precision of the camera 200 is effectively improved, and the misjudgment of the hardware testing of the AF module during the production test due to the inaccuracy of the automatic focusing parameter configured by the AF software is avoided.
Example two
Referring to fig. 10, the present invention also discloses a starting position testing device for AF module movement, which includes:
the first calculating module 501 is configured to calculate an SFR value corresponding to the camera 200 when the focusing platform 10 drives one step;
the second calculating module 502 is configured to perform weight ratio calculation on the SFR values of the phase synchronization numbers in the outgoing SFR data set and the return SFR data set by using the weight scaling factor;
a value module 503, configured to take, as a maximum step number, a step number corresponding to a maximum weight SFR value in the weight SFR data set;
a third calculation module 504, configured to perform difference calculation on two adjacent weight SFR values in the weight SFR data set;
a fourth calculation module 505, configured to perform weighted calculation on the maximum number of steps in the diff data set and the diff value corresponding to the number of steps before the maximum number of steps by using the duty factor;
and the comparison module 506 is configured to sequentially compare the weighted diff values in the weighted diff data set with a preset threshold.
Example III
Referring to fig. 11, the present invention also discloses a system for testing the initial position of the AF module, which comprises:
one or more processors 601;
the one or more memories 602 are configured to store one or more programs, which when executed by the processor, cause the processor to implement the method for testing the start position of the AF module movement according to the first embodiment.
Example IV
The embodiment of the invention also discloses a computer readable storage medium, wherein a program is stored in the computer readable storage medium, and the program is executed by a processor to realize the initial position test method of the AF module movement in the embodiment.
Example five
Embodiments of the present application disclose a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the initial position testing method of the AF module motion.
It should be appreciated that in embodiments of the present application, the processor may be a central processing module (CentralProcessing Unit, CPU), which may also be other general purpose processors, digital signal processors (DigitalSignal Processor, DSP), application specific integrated circuits (Application SpecificIntegrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Those skilled in the art will appreciate that all or part of the processes in the methods of the embodiments described above may be implemented by hardware associated with computer program instructions, and the program may be stored in a computer readable storage medium, where the program when executed may include processes in embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-only memory (ROM), a Random access memory (Random AccessMemory, RAM), or the like.
The foregoing description of the preferred embodiments of the present invention is not intended to limit the scope of the claims, which follow, as defined in the claims.

Claims (10)

1. The method for testing the initial position of the movement of the AF module is characterized in that the focusing platform drives the AF module of the camera to do forward movement and backward movement respectively in m steps, and m is a natural number, and the method comprises the following steps:
s101, calculating SFR values corresponding to the camera when the focusing platform drives one step, so as to obtain a forward SFR data set and a backward SFR data set, wherein the forward SFR data set and the backward SFR data set respectively comprise m SFR values;
s102, carrying out weight ratio calculation on SFR values of the phase synchronization number in the forward SFR data set and the backward SFR data set by using a weight proportion factor to obtain a weight SFR data set, wherein the weight SFR data set comprises m weight SFR values;
s103, taking the step number corresponding to the largest weight SFR value in the weight SFR data set as the maximum step number;
s104, performing difference value calculation on two adjacent weight SFR values in the weight SFR data set to obtain a diff data set, wherein the diff data set comprises m-1 diff values;
s105, carrying out weighted calculation on the maximum value step number and the diff value corresponding to the step number before the maximum value step number in the diff data set by using a duty factor to obtain a weighted diff data set, wherein the number of the weighted diff values in the weighted diff data set is consistent with the number of the maximum value step number;
s106, comparing the weighted diff values in the weighted diff data set with a preset threshold value in sequence, and taking the previous step number of the step number corresponding to the weighted diff value with the first value larger than the threshold value as the initial step number of the AF module.
2. The method for testing the starting position of the AF module as claimed in claim 1, wherein said step S102 comprises:
s1021, carrying out mean value processing on SFR values of the phase synchronization numbers in the forward SFR data set and the backward SFR data set to obtain a mean SFR data set, wherein the mean SFR data set comprises m mean SFR values;
s1022, carrying out weight proportion calculation on each mean SFR value in the mean SFR data set by utilizing the largest mean SFR value in the mean SFR data set to obtain a first weight proportion factor set and a second weight proportion factor set, wherein the first weight proportion factor set and the second weight proportion factor set respectively comprise n weight proportion factors;
s1023, calculating SFR values of the phase synchronization numbers in the forward SFR data set and the backward SFR data set sequentially according to a first formula, and obtaining m weight SFR values W n The first formula is W n =A n *δ1 n +B n *δ2 n Wherein A is n For SFR values in the outgoing SFR dataset, B n For SFR values in the backward SFR dataset, δ1 n For a first weight scale factor of the first set of weight scale factors, delta 2 n And n is a natural number and is less than or equal to m for the second weight scale factors in the second weight scale factor group.
3. The method of claim 2, wherein the method comprises the steps ofThe weight ratio calculation includes: calculating a first weight scale factor delta 1 according to a second formula and a third formula respectively n And a second weight scale factor delta 2 n The second formula is delta 1 n =1-C n /C max The third formula is delta 2 n =C n /C max Wherein C max For the largest mean SFR value, C in the mean SFR dataset n And (3) taking the mean SFR value as the mean SFR value in the mean SFR data set.
4. The method of claim 1, wherein the calculating the difference comprises: calculating diff value D in fourth formula n The fourth formula is D n =W n+1 -W n Wherein W is n And n is a natural number and is less than or equal to m for the weight SFR value in the weight SFR data set.
5. The method of claim 1, wherein the weighting calculation includes: calculating the weighted diff value H by a 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 And for the diff value in the diff data set, the duty factor comprises a first factor delta 1, a second factor delta 2, a third factor delta 3, a fourth factor delta 4 and a fifth factor delta 5, wherein n is a natural number, and n is less than or equal to m.
6. The method according to claim 5, wherein 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 initial position of the AF module according to claim 1, wherein the camera includes a shooting end, the shooting end is provided with a distance-increasing mirror and is correspondingly arranged with an SFR test chart card, and calculating the SFR value corresponding to the camera when the focusing platform drives one step includes:
when the focusing platform drives one step, driving the camera to shoot a test Chart image;
intercepting a shot test Chart diagram according to a preset center ROI area;
and calculating the intercepted image by utilizing an AF algorithm to obtain a corresponding SFR value.
8. An apparatus for testing the initial position of an AF module, comprising:
the first calculation module is used for calculating SFR values corresponding to the cameras when the focusing platform drives one step each time;
the second calculation module is used for calculating the weight ratio of SFR values of the phase synchronization numbers in the forward SFR data set and the backward SFR data set by using the weight ratio factors;
the value taking module is used for taking the step number corresponding to the largest weight SFR value in the weight SFR data set as the maximum step number;
the third calculation module is used for calculating the difference value of two adjacent weight SFR values in the weight SFR data set;
the fourth calculation module is used for carrying out weighted calculation on the maximum value step number and the diff value corresponding to the step number before the maximum value step number in the diff data set by using the duty factor;
and the comparison module is used for sequentially comparing the weighted diff values in the weighted diff data set with a preset threshold value.
9. An AF module movement start position test system, comprising:
one or more processors;
one or more memories for storing one or more programs which, when executed by the processor, cause the processor to implement the method for testing the starting position of AF module movements according to any one of claims 1 to 7.
10. A computer-readable storage medium having a program stored thereon, wherein the program when executed by a processor implements the start position test method of AF module movement according to any one of claims 1 to 7.
CN202311260064.0A 2023-09-26 2023-09-26 Method and device for testing starting position of AF (automatic frequency) module movement Pending CN117319638A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311260064.0A CN117319638A (en) 2023-09-26 2023-09-26 Method and device for testing starting position of AF (automatic frequency) module movement

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311260064.0A CN117319638A (en) 2023-09-26 2023-09-26 Method and device for testing starting position of AF (automatic frequency) module movement

Publications (1)

Publication Number Publication Date
CN117319638A true CN117319638A (en) 2023-12-29

Family

ID=89236667

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311260064.0A Pending CN117319638A (en) 2023-09-26 2023-09-26 Method and device for testing starting position of AF (automatic frequency) module movement

Country Status (1)

Country Link
CN (1) CN117319638A (en)

Similar Documents

Publication Publication Date Title
US11245832B2 (en) Video recording method and electronic device
US10698308B2 (en) Ranging method, automatic focusing method and device
CN110850872A (en) Robot inspection method and device, computer readable storage medium and robot
EP2474809A1 (en) Device for processing stereo images, method for processing stereo images, and program
JP5841844B2 (en) Image processing apparatus and image processing method
US20160073005A1 (en) Interchangeable lens apparatus, image capturing apparatus and storage medium storing focusing program
US10165188B2 (en) Optical apparatus, display controlling method, and non-transitory computer readable storage medium storing a program, that display object distance information
CN112653835B (en) Method and device for judging focusing state and storage medium
US20210006709A1 (en) Control device, photographing device, control method, and program
CN107026979A (en) Double-camera photographing method and device
CN111970500A (en) Automatic distance step calibration method and system for projection equipment
CN112734759B (en) Method and device for determining trigger point of flying shooting
CN112598719B (en) Depth imaging system, calibration method thereof, depth imaging method and storage medium
CN111556311B (en) Quality detection method and device for fixed-focus camera module and computer storage medium
CN116182786B (en) Monocular vision ranging method, camera and medium
US10339665B2 (en) Positional shift amount calculation apparatus and imaging apparatus
JP2008298589A (en) Device and method for detecting positions
CN117319638A (en) Method and device for testing starting position of AF (automatic frequency) module movement
CN110418068B (en) Focusing method, device, electronic equipment and storage medium
CN110839126B (en) Zoom tracking method and device and zoom camera
CN113028997B (en) Method, device and equipment for measuring travel allowance of lens group and storage medium
US10917554B2 (en) Lens apparatus, image capturing apparatus, camera system, determination method of correction value and storage medium
US9930245B2 (en) Focus control apparatus and control method for the same
US11800223B2 (en) Focus adjustment device and focus adjustment method
CN114088628B (en) Microscope measuring method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination