Method, electronic equipment and system for testing variable aperture

By testing the gear reference aperture and drive motor reference code of the variable aperture camera module, the problem of insufficient detection accuracy in the prior art is solved, and the accuracy and reliability of the quality detection of the variable aperture module are achieved.

CN119135881APending Publication Date: 2024-12-13KUNSHAN Q TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411180889.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

In the prior art, the quality detection accuracy of the variable aperture camera module cannot be ensured, resulting in the inability to ensure its quality.

Method used

By determining the reference aperture of each gear and the reference code of the drive motor, the driving accuracy of the drive motor, the opening and closing accuracy and opening consistency of the variable aperture, the roundness of the light inlet hole, and the center of the reference incision circle are tested. Deviation, industrial cameras and electronic devices are used for image recognition and analysis to ensure the accuracy of test results.

Benefits of technology

The accuracy of the quality detection of variable aperture camera modules is improved, the reliability and accuracy of the detection results are ensured, and the quality of the modules is qualified.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135881A_ABST
    Figure CN119135881A_ABST
Patent Text Reader

Abstract

The invention provides a method, electronic equipment and a system for testing an iris diaphragm. The method comprises the following steps: determining a reference aperture and a reference code corresponding to each gear of the iris diaphragm; testing the driving precision by using the standard code and the reference code; testing the opening and closing precision and the opening and closing consistency of the variable aperture by using the reference aperture and the standard aperture; testing the roundness of the light inlet hole according to the inscribed circle and the maximum circumscribed circle; carrying out concentricity test on the inscribed circle of the light inlet hole according to the circle center of the inscribed circle of the light inlet hole; testing the center deviation of the reference inscribed circle according to the reference inscribed circle and the standard circle; therefore, a plurality of test items including the driving precision, the opening and closing precision and the opening and closing consistency of the variable aperture, the roundness of the light inlet hole and the center deviation of the reference inscribed circle are tested respectively, and if all test results are qualified, the quality of the variable aperture camera module is qualified. Therefore, the quality detection precision of the camera module can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of camera module testing, and in particular to a method, electronic equipment and system for testing a variable aperture. Background Art

[0002] With the improvement of the quality of life, users have higher and higher requirements for the shooting effect of mobile phone camera modules. Therefore, the camera module must adapt to shooting in different environments (high light, low light). At present, the camera module with variable aperture function can change the effect of high and low light shooting by adjusting the size of the aperture petals to change the light receiving strength of the lens (lens); at the same time, it can also change the depth of field and detail expression to make the photos taken more layered and textured, which can well meet the user's demand for image quality.

[0003] In order to ensure the quality of the camera module with a variable aperture, it is necessary to perform a quality test on the camera module before it leaves the factory. However, in the prior art, there are too few test items for the variable aperture camera module. Therefore, even if the camera module is tested, the detection accuracy cannot be ensured, and thus the quality of the variable aperture camera module may not be ensured. Summary of the invention

[0004] In response to the problems existing in the prior art, the embodiments of the present invention provide a method, electronic device and system for testing a variable aperture, so as to solve or partially solve the technical problem in the prior art that when performing quality inspection on a variable aperture camera module, the inspection accuracy cannot be ensured, which leads to the inability to ensure the inspection quality of the variable aperture camera module.

[0005] According to a first aspect of the present invention, there is provided a method for testing a variable aperture, the method comprising:

[0006] Determine the reference aperture corresponding to each gear of the variable aperture and the reference code of the driving motor; the aperture is the aperture of the light inlet formed by the petals of the variable wreath;

[0007] The driving accuracy of the driving motor is tested using the standard code of the driving motor corresponding to each gear and the reference code of the driving motor;

[0008] Using the reference aperture and the standard aperture corresponding to each gear position to test the opening and closing accuracy and opening and closing consistency of the variable aperture;

[0009] Determine the inscribed circle and the maximum circumscribed circle of the light well at each gear position, and test the true roundness of the light well according to the inscribed circle and the maximum circumscribed circle; and perform concentricity test on the inscribed circle of the light well at each gear position according to the center of the inscribed circle of the light well at each gear position;

[0010] A reference inscribed circle of a light-entry hole formed when the petals of the variable aperture are opened to the maximum is determined, and a center deviation of the reference inscribed circle is tested based on the reference inscribed circle and a pre-calibrated standard circle.

[0011] In the above solution, the step of determining the reference aperture corresponding to each gear position of the variable aperture includes:

[0012] For any position of the variable aperture, perform the following processing:

[0013] Obtain a standard code of the drive motor corresponding to the gear position, and determine a code test range of the drive motor according to the standard code; control the drive motor to move within the code test range according to a preset step length, and obtain a corresponding image each time it moves a step length; perform image recognition on the image to obtain a current aperture; obtain a difference between the current aperture and the standard aperture corresponding to the gear position when the absolute value is less than or equal to a preset first threshold, and determine the current aperture as a reference aperture corresponding to the gear position; the image is obtained by photographing the variable aperture with an industrial camera;

[0014] The above steps are executed a preset number of times to obtain a plurality of reference apertures corresponding to the gear positions.

[0015] In the above solution, performing image recognition on the image to obtain the current aperture includes:

[0016] Performing binarization processing on the image to obtain a binarized image;

