Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, an object of the present invention is to provide a method for verifying a device for testing performance of a camera module, which can improve the verification accuracy of the device for testing performance of the camera module to be verified in the case that the product of the camera module is out of focus.
It is a further object of the present invention to provide a non-transitory computer storage medium.
Another object of the present invention is to provide an electronic device.
In order to solve the above problem, an embodiment of the first aspect of the present invention provides a method for verifying a camera module performance testing device, including obtaining a first set of SFR (spatial frequency response) values and a second set of SFR values, where the first set of SFR values are obtained based on test images obtained by a testing device to be verified at a plurality of different object distances of a camera module, and the second set of SFR values are obtained based on test images obtained by a standard testing device at a plurality of different object distances of the camera module; obtaining a peak value test deviation value of the test equipment to be verified and the standard test equipment according to the first group of SFR values and the second group of SFR values; and correcting the relation between the SFR value of the test equipment to be verified and the object distance according to the peak value test deviation value.
According to the method for verifying the camera module performance test equipment, the SFR values of the test equipment to be verified and the standard test equipment under a plurality of different object distances are respectively obtained, and the test equipment to be verified and the standard test equipment are compared according to the corresponding relation between the first group of SFR values and the object distances and the corresponding relation between the second group of SFR values and the object distances.
In some embodiments, obtaining the peak test deviation value of the device under test to be verified from the standard test device according to the first set of SFR values and the second set of SFR values includes fitting a first SFR fit curve of the device under test to be verified based on the first set of SFR values and the camera module multiple different object distances, and fitting a second SFR fit curve of the standard test device based on the second set of SFR values and the camera module multiple different object distances; obtaining a first maximum peak value of the first SFR fitting curve and a second maximum peak value of the second SFR fitting curve, and obtaining a first object distance value corresponding to the first maximum peak value and a second object distance value corresponding to the second maximum peak value; calculating a maximum peak difference between the first maximum peak and the second maximum peak, and calculating a subject distance difference between the first subject distance value and the second subject distance value, the maximum peak difference and the subject distance difference being the test deviation value. The test data of the test equipment to be verified and the test data of the standard test equipment are compared in a curve fitting mode, so that the difference of the peak value of the curve can be observed conveniently, and support is provided for compensating the test equipment to be verified.
In some embodiments, correcting the relation between the SFR value and the object distance of the device under test to be verified according to the peak test deviation value includes compensating the SFR value in the first SFR fitting curve according to the maximum peak difference, and compensating the object distance value in the first SFR fitting curve according to the object distance difference to obtain the adjusted relation between the SFR value and the object distance of the device under test to be verified, so as to provide support for the device under test to be verified to compensate the peak test deviation according to the relation.
In some embodiments, compensating for the SFR values in the first SFR-fit curve according to the maximum peak difference and compensating for the object distance values in the first SFR-fit curve according to the object distance difference comprises: the maximum peak difference is zero, and the SFR value in the first SFR fitting curve keeps the original SFR value; the object distance difference is a non-zero value, and the object distance value in the first SFR fitting curve is subtracted from the object distance difference. Therefore, the test error between the test equipment to be verified and the standard test equipment can be reduced by compensating the object distance value corresponding to the maximum peak value of the test equipment to be verified.
In some embodiments, compensating for the SFR values in the first SFR-fit curve according to the maximum peak difference and compensating for the object distance values in the first SFR-fit curve according to the object distance difference comprises: the object distance difference is zero, and the object distance value in the first SFR fitting curve keeps the original object distance value; subtracting the SFR value in the first SFR fitting curve from the maximum peak difference, wherein the maximum peak difference is a non-zero value. Therefore, the test error between the test equipment to be verified and the standard test equipment can be reduced by compensating the SFR value of the test equipment to be verified.
In some embodiments, compensating for the SFR values in the first SFR-fit curve according to the maximum peak difference and compensating for the object distance values in the first SFR-fit curve according to the object distance difference comprises: and subtracting the SFR value in the first SFR fitting curve from the maximum peak difference, and subtracting the object distance value in the first SFR fitting curve from the object distance difference. Therefore, the test error between the test equipment to be verified and the standard test equipment can be reduced by compensating the SFR value and the object distance value of the test equipment to be verified.
In some embodiments, obtaining the first set of SFR values and the second set of SFR values includes: and acquiring the first group of SFR values and the second group of SFR values at preset intervals so as to carry out error debugging on the test equipment to be verified again and improve the accuracy of the test equipment to be verified.
In some embodiments, the method further comprises: and sending the corrected relation between the SFR value and the object distance of the test equipment to be verified to the test equipment to be verified, so that the test equipment to be verified compensates the peak test deviation value according to the relation, and the test equipment to be verified is consistent with the standard test equipment under multiple object distances.
An embodiment of a second aspect of the present invention provides a non-transitory computer storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for verifying a device for testing performance of a camera module according to the above embodiment, so as to reduce a problem of a debugging error of a device to be tested under a condition that the camera module is out of focus, so that the device to be tested can obtain accurate debugging, and improve the verification accuracy of the device to be tested.
An embodiment of a third aspect of the present invention provides an electronic device, which is adapted to be connected to a test image processing end of a test device to be calibrated and a test image processing end of a standard test device, respectively, when calibrating the performance test device of the camera module, and the electronic device includes: a processor; a memory in communication with the processor; the memory stores a computer program, and the processor executes the computer program to implement the method for verifying the camera module performance test equipment according to the embodiment.
According to the electronic equipment provided by the embodiment of the invention, the processor executes the method for verifying the camera module performance test equipment provided by the embodiment, so that the verification precision of the test equipment to be verified can be improved.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Detailed Description
Embodiments of the present invention will be described in detail below, the embodiments described with reference to the drawings being illustrative, and the embodiments of the present invention will be described in detail below.
In order to solve the above problem, the following describes a method for verifying a camera module performance testing device according to an embodiment of the first aspect of the present invention, with reference to the accompanying drawings, which can improve the verification accuracy of the testing device to be verified in the case that the camera module product is out of focus.
Fig. 1 shows a method for verifying a performance testing apparatus for a camera module according to an embodiment of the present invention, where as shown in fig. 1, the method according to the embodiment of the present invention at least includes steps S1-S3.
In step S1, a first set of SFR values and a second set of SFR values are obtained.
The first group of SFR values are obtained based on test images obtained by the test equipment to be verified under a plurality of different object distances of the camera module, and the second group of SFR values are obtained based on test images obtained by the standard test equipment under a plurality of different object distances of the camera module.
In the embodiment, the camera module is respectively placed in the test equipment to be verified and the standard test equipment for testing, and the Chart height can be adjusted based on the inside of the test equipment, so that the purpose of testing under different object distances is achieved.
Specifically, the object distance of the camera module is changed to perform testing, test images output under different object distances are obtained, the resolution, namely the SFR value, of the output test image under each object distance is obtained through a software algorithm, so that the corresponding relation between a plurality of different object distances and the SFR value is obtained, and step S2 is executed. The software algorithm is a technical content known to those skilled in the art, and will not be described in detail.
For example, as shown in fig. 2, taking an optimally focused object distance of 35cm as an example, changing the distance from the test object to the camera module, that is, changing the object distance, where the object distance may range from 24cm to 57cm, where, within the range from 24cm to 35cm, an SFR value may be obtained every 2 cm; SFR values were obtained at 5cm intervals in the range of 35cm to 57 cm. The segmentation rule can be set according to actual conditions, and is not limited to this, it can be understood that the smaller the segmentation distance is, the more the obtained test scores, i.e., SFR values are, and the more accurate the debugging results of the test device to be verified are.
And step S2, obtaining a peak value test deviation value of the test equipment to be verified and the standard test equipment according to the first group of SFR values and the second group of SFR values.
In an embodiment, based on that the to-be-verified test device and the standard test device are both provided with independent image processing terminals, the obtained first group of SFR values and the obtained second group of SFR values may be transmitted to the image processing terminals of the corresponding test devices for data processing, and then the test data of the to-be-verified test device and the test data of the standard test device are compared, and if the peak test deviation value is greater than a certain error threshold, step S3 is executed.
And step S3, correcting the relation between the SFR value and the object distance of the test equipment to be verified according to the peak test deviation value.
In an embodiment, the image processing end of the device to be tested may feed back a difference between the test SFR value of the device to be tested and the standard test device, that is, a peak test deviation value, and correct a relation between the SFR value of the device to be tested and the object distance according to the peak test deviation value, so as to provide support for the device to be tested to compensate the test error according to the relation, that is, compensate the peak test deviation.
According to the method for verifying the camera module performance test equipment, the SFR values of the test equipment to be verified and the standard test equipment under a plurality of different object distances are respectively obtained, and the test equipment to be verified and the standard test equipment are compared according to the corresponding relation between the first group of SFR values and the object distances and the corresponding relation between the second group of SFR values and the object distances.
In some embodiments, in methods of embodiments of the present invention, for obtaining peak test deviation values for the device under test to be verified and the standard test device based on the first set of SFR values and the second set of SFR values, may include fitting a first SFR fit curve for the test device to be verified based on the first set of SFR values and a plurality of different object distances for the camera module, and fitting a second SFR fitting curve of the standard test equipment based on the second set of SFR values and a plurality of different object distances of the camera module, further acquiring a first maximum peak value of the first SFR fitting curve and a second maximum peak value of the second SFR fitting curve, and obtaining a first object distance value corresponding to the first maximum peak value and a second object distance value corresponding to the second maximum peak value, calculating a maximum peak value difference between the first maximum peak value and the second maximum peak value, and calculating the object distance difference between the first object distance value and the second object distance value, and taking the maximum peak value difference and the object distance difference as test deviation values. That is, according to the first group of SFR values and the second group of SFR values, the test result may be fitted through a second-order or high-order equation to obtain a relationship curve between the SFR values and different object distances, that is, a first SFR fitting curve and a second SFR fitting curve, and then the first SFR fitting curve and the second SFR fitting curve are compared to record a maximum peak value and an object distance corresponding to the maximum peak value, so as to compensate the device to be tested according to a peak value difference and an object distance difference between the two fitting curves.
In some embodiments, the method of the embodiments of the present invention, for correcting the relationship between the SFR value and the object distance of the device under test to be verified according to the peak test deviation value, may include compensating the SFR value in the first SFR fitting curve according to the maximum peak difference, and compensating the object distance value in the first SFR fitting curve according to the object distance difference, so as to obtain the adjusted relationship between the SFR value and the object distance of the device under test to be verified.
In some embodiments, in the method of the embodiments of the present invention, for compensating the SFR value in the first SFR fitted curve according to the maximum peak difference and compensating the object distance value in the first SFR fitted curve according to the object distance difference, it may include that the maximum peak difference is zero, and the SFR value in the first SFR fitted curve maintains the original SFR value; and when the object distance difference is a non-zero value, subtracting the object distance value and the object distance difference in the first SFR fitting curve.
For example, as shown in fig. 3, taking a 35cm object distance optimal focusing camera module as an example, the average SFR of the standard test device at the 35cm optimal object distance is 0.63, at this time, the test device to be verified is 0.61, that is, the SFR value of the test device to be verified and the SFR value of the standard test device at the object distance of 35cm are 2% different, if the test device to be verified is compensated by 2% according to the existing conforming manner, but it can be found by the method of the embodiment of the present invention through the multi-segment object distance test that the maximum peak value difference of the test device to be verified and the standard test device is zero, and the object distance difference is non-zero value, that is, the camera module of the test device to be verified is out of focus by 4.5cm, so that the out of focus error of the module can be eliminated by compensating the object distance of the test device to be verified, and the test scores of the two devices are not different.
In some embodiments, in methods of embodiments of the invention, compensating for the SFR value in the first SFR fit curve according to the maximum peak difference and compensating for the object distance value in the first SFR fit curve according to the object distance difference may include that the object distance difference is zero and the object distance value in the first SFR fit curve remains the original object distance value; and subtracting the SFR value in the first SFR fitting curve from the maximum peak difference when the maximum peak difference is a non-zero value. That is, the method of the embodiment of the present invention can find that the object distance difference between the test device to be verified and the standard test device is zero and the maximum peak value is non-zero through the multi-segment object distance test, so that the test error of the test device to be verified can be eliminated by compensating the SFR value of the test device to be verified, and the test scores of the two devices are not different.
In some embodiments, methods of embodiments of the present invention may include, for compensating for the SFR value in the first SFR fit curve based on the maximum peak difference and for compensating for the object distance value in the first SFR fit curve based on the object distance difference, both the maximum peak difference and the object distance difference being non-zero values, subtracting the SFR value from the maximum peak difference in the first SFR fit curve, and subtracting the object distance value from the object distance difference in the first SFR fit curve.
For example, as shown in fig. 4, taking an optimal focusing module with an object distance of 35cm as an example, the average SFR of the standard testing equipment tested at the optimal object distance of 35cm is 0.63, and the testing equipment to be tested is also 0.63. If the test equipment to be verified is not required to be compensated according to the existing coincidence mode, but the method of the embodiment of the invention can find that the maximum peak difference and the object distance difference between the test equipment to be verified and the standard test equipment are all nonzero values through a multi-section object distance test, as shown in fig. 4, a camera module of the test equipment to be verified is defocused by 9cm, and the SFR value of the test equipment to be verified is still higher than that of the standard test equipment by 6% after the defocusing amount is compensated, that is, under the condition, the test equipment to be verified has two errors, if the two errors are superposed according to the existing coincidence mode, the test error of the test equipment to be verified can be hidden, and the test equipment to be verified can not be debugged accurately, but the method of the embodiment of the invention can avoid the problem of the test error based on the multi-section object distance test and a multi-direction comparison test data mode, the purpose of accurately debugging the test equipment to be verified is achieved.
In some embodiments, the obtaining of the first group of SFR values and the second group of SFR values in the method according to the embodiments of the present invention may include obtaining the first group of SFR values and the second group of SFR values every preset time, so as to perform error debugging on the device to be tested again, and improve the accuracy of the device to be tested.
In some embodiments, the method according to the embodiments of the present invention further includes sending the corrected relational expression between the SFR value and the object distance of the device to be tested to the device to be tested, so that the device to be tested compensates the peak test deviation value according to the relational expression, so that the device to be tested is consistent with the standard test device under multiple object distances.
Fig. 4 is a graph obtained by fitting the standard test equipment and the test equipment to be verified in a certain object distance range according to the SFR values, and the relational expression between the resolution and the object distance is obtained according to the first SFR fitting curve and the second SFR fitting curve respectively.
For example, the SFR value of a standard test device is related to the object distance by the following equation:
Y0=-7E-07X4+0.0001X3-0.0096X2+0.2935X-2.6373(X value range: 10cm-60cm)
The relation between the SFR value of the test equipment to be verified and the object distance is as follows:
Y1=-7E-07X4+0.0001X3-0.0063X2+0.1516X-0.6293(X value range: 10cm-60cm)
Can be obtained by calculation of Y0(x) Has a maximum peak value of Y0_max=0.63,Y1(x) Has a maximum peak value of Y1Max is 0.68, so the maximum peak difference Δ Y is Y1_max-Y0Max is 0.05. Further, Y can be obtained from the object distance value corresponding to the maximum peak value0(x) The curve of (a) corresponds to an object distance of X (Y) at the maximum peak value0_max)=35,Y1(x) The curve of (a) corresponds to an object distance of X (Y) at the maximum peak value1Max) is 26, so the object distance difference Δ X is X (Y)1_max)-X(Y0Max) — 9. Therefore, the temperature of the molten metal is controlled,performing compensation calculation on the test equipment to be verified, wherein Y is required1Is compensated to Y0Consistent levels, i.e. requiring pairs Y1Making corresponding adjustment to obtain Y1-0.05=-7E-07(x+9)4+0.0001(x+9)3-0.0063(x+9)2+0.1516(x +9) -0.6293, inputting the program to the device to be tested to compensate for different object distances, so that the device to be tested is consistent with the standard device under multiple object distances, thereby realizing the purpose of debugging the device to be tested accurately.
Therefore, according to the method provided by the embodiment of the invention, the standard test equipment and the test equipment to be verified are subjected to sample matching, the value of an MTF fitting curve at the optimal object distance is compared by adopting a multi-section object distance test, the test data of the maximum peak value and the object distance at the maximum peak value are accurately compared in multiple directions to obtain the test difference between the two equipment, and the object distance, the defocusing amount and other differences of the test equipment to be verified are compensated by utilizing the corrected SFR value and object distance relational expression through the fitting curve, so that the test equipment to be verified is suitable for the comparison of any object distance and any defocusing product, and the test equipment to be verified is more accurately debugged.
In a second aspect, the present invention provides a non-transitory computer storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for verifying the performance testing apparatus for a camera module provided in the foregoing embodiments.
An embodiment of the third aspect of the present invention provides an electronic device, which is adapted to be connected to a test image processing terminal of a test device to be calibrated and a test image processing terminal of a standard test device, respectively, when calibrating a camera module performance test device, as shown in fig. 5, an electronic device 1 according to an embodiment of the present invention includes a processor 3 and a memory 2 in communication with the processor 3.
The memory 2 stores a computer program, and the processor 3 implements the method for verifying the camera module performance test device provided by the above embodiment when executing the computer program.
According to the electronic equipment provided by the embodiment of the invention, the processor 3 executes the method for verifying the camera module performance test equipment provided by the embodiment, so that the accuracy of the camera module performance test equipment can be improved.
In the description of this specification, any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of custom logic functions or processes, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an illustrative embodiment," "an example," "a specific example," or "some examples" or the like mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example.
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.