[0017] Acquire the edge contour of the binary image, and fit the edge contour to obtain a polygonal contour;

[0018] Obtaining the intersection of two adjacent edges in the polygonal outline, and determining the midpoint of the two adjacent intersections;

[0019] An inscribed circle of the polygonal outline is fitted according to the midpoint, wherein the center of the inscribed circle of the polygonal outline is the intersection point of the perpendicular lines of any two sides;

[0020] The diameter of the inscribed circle is determined as the current aperture.

[0021] In the above solution, the driving accuracy of the driving motor is tested by using the standard code of the driving motor corresponding to each gear and the reference code of the driving motor, including:

[0022] Determine a first difference between the standard code and the reference code at each gear position;

[0023] If it is determined that the absolute value of the first difference corresponding to each gear is less than or equal to the second threshold corresponding to the gear, it is determined that the driving accuracy of the driving motor is qualified; wherein the second threshold corresponding to each gear is different.

[0024] In the above scheme, the use of the reference aperture and the standard aperture corresponding to each gear position to test the opening and closing accuracy and opening and closing consistency of the variable aperture includes:

[0025] For each gear position, respectively determine a second difference between a plurality of reference apertures and the standard aperture;

[0026] If it is determined that the absolute value of the maximum second difference under each gear position is less than or equal to the third threshold value corresponding to the gear position, it is determined that the opening and closing accuracy of the variable aperture is qualified;

[0027] Determine the average aperture of multiple reference apertures at each gear position;

[0028] For any two adjacent gears, obtaining a third difference between the average apertures of the adjacent gears;

[0029] If it is determined that the absolute value of each third difference is less than or equal to the corresponding fourth threshold, it is determined that the opening and closing properties of the variable aperture are consistent.

[0030] In the above solution, the testing of the true roundness of the light intake hole according to the inscribed circle and the maximum circumscribed circle includes:

[0031] Obtaining the center and radius of the inscribed circle at each gear position;

[0032] Taking the center of the inscribed circle as the reference point, taking any point on the polygonal outline circumscribed by the inscribed circle as the reference point;

[0033] Determine the distance between the benchmark point and the reference point, and determine the maximum distance as the radius of the circumscribed circle of the polygonal outline;

[0034] Obtaining a fourth difference between the circumscribed circle radius and the inscribed circle radius;

[0035] If it is determined that the fourth difference values ​​in all gears are smaller than the preset fifth threshold value, it is determined that the roundness of the light intake hole is qualified.

[0036] In the above scheme, the concentricity test of the inscribed circle of the light intake hole at each gear position is performed according to the center of the inscribed circle of the light intake hole at each gear position, including:

[0037] Obtaining a first center of the inscribed circle of the light intake hole at the minimum gear position and a second center of the inscribed circle of the light intake hole at the remaining gear positions;

[0038] respectively determining a first distance between a second circle center corresponding to each remaining gear and the first circle center;

[0039] If it is determined that the distance corresponding to each remaining gear is less than or equal to the preset sixth threshold, it is determined that the concentricity of the inscribed circle of the light-entering hole at each gear is qualified.

[0040] In the above scheme, testing the center deviation of the reference inscribed circle according to the reference inscribed circle and a pre-calibrated standard circle includes:

[0041] Obtaining the third center of the reference inscribed circle and the fourth center of the standard circle;

[0042] determining a second distance between the third center of the circle and the fourth center of the circle;

[0043] If it is determined that the second distance is less than or equal to a preset seventh threshold, it is determined that the center deviation of the reference inscribed circle is qualified.

[0044] A second aspect of the present invention provides an electronic device for testing a variable aperture, the device comprising:

[0045] A determination unit, used to determine the reference aperture corresponding to each gear position of the variable aperture and the reference code of the driving motor; the aperture is the aperture of the light inlet formed by the petals of the variable wreath;

[0046] A testing unit, used to test the driving accuracy of the driving motor by using the standard code of the driving motor corresponding to each gear and the reference code of the driving motor;

[0047] Using the reference aperture and the standard aperture corresponding to each gear position to test the opening and closing accuracy and opening and closing consistency of the variable aperture;

[0048] Determine the inscribed circle and the maximum circumscribed circle of the light well at each gear position, and test the true roundness of the light well according to the inscribed circle and the maximum circumscribed circle; and perform concentricity test on the inscribed circle of the light well at each gear position according to the center of the inscribed circle of the light well at each gear position;

[0049] A reference inscribed circle of a light-entry hole formed when the petals of the variable aperture are opened to the maximum is determined, and a center deviation of the reference inscribed circle is tested based on the reference inscribed circle and a pre-calibrated standard circle.

[0050] A third aspect of the present invention provides a system for testing a variable aperture, the system comprising: a module to be tested provided with a variable aperture, an industrial camera, and the electronic device described in the second aspect; wherein:

[0051] The module to be tested is placed on a test table, and the module to be tested is electrically connected to the electronic device;

[0052] The industrial camera is located above the module to be tested, the industrial camera is electrically connected to the electronic device through a signal line, and the industrial camera is used to shoot the variable aperture at different gears to obtain corresponding images;

[0053] The electronic device is used to analyze the image to obtain the reference aperture corresponding to each gear position of the variable aperture and the reference code of the driving motor; the aperture is the aperture of the light inlet formed by the petals of the variable wreath; the driving accuracy of the driving motor is tested using the standard code of the driving motor corresponding to each gear position and the reference code of the driving motor; the opening and closing accuracy and opening and closing consistency of the variable aperture are tested using the reference aperture and standard aperture corresponding to each gear position; the inscribed circle and the maximum circumscribed circle of the light inlet under each gear position are determined, and the true roundness of the light inlet is tested according to the inscribed circle and the maximum circumscribed circle; and the concentricity of the inscribed circle of the light inlet under each gear position is tested according to the center of the inscribed circle of the light inlet under each gear position; the reference inscribed circle of the light inlet formed when the petals of the variable aperture are opened to the maximum is determined, and the center deviation of the reference inscribed circle is tested according to the reference inscribed circle and a pre-calibrated standard circle.

[0054] The present invention provides a method, electronic device and system for testing a variable aperture, the method comprising: determining a reference aperture corresponding to each gear position of the variable aperture and a reference code of the driving motor; the aperture is the aperture of a light inlet formed by petals of a variable wreath; using the standard code of the driving motor corresponding to each gear position and the reference code of the driving motor to test the driving accuracy of the driving motor; using the reference aperture and the standard aperture corresponding to each gear position to test the opening and closing accuracy and opening and closing consistency of the variable aperture; determining the inscribed circle and the maximum circumscribed circle of the light inlet under each gear position, and testing the true roundness of the light inlet according to the inscribed circle and the maximum circumscribed circle; and testing the true roundness of the light inlet according to each gear position. The center of the inscribed circle of the light inlet hole is determined, and the concentricity of the inscribed circle of the light inlet hole in each gear is tested; the reference inscribed circle of the light inlet hole formed when the petals of the variable aperture are opened to the maximum is determined, and the center deviation of the reference inscribed circle is tested according to the reference inscribed circle and a pre-calibrated standard circle; in this way, when performing quality inspection on the module to be tested with a variable aperture, multiple test items including the driving accuracy of the driving motor, the opening and closing accuracy of the variable aperture, the opening and closing consistency, the true roundness of the light inlet hole and the center deviation of the reference inscribed circle are tested respectively. If the test results of all the test items are qualified, it can be said that the quality of the variable aperture camera module is qualified, thereby improving the accuracy of the camera module quality inspection. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0056] Figure 1 A schematic diagram of the structure of a system for testing a variable aperture according to an embodiment of the present invention is shown;

[0057] Figure 2 A schematic flow chart of a method for testing a variable aperture according to an embodiment of the present invention is shown;

[0058] Figure 3 A schematic diagram showing a variable aperture opened to a maximum state according to an embodiment of the present invention is shown;

[0059] Figure 4 A schematic diagram of an inscribed circle of a light entrance hole corresponding to a variable aperture at a Z2 position according to an embodiment of the present invention is shown;

[0060] Figure 5 A schematic diagram showing an inscribed circle and a maximum circumscribed circle of a light entrance hole corresponding to a variable aperture according to an embodiment of the present invention is shown;

[0061] Figure 6 A schematic diagram showing a reference inscribed circle and a natural circle corresponding to a maximum light intake hole according to an embodiment of the present invention is shown;

[0062] Figure 7 A schematic structural diagram of an electronic device for testing a variable aperture according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0063] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0064] In order to better understand the technical solution of the present invention, a system for testing a variable aperture is first introduced here. Figure 1 As shown, the system includes: a module to be tested 1 provided with a variable aperture, an industrial camera 2, and an electronic device 3;

[0065] The module to be tested 1 is placed on the test table 4, and the module to be tested 1 is electrically connected to the electronic device 3;

[0066] The industrial camera 2 is located above the module to be tested. The industrial camera 2 is electrically connected to the electronic device 3 via a signal line. The industrial camera 2 is used to shoot the variable aperture at different gears to obtain corresponding images.

[0067] Specifically, a fixture 5 is placed on the test table 4 , and the module to be tested 1 is placed in the fixture 5 for lighting up the module to be tested 1 .

[0068] A bracket 6 is also provided on the test table 4, and the industrial camera 2 is suspended on the bracket. The industrial camera 2 is located above the module to be tested 1 so as to clearly take pictures of the variable aperture of the module to be tested 1. In addition, a light source 7 is also installed on the bracket 6, and the light source 7 is used to illuminate the area where the module to be tested 1 is located, so as to improve the shooting quality of the module to be tested 1 by the industrial camera 2.

[0069] The electronic device 3 is electrically connected to the industrial camera 2 and the module to be tested 1 through signal lines, and is used to control the movement of the driving motor, thereby controlling the opening and closing of the variable aperture.

[0070] During the opening and closing process of the variable aperture, the industrial camera 2 is used to shoot the variable aperture to obtain an image of the variable aperture at each gear position. The industrial camera 2 transmits the image to the electronic device 3 through a signal line. The electronic device 3 may be a computer device with image recognition software installed. The electronic device 3 is used to:

[0071] The image is analyzed to obtain the reference aperture corresponding to each gear position of the variable aperture and the reference code of the driving motor; the aperture is the aperture of the light inlet formed by the petals of the variable wreath; the driving accuracy of the driving motor is tested using the standard code of the driving motor corresponding to each gear position and the reference code of the driving motor; the opening and closing accuracy and opening and closing consistency of the variable aperture are tested using the reference aperture and the standard aperture corresponding to each gear position; the inscribed circle and the maximum circumscribed circle of the light inlet under each gear position are determined, and the true roundness of the light inlet is tested based on the inscribed circle and the maximum circumscribed circle; and the concentricity of the inscribed circle of the light inlet under each gear position is tested based on the center of the inscribed circle of the light inlet under each gear position; the reference inscribed circle of the light inlet formed when the petals of the variable aperture are opened to the maximum is determined, and the center deviation of the reference inscribed circle is tested based on the reference inscribed circle and a pre-calibrated standard circle.

[0072] The specific method for the electronic device 3 to analyze the image and test each test item can be referred to the subsequent implementation of the electronic device 3, so it will not be repeated here.

[0073] Based on the same inventive concept as the above embodiments, the present invention provides a method for testing a variable aperture, such as Figure 2 As shown, the method comprises the following steps:

[0074] S110, determining a reference aperture corresponding to each gear position of the variable aperture and a reference code of the driving motor; the aperture is the aperture of the light inlet formed by the petals of the variable wreath.

[0075] In practical applications, the drive motor is needed to control the opening and closing of the variable aperture. The travel range of the drive motor is 0 to 1023 code. The variable aperture has 4 gears, namely Z1, Z2, Z3, and Z4. When the drive motor is 0 code, it corresponds to the Z1 gear. At this time, the variable aperture is in the maximum open state. The maximum open state can be as follows Figure 3 When the drive motor is 160 code, it corresponds to the Z2 gear, and the variable aperture is closed.

[0076] Among them, code is the step unit of the drive motor. In order to better understand the meaning of code, here is an example explanation:

[0077] For example, the total distance of the driving motor travel range is 1mm, that is, the total distance is 1000μm. If the total distance is divided into 1000 codes, then 1code = 1μm. When the step length is 2codes, it is equivalent to the step length of the driving motor being 2μm.

[0078] Since it is necessary to use the relevant data of each gear (aperture and code of the driving motor) to perform various tests when testing the variable aperture, the present invention needs to determine the reference aperture corresponding to each gear of the variable aperture and the reference code of the driving motor; the aperture is the aperture of the light inlet formed by the petals of the variable wreath.

[0079] In one implementation, determining a reference aperture corresponding to each gear position of the variable aperture includes:

[0080] For any position of the variable aperture, do the following:

[0081] Obtain the standard code of the drive motor corresponding to the gear position, and determine the code test range of the drive motor according to the standard code; control the drive motor to move within the code test range according to a preset step length, and obtain a corresponding image each time it moves a step length; perform image recognition on the image to obtain the current aperture; obtain the difference between the current aperture and the standard aperture corresponding to the gear position, and if the difference is less than or equal to a preset first threshold, determine the current aperture as the reference aperture corresponding to the gear position; the image is obtained by photographing the variable aperture with an industrial camera;

[0082] Execute the above steps a preset number of times to obtain multiple reference apertures corresponding to the gear positions.

[0083] In one implementation, performing image recognition on an image to obtain a current aperture includes:

[0084] Binarize the image to obtain a binary image;

[0085] Obtain the edge contour of the binary image, fit the edge contour, and obtain the polygonal contour;

[0086] Get the intersection point of two adjacent edges in the polygon outline and determine the midpoint of the two adjacent intersection points;

[0087] The inscribed circle of the polygonal outline is fitted according to the midpoint, and the center of the inscribed circle of the polygonal outline is the intersection point of the perpendicular lines of any two sides;

[0088] The diameter of the inscribed circle is determined as the current hole diameter.

[0089] Specifically, each gear position is pre-burned with a corresponding standard code. For example, for the Z2 gear position, the corresponding standard code of the drive motor is 160code. According to the standard code, the code test range of the drive motor in the Z2 gear position is determined, for example, it can be [150code, 170code]. Starting from 150code, every time the drive motor moves a step (1code), the industrial camera is used to shoot the variable aperture to obtain the corresponding image. Then the image is recognized to obtain the current aperture of the light inlet. Among them, the image is as follows Figure 4 shown.

[0090] In this way, each time the drive motor moves a step, a corresponding current aperture can be determined. All current apertures are compared with the corresponding standard apertures under the Z2 gear. If the absolute value of the difference between the current aperture and the standard aperture is less than or equal to the first threshold (for example, it can be 0.02mm), it means that the current aperture is the reference aperture corresponding to the Z2 gear, and the code of the drive motor is the reference code corresponding to the Z2 gear.

[0091] For example, assuming that in an image captured by 161code, the absolute value of the difference between the current aperture and the reference aperture in the image is determined to be 0.01, then 161code can be determined as the reference code corresponding to the Z2 gear position.

[0092] In this way, for each gear position, the reference aperture and reference code of the gear position can be determined.

[0093] It should be noted that in order to improve the test accuracy, the present invention needs to repeat a preset number of times (for example, 3 times) for each gear when determining the reference aperture and reference code of each gear, so that multiple reference apertures and multiple reference codes can be determined for each gear.

[0094] S111 , testing the driving accuracy of the driving motor by using the standard code of the driving motor corresponding to each gear and the reference code of the driving motor.

[0095] In one embodiment, the driving accuracy of the driving motor is tested using the standard code of the driving motor corresponding to each gear and the reference code of the driving motor, including:

[0096] Determine the absolute value of the first difference between the standard code and the reference code in each gear position;

[0097] If it is determined that the absolute value of the first difference corresponding to each gear is less than or equal to the second threshold corresponding to the gear, it is determined that the driving accuracy of the drive motor is qualified; wherein the second threshold corresponding to each gear is different.

[0098] It should be noted that, since each gear corresponds to multiple reference codes, the first difference also includes multiple values. The present invention compares the maximum absolute value of the first difference with the second threshold of the gear. If the maximum absolute value of the first difference is less than or equal to the second threshold, it is determined that the driving accuracy of the driving motor is qualified.

[0099] Moreover, the second threshold corresponding to each gear is different. For example, the second threshold corresponding to the Z2 gear may be 5 code, and the second threshold corresponding to the Z3 gear may be 10 code.

[0100] If, in each gear, the maximum absolute value of the first difference is smaller than the second threshold value corresponding to the gear, it is determined that the driving accuracy of the driving motor is qualified.

[0101] S112, using the reference aperture and the standard aperture corresponding to each gear position to test the opening and closing accuracy and opening and closing consistency of the variable aperture.

[0102] The present invention also needs to test the opening and closing accuracy and opening and closing consistency of the petals. In one embodiment, the opening and closing accuracy and opening and closing consistency of the variable aperture are tested using the reference aperture and the standard aperture corresponding to each gear position, including:

[0103] For each gear position, determining a second difference between a plurality of reference apertures and a standard aperture respectively;

[0104] If it is determined that the absolute value of the maximum second difference under each gear is less than or equal to the third threshold value corresponding to each gear, it is determined that the opening and closing accuracy of the variable aperture is qualified;

[0105] Determine the average aperture of multiple reference apertures at each gear position;

[0106] For any two adjacent gears, obtaining a third difference between the average apertures of the adjacent gears;

[0107] If it is determined that the absolute values ​​of the third differences corresponding to all adjacent gears are less than or equal to the preset fourth threshold, it is determined that the opening and closing properties of the variable aperture are consistent.

[0108] Specifically, when testing the opening and closing accuracy of the variable aperture, multiple tests are also performed for each gear. As described above, multiple reference apertures can be determined in each gear, so the second difference between multiple reference apertures and the standard aperture can be determined in each gear. If the absolute value of the maximum second difference in each gear is less than or equal to the third threshold corresponding to the gear, it is determined that the opening and closing accuracy is qualified.

[0109] It should be noted that the third threshold value corresponding to each gear is also different. The specific value can be determined based on actual conditions and is not limited here.

[0110] When testing the opening and closing consistency of the variable aperture, it is necessary to first determine the average aperture of multiple reference apertures in each gear, and then determine the third difference between the average apertures corresponding to any two adjacent gears; if it is determined that the absolute value of each third difference is less than or equal to the corresponding fourth threshold, it is determined that the opening and closing of the variable aperture is consistent. Among them, the fourth thresholds corresponding to different adjacent gears are different

[0111] For example, since the variable aperture includes four gears Z1 to Z4, adjacent gears include: Z1 and Z2 gears, Z2 and Z3 gears, and Z3 and Z4 gears, if it is determined that the absolute value of the third difference determined in the Z1 and Z2 gears is less than or equal to 100μm, the absolute value of the third difference determined in the Z2 and Z3 gears is less than or equal to 150μm, and the absolute value of the third difference determined in the Z3 and Z4 gears is less than or equal to 150μm, it can be determined that the opening and closing consistency of the variable aperture is qualified.

[0112] S113, determining the inscribed circle and the maximum circumscribed circle of the light well at each gear position, and testing the true roundness of the light well based on the inscribed circle and the maximum circumscribed circle; and performing a concentricity test on the inscribed circle of the light well at each gear position based on the center of the inscribed circle of the light well at each gear position.

[0113] When testing the true roundness of the light well, it is necessary not only to determine the inscribed circle of the light well at each gear position, but also to determine the maximum circumscribed circle of the light well, and then test the true roundness of the light well based on the inscribed circle and the circumscribed circle.

[0114] In one implementation, testing the true roundness of the light intake hole according to the inscribed circle and the maximum circumscribed circle includes:

[0115] Get the center and radius of the inscribed circle in each gear position;

[0116] The center of the inscribed circle is taken as the base point, and any point on the polygonal outline circumscribed by the inscribed circle is taken as the reference point;

[0117] Determine the distance between the reference point and the reference point, and determine the maximum distance as the radius of the circumscribed circle of the polygonal outline;

[0118] Obtaining a fourth difference between the circumscribed circle radius and the inscribed circle radius;

[0119] If it is determined that the fourth difference values ​​in all gears are smaller than the preset fifth threshold value, it is determined that the roundness of the light intake hole is qualified.

[0120] Specifically, the method for determining the inscribed circle of the light-entering hole can refer to the relevant description in the above step S110, which will not be repeated here. Figure 5 , the radius of the inscribed circle is R1, the center of the inscribed circle is taken as the reference point, and any point on the polygonal contour circumscribed by the inscribed circle is taken as the reference point; the distance between the reference point and the reference point is determined, and the maximum distance is determined as the radius R2 of the circumscribed circle of the polygonal contour.

[0121] Similarly, in order to improve the test accuracy, multiple tests can be performed at each gear position, so each gear position corresponds to multiple inscribed circle radii and multiple circumscribed circle radii, and then the average value of the multiple inscribed circle radii and the average value of the multiple circumscribed circle radii can be determined, and then the fourth difference ΔR between the inscribed circle radius and the circumscribed circle radius can be determined according to formula (1):

[0122] ΔR=R2′-R1′ (1)

[0123] In formula (1), R2′ is the average value of multiple circumscribed circle radii, and R1′ is the average value of multiple inscribed circle radii.

[0124] Since the fifth thresholds corresponding to different gears are different, if all the fourth differences are less than or equal to the corresponding fifth thresholds, it is determined that the roundness of the light intake hole is qualified.

[0125] For example, the fifth threshold corresponding to the Z2 gear position may be 0.0004, the fifth threshold corresponding to the Z3 gear position may be 0.001, and the fifth threshold corresponding to the Z3 gear position may be 0.002.

[0126] In one implementation, the concentricity test of the inscribed circle of the light hole at each gear position is performed according to the center of the inscribed circle of the light hole at each gear position, including:

[0127] Obtaining a first center of the inscribed circle of the light-entering hole at the minimum gear position and a second center of the inscribed circle of the light-entering hole at the remaining gear positions;

[0128] respectively determining a first distance between a second circle center corresponding to each remaining gear and the first circle center;

[0129] If it is determined that the distance corresponding to each remaining gear is less than or equal to the preset sixth threshold, it is determined that the concentricity of the inscribed circle of the light-entering hole at each gear is qualified.

[0130] Specifically, when performing a concentricity test on the inscribed circle of the light inlet hole at different gears, it is necessary to determine the center of the inscribed circle at different gears.

[0131] Then, taking the first center of the inscribed circle corresponding to the minimum gear position Z1 as the reference point, the second center of the inscribed circle corresponding to the Z2 gear position, the second center of the inscribed circle corresponding to the Z3 gear position, and the second center of the inscribed circle corresponding to the Z4 gear position are determined respectively.

[0132] According to the first center of the circle and each second center of the circle, the first distance between the Z1 gear and the Z2 gear, the first distance between the Z1 gear and the Z3 gear, and the first distance between the Z1 gear and the Z4 gear are determined respectively; if all the first distances are less than or equal to the sixth threshold value corresponding to the gear, it is determined that the concentricity of the inscribed circle of the light entrance hole under the gear is qualified.

[0133] The sixth threshold corresponding to each gear is different. For example, the sixth threshold corresponding to the Z2 gear may be 100 μm, the sixth threshold corresponding to the Z3 gear may be 150 μm, and the sixth threshold corresponding to the Z4 gear may be 150 μm.

[0134] S114, determining a reference inscribed circle of the light entrance hole formed when the petals of the variable aperture are opened to the maximum, and testing the center deviation of the reference inscribed circle according to the reference inscribed circle and a pre-calibrated standard circle.

[0135] Finally, the center deviation of the reference inscribed circle of the light entrance hole formed when the variable aperture petals are opened to the maximum must be tested.

[0136] When the drive motor is at 0 code, the iris diaphragm is opened to the maximum. At this time, the light hole is the largest. The image recognition algorithm in step S110 can be used to determine the reference inscribed circle corresponding to the largest light hole. The reference inscribed circle can be as follows: Figure 6 As shown in the yellow circle.

[0137] Then, the center deviation of the reference inscribed circle is tested based on the reference inscribed circle and the pre-calibrated standard circle, including:

[0138] Obtain the third center of the reference inscribed circle and the fourth center of the standard circle;

[0139] determining a second distance between the center of the third circle and the center of the fourth circle;

[0140] If it is determined that the second distance is less than or equal to the preset seventh threshold, it is determined that the center deviation of the reference inscribed circle is qualified.

[0141] The seventh threshold value may be set according to actual needs, such as 100 μm, and is not limited here.

[0142] The standard circle is pre-calibrated. The standard circle is the natural circle corresponding to the position of the petals when the iris diaphragm petals are opened to the maximum (it can be understood as the largest circle where the petals are located). The natural circle can be referenced Figure 6 The red circle in Figure 3 The red circle.

[0143] It can be seen that when the present invention performs quality inspection on the module to be tested which is provided with a variable aperture, multiple test items are tested respectively, including the driving accuracy of the driving motor, the opening and closing accuracy of the variable aperture, the opening and closing consistency, the true roundness of the light entrance hole, and the center deviation of the reference inscribed circle. If the test results of all the test items are qualified, it can be said that the quality of the variable aperture camera module is qualified, thereby improving the accuracy of the camera module quality inspection.

[0144] Based on the same inventive concept as in the above-mentioned embodiment, this embodiment also provides an electronic device for testing a variable aperture, such as Figure 7 As shown, the device includes:

[0145] The determination unit 71 is used to determine the reference aperture corresponding to each gear position of the variable aperture and the reference code of the driving motor; the aperture is the aperture of the light inlet formed by the petals of the variable wreath;

[0146] A testing unit 72, used to test the driving accuracy of the driving motor by using the standard code of the driving motor corresponding to each gear and the reference code of the driving motor;

[0147] Using the reference aperture and the standard aperture corresponding to each gear position to test the opening and closing accuracy and opening and closing consistency of the variable aperture;

[0148] Determine the inscribed circle and the maximum circumscribed circle of the light well at each gear position, and test the true roundness of the light well according to the inscribed circle and the maximum circumscribed circle; and perform concentricity test on the inscribed circle of the light well at each gear position according to the center of the inscribed circle of the light well at each gear position;

[0149] A reference inscribed circle of a light-entry hole formed when the petals of the variable aperture are opened to the maximum is determined, and a center deviation of the reference inscribed circle is tested based on the reference inscribed circle and a pre-calibrated standard circle.

[0150] Since the electronic device introduced in the embodiment of the present invention is an electronic device used to implement the method for testing the variable aperture in the embodiment of the present invention, based on the method introduced in the embodiment of the present invention, a person skilled in the art can understand the specific structure and deformation of the device, so it is not described here in detail. All devices used in the method in the embodiment of the present invention belong to the scope of protection of the present invention.

[0151] Through one or more embodiments of the present invention, the present invention has the following beneficial effects or advantages:

[0152] The present invention provides a method, electronic device and system for testing a variable aperture, the method comprising: determining a reference aperture corresponding to each gear position of the variable aperture and a reference code of the driving motor; the aperture is the aperture of a light inlet formed by petals of a variable wreath; using the standard code of the driving motor corresponding to each gear position and the reference code of the driving motor to test the driving accuracy of the driving motor; using the reference aperture and the standard aperture corresponding to each gear position to test the opening and closing accuracy and opening and closing consistency of the variable aperture; determining the inscribed circle and the maximum circumscribed circle of the light inlet under each gear position, and testing the true roundness of the light inlet according to the inscribed circle and the maximum circumscribed circle; and testing the true roundness of the light inlet according to each gear position. The center of the inscribed circle of the light inlet hole is determined, and the concentricity of the inscribed circle of the light inlet hole in each gear is tested; the reference inscribed circle of the light inlet hole formed when the petals of the variable aperture are opened to the maximum is determined, and the center deviation of the reference inscribed circle is tested according to the reference inscribed circle and a pre-calibrated standard circle; in this way, when performing quality inspection on the module to be tested with a variable aperture, multiple test items including the driving accuracy of the driving motor, the opening and closing accuracy of the variable aperture, the opening and closing consistency, the true roundness of the light inlet hole and the center deviation of the reference inscribed circle are tested respectively. If the test results of all the test items are qualified, it can be said that the quality of the variable aperture camera module is qualified, thereby improving the accuracy of the camera module quality inspection.

[0153] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0154] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for testing a variable aperture, characterized in that: The method comprises: Determine the reference aperture corresponding to each gear of the variable aperture and the reference code of the driving motor; the aperture is the aperture of the light inlet formed by the petals of the variable wreath; The driving accuracy of the driving motor is tested using the standard code of the driving motor corresponding to each gear and the reference code of the driving motor; Using the reference aperture and the standard aperture corresponding to each gear position to test the opening and closing accuracy and opening and closing consistency of the variable aperture; Determine the inscribed circle and the maximum circumscribed circle of the light well at each gear position, and test the true roundness of the light well according to the inscribed circle and the maximum circumscribed circle; and perform concentricity test on the inscribed circle of the light well at each gear position according to the center of the inscribed circle of the light well at each gear position; A reference inscribed circle of a light-entry hole formed when the petals of the variable aperture are opened to the maximum is determined, and a center deviation of the reference inscribed circle is tested based on the reference inscribed circle and a pre-calibrated standard circle.

2. The method according to claim 1, characterized in that The step of determining a reference aperture corresponding to each gear position of the variable aperture includes: For any position of the variable aperture, perform the following processing: Obtain a standard code of the drive motor corresponding to the gear position, and determine a code test range of the drive motor according to the standard code; control the drive motor to move within the code test range according to a preset step length, and obtain a corresponding image each time it moves a step length; perform image recognition on the image to obtain a current aperture; obtain a difference between the current aperture and the standard aperture corresponding to the gear position when the absolute value is less than or equal to a preset first threshold, and determine the current aperture as a reference aperture corresponding to the gear position; the image is obtained by photographing the variable aperture with an industrial camera; The above steps are executed a preset number of times to obtain a plurality of reference apertures corresponding to the gear positions.

3. The method according to claim 2, characterized in that The performing image recognition on the image to obtain the current aperture includes: Performing binarization processing on the image to obtain a binarized image; Acquire the edge contour of the binary image, and fit the edge contour to obtain a polygonal contour; Obtaining the intersection of two adjacent edges in the polygonal outline, and determining the midpoint of the two adjacent intersections; An inscribed circle of the polygonal outline is fitted according to the midpoint, wherein the center of the inscribed circle of the polygonal outline is the intersection point of the perpendicular lines of any two sides; The diameter of the inscribed circle is determined as the current aperture.

4. The method according to claim 1, characterized in that The method of testing the driving accuracy of the driving motor by using the standard code of the driving motor corresponding to each gear and the reference code of the driving motor includes: Determine a first difference between the standard code and the reference code at each gear position; If it is determined that the absolute value of the first difference corresponding to each gear is less than or equal to the second threshold corresponding to the gear, it is determined that the driving accuracy of the driving motor is qualified; wherein the second threshold corresponding to each gear is different.

5. The method according to claim 2, characterized in that The use of the reference aperture and the standard aperture corresponding to each gear position to test the opening and closing accuracy and opening and closing consistency of the variable aperture includes: For each gear position, respectively determine a second difference between a plurality of reference apertures and the standard aperture; If it is determined that the absolute value of the maximum second difference under each gear position is less than or equal to the third threshold value corresponding to the gear position, it is determined that the opening and closing accuracy of the variable aperture is qualified; Determine the average aperture of multiple reference apertures at each gear position; For any two adjacent gears, obtaining a third difference between the average apertures of the adjacent gears; If it is determined that the absolute value of each third difference is less than or equal to the corresponding fourth threshold, it is determined that the opening and closing properties of the variable aperture are consistent.

6. The method according to claim 1, characterized in that The testing of the true roundness of the light intake hole according to the inscribed circle and the maximum circumscribed circle includes: Obtaining the center and radius of the inscribed circle at each gear position; Taking the center of the inscribed circle as the reference point, taking any point on the polygonal outline circumscribed by the inscribed circle as the reference point; Determine the distance between the benchmark point and the reference point, and determine the maximum distance as the radius of the circumscribed circle of the polygonal outline; Obtaining a fourth difference between the circumscribed circle radius and the inscribed circle radius; If it is determined that the fourth difference values ​​in all gears are smaller than the preset fifth threshold value, it is determined that the roundness of the light intake hole is qualified.

7. The method according to claim 1, characterized in that The concentricity test of the inscribed circle of the light intake hole at each gear position according to the center of the inscribed circle of the light intake hole at each gear position includes: Obtaining a first center of the inscribed circle of the light intake hole at the minimum gear position and a second center of the inscribed circle of the light intake hole at the remaining gear positions; respectively determining a first distance between a second circle center corresponding to each remaining gear and the first circle center; If it is determined that the distance corresponding to each remaining gear is less than or equal to the preset sixth threshold, it is determined that the concentricity of the inscribed circle of the light-entering hole at each gear is qualified.

8. The method according to claim 1, characterized in that Testing the center deviation of the reference inscribed circle according to the reference inscribed circle and a pre-calibrated standard circle includes: Obtaining the third center of the reference inscribed circle and the fourth center of the standard circle; determining a second distance between the third center of the circle and the fourth center of the circle; If it is determined that the second distance is less than or equal to a preset seventh threshold, it is determined that the center deviation of the reference inscribed circle is qualified.

9. An electronic device for testing a variable aperture, characterized in that: The device comprises: A determination unit, used to determine the reference aperture corresponding to each gear position of the variable aperture and the reference code of the driving motor; the aperture is the aperture of the light inlet formed by the petals of the variable wreath; A testing unit, used to test the driving accuracy of the driving motor by using the standard code of the driving motor corresponding to each gear and the reference code of the driving motor; Using the reference aperture and the standard aperture corresponding to each gear position to test the opening and closing accuracy and opening and closing consistency of the variable aperture; Determine the inscribed circle and the maximum circumscribed circle of the light well at each gear position, and test the true roundness of the light well according to the inscribed circle and the maximum circumscribed circle; and perform concentricity test on the inscribed circle of the light well at each gear position according to the center of the inscribed circle of the light well at each gear position; A reference inscribed circle of a light-entry hole formed when the petals of the variable aperture are opened to the maximum is determined, and a center deviation of the reference inscribed circle is tested based on the reference inscribed circle and a pre-calibrated standard circle.

10. A system for testing a variable aperture, characterized in that: The system comprises: a module to be tested provided with a variable aperture, an industrial camera and the electronic device according to claim 9; wherein, The module to be tested is placed on a test table, and the module to be tested is electrically connected to the electronic device; The industrial camera is located above the module to be tested, the industrial camera is electrically connected to the electronic device through a signal line, and the industrial camera is used to shoot the variable aperture at different gears to obtain corresponding images; The electronic device is used to analyze the image to obtain the reference aperture corresponding to each gear position of the variable aperture and the reference code of the driving motor; the aperture is the aperture of the light inlet formed by the petals of the variable wreath; the driving accuracy of the driving motor is tested using the standard code of the driving motor corresponding to each gear position and the reference code of the driving motor; the opening and closing accuracy and opening and closing consistency of the variable aperture are tested using the reference aperture and standard aperture corresponding to each gear position; the inscribed circle and the maximum circumscribed circle of the light inlet under each gear position are determined, and the true roundness of the light inlet is tested according to the inscribed circle and the maximum circumscribed circle; and the concentricity of the inscribed circle of the light inlet under each gear position is tested according to the center of the inscribed circle of the light inlet under each gear position; the reference inscribed circle of the light inlet formed when the petals of the variable aperture are opened to the maximum is determined, and the center deviation of the reference inscribed circle is tested according to the reference inscribed circle and a pre-calibrated standard circle.