An automated testing method and related equipment for camera modules

Through the automated testing method, the problems of low manual judgment efficiency and high error detection rate in camera module detection are solved, and the automatic detection of clarity and viscera are realized, which improves the detection efficiency and standardization.

CN116233406BActive Publication Date: 2025-08-15SICHUAN KONKA SMART TERMINAL TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211593897.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-13
Publication Date
2025-08-15
Estimated Expiration
2042-12-13

AI Technical Summary

Technical Problem

In the prior art, the camera module yield rate detection relies on manual judgment, resulting in low efficiency, high error detection rate and inconsistent standards, making it difficult to achieve standardized and efficient detection.

Method used

Using an automated test method, by obtaining the distance between the customized picture and the camera module, determining whether it is within the preset distance range, performing content proofreading and viscose detection, and outputting the detection results.

Benefits of technology

It realizes the automation of the clarity and viscera detection of the camera module, reduces the error detection rate, improves detection efficiency and standardizes the test process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116233406B_ABST
    Figure CN116233406B_ABST
Patent Text Reader

Abstract

The present invention discloses an automated testing method for camera modules and related equipment. The method comprises: obtaining a custom image, determining the distance between the camera module and the custom image, and determining whether the distance is within a preset distance interval; if the distance is within the preset distance interval, performing content proofreading on the custom image; when the content proofreading of the custom image is successful, performing clarity detection and vignetting detection on the custom image, and outputting clarity detection results and vignetting detection results. The present invention fully automates the clarity and vignetting detection of the camera module, and fully considers the feasibility of the production line. The operation is simple and easy. The production line only needs to place the terminal and the image in the debugged positions according to the operating procedures to complete the automatic detection. The automated detection of the camera module is realized with a low-cost solution, the test is standardized, the false detection rate is reduced, and the detection efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image detection technology, and in particular to an automated testing method, system, terminal, and computer-readable storage medium for a camera module. Background Art

[0002] When inspecting the yield rate of camera modules at the production end of the existing smart terminal industry, the preview image is mostly output to the smart terminal display, and the vignetting and clarity are manually judged. This not only increases working hours, but also has problems such as low inspection efficiency and inconsistent inspection standards among different personnel. In the manual inspection process, continuous work can easily cause visual fatigue, and slight vignetting can be easily overlooked, leading to misjudgment and a high false detection rate. Manual inspection operations are difficult to standardize, and multiple focus shots may be required to confirm the effect. The inspection efficiency is difficult to guarantee and the labor cost is increased. In manual inspection, each person's judgment of defects is different, and it is mainly based on visual inspection, making it difficult to form a quantifiable quality standard.

[0003] Therefore, the existing technology still needs to be improved and developed. Summary of the Invention

[0004] The main purpose of the present invention is to provide an automated testing method, system, terminal and computer-readable storage medium for a camera module, aiming to solve the problems of low efficiency and easy misjudgment of manual inspection when detecting the yield rate of camera modules in the prior art.

[0005] To achieve the above object, the present invention provides an automated testing method for a camera module, the automated testing method for a camera module comprising the following steps:

[0006] Obtain a custom image, determine the distance between the camera module and the custom image, and determine whether the distance is within a preset distance range;

[0007] If the distance is within the preset distance interval, performing content proofreading on the customized image;

[0008] When the customized image content is successfully proofread, the customized image is subjected to a definition detection and a vignetting detection, and the definition detection result and the vignetting detection result are output.

[0009] Optionally, the automated testing method for the camera module includes obtaining a custom image, determining the distance between the camera module and the custom image, and judging whether the distance is within a preset distance interval;

[0010] The obtaining of the customized image, determining the distance between the camera module and the customized image, and judging whether the distance is within a preset distance interval may also include:

[0011] Predetermining the preset distance interval;

[0012] The predetermining the preset distance interval specifically includes:

[0013] Combining a QR code and a solid color background image to form the customized image, and embedding the QR code in the center of the solid color background image;

[0014] Activating the auto-focus function of the camera module to screen and obtain a first position range interval (x1, x2) in which the QR code in the customized image is 100% recognized;

[0015] Turning off the autofocus function of the camera module, and filtering out a second position range (x3, x4) in the first position range where the QR code is absolutely unrecognizable;

[0016] Obtain the middle value h of the second position range interval (x3, x4), the middle value h = (x3+x4) / 2, obtain the preset upper and lower deviations δh, and δh<(x4-x3) / 2, and obtain the preset distance interval based on the middle value h and the upper and lower deviations δh, and the preset distance interval = (h-δh, h+δh).

[0017] Optionally, in the automated testing method for the camera module, if the distance is within the preset distance interval, content proofreading is performed on the customized image;

[0018] If the distance is within the preset distance interval, performing content proofreading on the customized image specifically includes:

[0019] When the camera module detects the QR code in the custom picture, the width of the QR code is calculated, and the distance between the camera module and the custom picture is obtained;

[0020] When the distance between the camera module and the customized image is within the preset distance interval, it is determined that the distance between the camera module and the customized image meets the specification, and the customized image is proofread;

[0021] If the QR code in the customized image is parsed into a character string, the content verification is successful.

[0022] Optionally, in the automated testing method for the camera module, when the customized image content is successfully proofread, the customized image is subjected to a clarity detection and a vignetting detection, and the clarity detection result and the vignetting detection result are output;

[0023] When the customized image content is successfully proofread, performing clarity detection and vignetting detection on the customized image, and outputting the clarity detection result and the vignetting detection result, specifically includes:

[0024] When the customized image content is successfully proofread, the customized image is subjected to a definition test, and the photographed image and the definition test result are displayed;

[0025] When the customized image content is successfully proofread, performing vignetting detection on the customized image and outputting the vignetting detection result;

[0026] When the customized image content is successfully proofread, the customized image is subjected to a definition test, and the photographed image and the definition test result are displayed, specifically including:

[0027] When the customized image content is successfully proofread, the customized image is photographed to obtain the photographed image, and a QR code verification is performed;

[0028] If the QR code in the photographed image is parsed into a string, the QR code verification passes;

[0029] When the QR code verification is passed, it means that the clarity test has passed, and the photographed image and output clarity result are displayed;

[0030] When the customized image content is successfully proofread, performing vignetting detection on the customized image and outputting a vignetting detection result specifically includes:

[0031] When the customized image content is successfully proofread, a preview image is obtained;

[0032] Performing color difference calibration on preset ranges of four corners of the preview image to obtain color difference values of a first preset range, a second preset range, a third preset range, and a fourth preset range of the preview image;

[0033] respectively comparing the color difference values of a first preset range, a second preset range, a third preset range, and a fourth preset range of the preview image with an expected value of a normal distribution of the preview image;

[0034] If at least one difference between the color difference values in the first preset range, the second preset range, the third preset range, and the fourth preset range and the expected value of the normal distribution of the preview image exceeds a preset difference, it indicates that the vignetting is serious, and a vignetting detection failure result is output;

[0035] If each difference between the color difference values in the first preset range, the second preset range, the third preset range, and the fourth preset range and the expected value of the normal distribution of the preview image does not exceed the preset difference, determining whether the number of vignetting pixels in the first preset range, the second preset range, the third preset range, and the fourth preset range of the preview image exceeds a vignetting pixel number threshold;

[0036] When the number of vignetting pixels in at least one of the first preset range, the second preset range, the third preset range, and the fourth preset range of the preview image exceeds a vignetting pixel number threshold, it indicates that the vignetting is serious, and a vignetting detection failure result is output;

[0037] The determining whether the number of vignetting pixels in the first preset range, the second preset range, the third preset range, and the fourth preset range of the preview image exceeds a vignetting pixel number threshold specifically includes:

[0038] The color difference values ColorN (Rn, Gn, Bn) of the first preset range, the second preset range, the third preset range, and the fourth preset range of the preview image are subtracted from the normal distribution value ColorE (Re, Ge, Be) of the preview image, squared, and then superimposed to obtain a; wherein a = |Rn-Re| 2 +|Gn-Ge| 2 +|Bn-Be| 2 , a is the dark corner pixel determination value, Rn, Gn, Bn are the color difference values corresponding to any point within the first preset range, the second preset range, the third preset range, and the fourth preset range of the preview image, Re, Ge, Be are the expected values of the normal distribution corresponding to the point e in the preview image;

[0039] When a exceeds the dark corner pixel threshold, it is counted into the dark corner pixel count.

[0040] In addition, to achieve the above-mentioned object, the present invention further provides an automated testing system for a camera module, wherein the automated testing system for a camera module comprises:

[0041] A distance detection module is configured to obtain a custom image, determine the distance between the camera module and the custom image, and determine whether the distance is within a preset distance interval;

[0042] a content proofreading module, which performs content proofreading on the customized image if the distance is within the preset distance interval;

[0043] The clarity and vignetting detection module performs clarity detection and vignetting detection on the customized image when the customized image content is successfully proofread, and outputs the clarity detection result and the vignetting detection result.

[0044] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and an automatic testing program for the camera module stored in the memory and runnable on the processor, and when the automatic testing program for the camera module is executed by the processor, the steps of the automatic testing method for the camera module as described above are implemented.

[0045] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores an automated testing program for a camera module, and when the automated testing program for a camera module is executed by a processor, the steps of the automated testing method for a camera module as described above are implemented.

[0046] In the present invention, a custom image is obtained, the distance between the camera module and the custom image is determined, and it is determined whether the distance is within a preset distance interval; if the distance is within the preset distance interval, the custom image is content-checked; when the custom image content is successfully proofread, the custom image is subjected to clarity detection and vignetting detection, and the clarity detection results and vignetting detection results are output. The present invention fully automates the clarity and vignetting detection of the camera module, fully considering the feasibility of the production line. The operation is simple and easy. The production line only needs to place the terminal and the image in the debugged position according to the operating process to complete the automatic detection. This low-cost solution realizes the automation of camera module detection, standardizes the test, reduces the false detection rate, and improves the detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a flow chart of a preferred embodiment of an automated testing method for a camera module of the present invention;

[0048] Figure 2 This is an overall framework diagram of an automated testing method for a camera module of the present invention;

[0049] Figure 3 1 is a schematic diagram of the principle of a preferred embodiment of the automated testing system for camera modules of the present invention;

[0050] Figure 4 Schematic diagram of the operating environment of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solutions and advantages of the present invention more clear and distinct, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0052] An automated testing method for a camera module according to a preferred embodiment of the present invention is as follows: Figure 1 and Figure 2 As shown, the automated testing method for the camera module includes the following steps:

[0053] Step S10: Obtain a customized image, determine the distance between the camera module and the customized image, and judge whether the distance is within a preset distance range.

[0054] Among them, the present invention introduces a distance detection and error correction mechanism, which estimates the distance between the camera module and the custom image based on the size of the image content (for example, the physical size of the QR code image). When the camera module and the custom image exceed the specified distance, it will be judged as an invalid resolution. In addition, there may be multiple camera modules in the distance detection and error correction mechanism. At this time, the custom image can be shared. When measuring different camera modules, they are placed in different positions and at different distances. The distance is measured to prevent mismeasurement caused by mistakes made by production line workers. Since the distance is measured based on the size of the QR code, this distance is allowed to have a certain error, that is, the preset distance interval.

[0055] Specifically, the steps of acquiring the customized image, determining the distance between the camera module and the customized image, and judging whether the distance is within a preset distance interval may also include: predetermining the preset distance interval.

[0056] The step of predetermining the preset distance interval specifically includes:

[0057] The QR code and the solid color background image are combined to form the customized image, and the QR code is centered on the solid color background image (such as Figure 2 As shown), the QR code can select a picture with a lower error tolerance rate, and the data information carried by the QR code picture should be as rich as possible, and the size of the QR code should not be too large or too small, for example, 6cm*6cm is the best.

[0058] In addition, the fault tolerance rate of the QR code is generally set to four levels: L-low fault tolerance rate, M-medium fault tolerance rate, Q-higher fault tolerance rate, and H-high fault tolerance rate, among which the fault tolerance rate of level L is 7%, the fault tolerance rate of M is 15%, the fault tolerance rate of Q is 25%, and the fault tolerance rate of H is 30%. In the present invention, it is best to choose a QR code with a fault tolerance rate of level L.

[0059] The automatic focus function of the camera module is activated, and the first position range interval (x1, x2) in which the QR code in the customized image is 100% recognized is obtained by screening.

[0060] The auto-focus function of the camera module is turned off, and a second position range interval (x3, x4) in which the QR code cannot be recognized is screened out from the first position range interval.

[0061] Obtain the middle value h of the second position range interval (x3, x4), the middle value h = (x3+x4) / 2, obtain the preset upper and lower deviations δh, and δh<(x4-x3) / 2, and obtain the preset distance interval based on the middle value h and the upper and lower deviations δh, and the preset distance interval = (h-δh, h+δh).

[0062] Among them, the preset distance interval can be understood as the position of the camera module modulated relative to the custom picture. Find a distance interval that can be recognized 100% when the focus is successful, and then find another interval that cannot recognize the QR code at all after removing the camera focus function. Take the middle of their intersection and take the middle of the intersection as the optimal choice. The distance between the middle point of this intersection and the camera module is used as the measured distance.

[0063] Among them, the middle value h can be understood as the point in the middle of the second position range interval, the purpose of which is to make the test results more stable to avoid possible errors in large-scale testing; the deviation in the upper and lower deviations δh refers to the previously measured deviation, and the distance δh deviating from h is reliable, but it is best to use h.

[0064] Step S20: If the distance is within the preset distance interval, content proofreading is performed on the customized image.

[0065] Specifically, the smart terminal camera module detection is changed to automatic determination (such as Figure 2 As shown), the camera module keeps scanning. When the camera module detects the QR code in the custom picture (as shown Figure 2 As shown), the width of the QR code is calculated by the smart terminal device of the camera module, and the distance between the camera module and the customized picture is obtained (as shown Figure 2 shown).

[0066] When the distance between the camera module and the customized picture is within the preset distance interval, it is determined that the distance between the camera module and the customized picture meets the specifications, and there will be no misjudgment due to incorrect distance setting, and the content of the customized picture is then proofread.

[0067] If the QR code in the customized image is parsed into a string, the content verification is successful (e.g. Figure 2 shown).

[0068] Step S30: When the customized image content is successfully proofread, the customized image is subjected to a clarity test and a vignetting test (e.g., Figure 2 and outputs the clarity detection result and the vignetting detection result.

[0069] Specifically, when the customized picture content is successfully proofread, the customized picture is subjected to a clarity detection, and the photographed picture is displayed and the clarity detection result is output; when the customized picture content is successfully proofread, the customized picture is subjected to a vignetting detection, and the vignetting detection result is output.

[0070] When the customized image content is successfully proofread, the definition detection and dark corner detection of the customized image are started simultaneously (eg Figure 2 shown);

[0071] The clarity detection specifically includes:

[0072] When the customized picture content is successfully proofread, the customized picture is photographed to obtain the photographed picture, and a QR code verification is performed (such as Figure 2 As shown); wherein, the successful proofreading of the content means that the preview clarity of the customized image has passed the verification. After the preview clarity verification is passed, take a photo and perform the QR code verification on the clarity of the imaged photo again.

[0073] The difference between the QR code verification here and the content proofreading is that the content proofreading is to verify the clarity of the preview first, while the QR code verification is to verify the clarity of the imaging or taking pictures. Both of them detect the content of the read character string, but when performing QR code verification, since the QR code distance check has been performed in the previous preview stage, the distance check does not need to be performed in the imaging or taking pictures stage.

[0074] If the QR code in the photographed image is parsed into a string that is consistent with the expected string, the QR code verification is passed; if the QR code verification is passed, it means that the clarity test is passed, and the photographed image and the output clarity result (such as Figure 2 shown).

[0075] The dark corner detection specifically includes: obtaining a preview image after the customized image content is successfully proofread.

[0076] Only after the focus clarity test, that is, the content proofreading, is the camera module considered to have entered the specified area, but it cannot be guaranteed to be completely accurately positioned. The vignetting test is initiated by identifying feature images such as the center of a QR code.

[0077] First confirm that the QR code is centered (such as Figure 2 As shown), then color difference calibration is performed on the preset ranges of the four corners in the preview image to obtain color difference values of the first preset range, the second preset range, the third preset range and the fourth preset range of the preview image.

[0078] Among them, the first preset range of the preview image is the upper left corner range of the preview image, the second preset range of the preview image is the upper right corner range of the preview image, the third preset range of the preview image is the lower left corner range of the preview image, and the fourth preset range of the preview image is the lower right corner range of the preview image.

[0079] The confirmation that the QR code is centered means that the QR code is in the preview frame and is roughly in the middle of the preview image. At this time, the camera module is aware of this and will not capture the customized image, indicating that dark corner detection can begin.

[0080] The color difference values of the first preset range, the second preset range, the third preset range and the fourth preset range of the preview image are respectively compared with the normal distribution expected value of the preview image (such as Figure 2 shown).

[0081] If at least one difference between the color difference values of the first preset range, the second preset range, the third preset range, and the fourth preset range and the normal distribution expected value of the preview image exceeds the preset difference, it indicates that the vignetting is serious, and a vignetting detection failure result is output (e.g. Figure 2 shown).

[0082] The output results include: "Vignette - Upper Left / Upper Right / Lower Left / Lower Right - Fail".

[0083] If each difference between the color difference values of the first preset range, the second preset range, the third preset range, and the fourth preset range and the expected value of the normal distribution of the preview image does not exceed the preset difference, then determine whether the number of dark corner pixels in the first preset range, the second preset range, the third preset range, and the fourth preset range of the preview image exceeds the dark corner pixel number threshold.

[0084] The determining whether the number of vignetting pixels in the first preset range, the second preset range, the third preset range, and the fourth preset range of the preview image exceeds a vignetting pixel number threshold specifically includes:

[0085] The color difference values ColorN (Rn, Gn, Bn) of the first preset range, the second preset range, the third preset range, and the fourth preset range of the preview image are subtracted from the normal distribution value ColorE (Re, Ge, Be) of the preview image, squared, and then superimposed to obtain a; wherein a = |Rn-Re| 2 +|Gn-Ge| 2 +|Bn-Be| 2 , a is the dark corner pixel judgment value, Rn, Gn, Bn are the color difference values corresponding to any point within the first preset range, the second preset range, the third preset range, and the fourth preset range of the preview image, Re, Ge, Be are the expected values of the normal distribution corresponding to the point e in the preview image.

[0086] Where a=|Rn-Re| 2 +|Gn-Ge| 2 +|Bn-Be| 2 The purpose of squaring is to magnify the difference. If the difference in a certain component of RGB is large, it will be magnified after squaring.

[0087] When a exceeds the dark corner pixel threshold, it is counted into the dark corner pixel count.

[0088] Among them, according to the actual measurement on white paper, when there is no vignetting, the color difference of the four corners themselves is relatively large, but the difference between the RGB components of each corner is very small, less than 10, and does not exceed 100 after squaring. The sum of the squares of the three components does not exceed 300. In fact, the vignetting is gray close to black. After following this algorithm, the a value is tens of thousands. Therefore, the vignetting pixel threshold can be set to 1000.

[0089] The steps of determining whether the number of vignetting pixels in the first preset range, the second preset range, the third preset range, and the fourth preset range of the preview image exceeds a vignetting pixel number threshold are as follows:

[0090] 1. Subtract the color difference value ColorN1 (Rn1, Gn1, Bn1) of the first preset range of the preview image from the normally distributed value ColorE (Re, Ge, Be) of the preview image, square them, and then superimpose them to obtain a1; where a1 = |Rn1-Re1| 2 +|Gn1-Ge1| 2 +|Bn1-Be1| 2 , a1 is the dark corner pixel judgment value, Rn1, Gn1, Bn1 are the color difference values corresponding to any point within the first preset range of the preview image, Re, Ge, Be are the expected values of the normal distribution corresponding to the point e in the preview image.

[0091] When a1 exceeds the dark corner pixel threshold, it is counted into the dark corner pixel count.

[0092] When the number of vignetting pixels in the first preset range of the preview image exceeds a vignetting pixel threshold, it indicates that the vignetting is serious, and a vignetting detection failure result is output, which may be: "vignetting - upper left - fail".

[0093] 2. Subtract the color difference value ColorN2 (Rn2, Gn2, Bn2) of the second preset range of the preview image from the normally distributed value ColorE (Re, Ge, Be) of the preview image, square them, and then superimpose them to obtain a2; where a2 = |Rn2-Re2| 2 +|Gn 2 -Ge2| 2 +|Bn2-Be2| 2 , a2 is the dark corner pixel judgment value, Rn2, Gn2, Bn2 are the color difference values corresponding to any point within the second preset range of the preview image, Re, Ge, Be are the expected values of the normal distribution corresponding to the point e in the preview image.

[0094] When a2 exceeds the dark corner pixel threshold, it is counted into the dark corner pixel count.

[0095] When the number of vignetting pixels in the second preset range of the preview image exceeds the vignetting pixel number threshold, it indicates that the vignetting is serious, and a vignetting detection failure result is output, which may be: "vignetting - upper right - fail".

[0096] 3. Subtract the color difference value ColorN3 (Rn3, Gn3, Bn3) of the preview image in the third preset range from the normal distribution value ColorE (Re, Ge, Be) of the preview image, square them, and then superimpose them to obtain a3; where a3 = |Rn3-Re3| 2 +|Gn3-Ge3| 2 +|Bn3-Be3| 2 , a3 is the dark corner pixel judgment value, Rn3, Gn3, Bn3 are the color difference values corresponding to any point within the third preset range of the preview image, Re, Ge, Be are the expected values of the normal distribution corresponding to the point e in the preview image.

[0097] When a3 exceeds the vignetting pixel threshold, it is counted into the vignetting pixel count.

[0098] When the number of vignetting pixels in the third preset range of the preview image exceeds the vignetting pixel number threshold, it indicates that the vignetting is serious, and a vignetting detection failure result is output, which may be: "vignetting - lower left - fail".

[0099] 4. Subtract the color difference value ColorN4 (Rn4, Gn4, Bn4) of the fourth preset range of the preview image from the normal distribution value ColorE (Re, Ge, Be) of the preview image, square them, and then superimpose them to obtain a4; where a4 = |Rn4-Re4| 2 +|Gn4-Ge4| 2 +|Bn4-Be4| 2 , a4 is the dark corner pixel judgment value, Rn4, Gn4, Bn4 are the color difference values corresponding to any point within the fourth preset range of the preview image, Re, Ge, Be are the expected values of the normal distribution corresponding to the point e in the preview image.

[0100] When a4 exceeds the vignetting pixel threshold, it is counted into the vignetting pixel count.

[0101] When the number of vignetting pixels in the fourth preset range of the preview image exceeds the vignetting pixel number threshold, it indicates that the vignetting is serious, and a vignetting detection failure result is output, which may be: "vignetting - lower right - failed".

[0102] That is, when the number of vignetting pixels in at least one of the first preset range, the second preset range, the third preset range, and the fourth preset range of the preview image exceeds the vignetting pixel number threshold, it indicates that the vignetting is serious, and a result of vignetting detection failure is output, and the output result may be: "vignetting - upper left / upper right / lower left / lower right - fail".

[0103] When the number of dark corner pixels in each of the first preset range, the second preset range, the third preset range and the fourth preset range of the preview image does not exceed the dark corner pixel number threshold, it means that the dark corner detection is successful, the camera preview interface is closed, and the result of the qualified detection is output, and the output result can be: "Dark corner detection passed".

[0104] The vignetting pixel threshold is used to determine whether the a value meets the requirements, and the vignetting pixel count threshold is used to determine whether the vignetting pixel counts in the first preset range, the second preset range, the third preset range, and the fourth preset range of the preview image meet the requirements.

[0105] In addition, the present invention primarily automates the focus clarity and vignetting issues encountered in camera module testing of mobile phones and tablets, which require manual judgment. Other test items are not excluded, such as whether the camera image may have blemishes. In this case, the measurement and verification of pure color images can be considered. Such issues have not been found in production practice. In addition, in addition to the above-mentioned technical features of the present invention, for vignetting determination, four corners can be selected, and the customized image uses a pure white interface to directly determine the background color. Since vignetting itself is due to structural occlusion and is necessarily dark, the difference from white can be filtered out to calculate the background color to determine whether the difference from pure white is unreasonable. For focus clarity determination, image features can be used for verification. One special case is biometric recognition, such as fingerprint recognition and facial recognition. Products such as mobile phones and tablets that integrate these functions can cooperate with fingerprint or facial recognition solution providers to apply for interfaces that meet the requirements. When the camera clarity is insufficient, face unlocking cannot be performed, which also proves the feasibility of the present invention for facial recognition.

[0106] Furthermore, if Figure 3 As shown, based on the above-mentioned automated testing method for a camera module, the present invention also provides an automated testing system for a camera module, wherein the automated testing system for a camera module includes:

[0107] The distance detection module 51 obtains a custom image, determines the distance between the camera module and the custom image, and determines whether the distance is within a preset distance interval.

[0108] The content proofreading module 52 performs content proofreading on the customized image if the distance is within the preset distance interval.

[0109] The clarity and vignetting detection module 53 performs clarity detection and vignetting detection on the customized image when the customized image content is successfully proofread, and outputs the clarity detection result and the vignetting detection result.

[0110] Furthermore, if Figure 4 As shown, based on the above-mentioned method and system for automatic testing of a camera module, the present invention also provides a terminal, which includes a processor 10, a memory 20 and a display 30. Figure 4 Only some of the components of the terminal are shown, but it should be understood that implementation of all of the shown components is not required, and more or fewer components may be implemented instead.

[0111] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Furthermore, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code of the installation terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, the memory 20 stores an automated test program 40 for a camera module, which can be executed by the processor 10, thereby realizing an automated test method for a camera module in the present application.

[0112] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chip, configured to execute program codes or process data stored in the memory 20, such as executing an automated testing method for a camera module.

[0113] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display 30 is used to display information on the terminal and to display a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.

[0114] In one embodiment, when the processor 10 executes the camera module automated testing program 40 in the memory 20 , the following steps are implemented:

[0115] Obtain a custom image, determine the distance between the camera module and the custom image, and determine whether the distance is within a preset distance range;

[0116] If the distance is within the preset distance interval, performing content proofreading on the customized image;

[0117] When the customized image content is successfully proofread, the customized image is subjected to a definition detection and a vignetting detection, and the definition detection result and the vignetting detection result are output.

[0118] The steps of obtaining a customized image, determining a distance between the camera module and the customized image, and judging whether the distance is within a preset distance interval may also include:

[0119] Predetermining the preset distance interval;

[0120] The predetermining the preset distance interval specifically includes:

[0121] Combining a QR code and a solid color background image to form the customized image, and embedding the QR code in the center of the solid color background image;

[0122] Activating the auto-focus function of the camera module to screen and obtain a first position range interval (x1, x2) in which the QR code in the customized image is 100% recognized;

[0123] Turning off the autofocus function of the camera module, and filtering out a second position range (x3, x4) in the first position range where the QR code is absolutely unrecognizable;

[0124] Obtain the middle value h of the second position range interval (x3, x4), the middle value h = (x3+x4) / 2, obtain the preset upper and lower deviations δh, and δh<(x4-x3) / 2, and obtain the preset distance interval based on the middle value h and the upper and lower deviations δh, and the preset distance interval = (h-δh, h+δh).

[0125] If the distance is within the preset distance interval, performing content proofreading on the customized image specifically includes:

[0126] When the camera module detects the QR code in the custom picture, the width of the QR code is calculated, and the distance between the camera module and the custom picture is obtained;

[0127] When the distance between the camera module and the customized image is within the preset distance interval, it is determined that the distance between the camera module and the customized image meets the specification, and the customized image is proofread;

[0128] If the QR code in the customized image is parsed into a character string, the content verification is successful.

[0129] When the customized image content is successfully proofread, the customized image is subjected to clarity detection and vignetting detection, and the clarity detection result and the vignetting detection result are output, specifically including:

[0130] When the customized image content is successfully proofread, the customized image is subjected to a definition test, and the photographed image and the definition test result are displayed;

[0131] When the customized image content is successfully proofread, a vignetting detection is performed on the customized image, and a vignetting detection result is output.

[0132] When the customized image content is successfully proofread, the customized image is subjected to a definition test, and the photographed image and the definition test result are displayed, specifically including:

[0133] When the customized image content is successfully proofread, the customized image is photographed to obtain the photographed image, and a QR code verification is performed;

[0134] If the QR code in the photographed image is parsed into a string, the QR code verification passes;

[0135] When the QR code verification is passed, it means that the clarity detection is passed, and the photographed picture and output clarity result are displayed.

[0136] When the customized image content is successfully proofread, performing vignetting detection on the customized image and outputting the vignetting detection result specifically includes:

[0137] When the customized image content is successfully proofread, a preview image is obtained;

[0138] Performing color difference calibration on preset ranges of four corners of the preview image to obtain color difference values of a first preset range, a second preset range, a third preset range, and a fourth preset range of the preview image;

[0139] respectively comparing the color difference values of a first preset range, a second preset range, a third preset range, and a fourth preset range of the preview image with an expected value of a normal distribution of the preview image;

[0140] If at least one difference between the color difference values in the first preset range, the second preset range, the third preset range, and the fourth preset range and the expected value of the normal distribution of the preview image exceeds a preset difference, it indicates that the vignetting is serious, and a vignetting detection failure result is output;

[0141] If each difference between the color difference values in the first preset range, the second preset range, the third preset range, and the fourth preset range and the expected value of the normal distribution of the preview image does not exceed the preset difference, determining whether the number of vignetting pixels in the first preset range, the second preset range, the third preset range, and the fourth preset range of the preview image exceeds a vignetting pixel number threshold;

[0142] When the number of vignetting pixels in at least one of the first preset range, the second preset range, the third preset range, and the fourth preset range of the preview image exceeds a vignetting pixel number threshold, it indicates that the vignetting is serious, and a result of vignetting detection failure is output.

[0143] The determining whether the number of vignetting pixels in the first preset range, the second preset range, the third preset range, and the fourth preset range of the preview image exceeds a vignetting pixel number threshold specifically includes:

[0144] The color difference values ColorN (Rn, Gn, Bn) of the first preset range, the second preset range, the third preset range, and the fourth preset range of the preview image are subtracted from the normal distribution value ColorE (Re, Ge, Be) of the preview image, squared, and then superimposed to obtain a; wherein a = |Rn-Re| 2 +|Gn-Ge| 2 +|Bn-Be| 2 , a is the dark corner pixel determination value, Rn, Gn, Bn are the color difference values corresponding to any point within the first preset range, the second preset range, the third preset range, and the fourth preset range of the preview image, Re, Ge, Be are the expected values of the normal distribution corresponding to the point e in the preview image;

[0145] When a exceeds the dark corner pixel threshold, it is counted into the dark corner pixel count.

[0146] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores an automated testing program for a camera module, and when the automated testing program for the camera module is executed by a processor, the steps of the automated testing method for a camera module as described above are implemented.

[0147] In summary, the present invention provides an automated testing method for a camera module and related equipment, the method comprising: obtaining a custom image, determining the distance between the camera module and the custom image, and judging whether the distance is within a preset distance interval;

[0148] If the distance is within the preset distance interval, performing content proofreading on the customized image;

[0149] When the custom image content is successfully proofread, the custom image is subjected to clarity detection and vignetting detection, and the clarity detection results and vignetting detection results are output. The present invention fully automates the clarity and vignetting detection of camera modules, fully considering the feasibility of the production line. The operation is simple and easy. The production line only needs to place the terminal and the image in the debugged positions according to the operating procedures to complete the automatic detection. This low-cost solution realizes the automation of camera module detection, standardizes the test, reduces the false detection rate, and improves the detection efficiency.

[0150] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or terminal comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or terminal comprising the element.

[0151] Of course, those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware (such as a processor, controller, etc.) through a computer program. The program can be stored in a computer-readable storage medium that can be read by a computer. When the program is executed, it can include the processes in the above-described method embodiments. The computer-readable storage medium can be a memory, a magnetic disk, an optical disk, etc.

[0152] It should be understood that the application of the present invention is not limited to the above examples. For those skilled in the art, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. An automated testing method for a camera module, characterized in that: The automated testing method for the camera module includes: Obtain a custom image, determine the distance between the camera module and the custom image, and determine whether the distance is within a preset distance range; If the distance is within the preset distance interval, performing content proofreading on the customized image; When the customized image content is successfully proofread, performing clarity detection and vignetting detection on the customized image, and outputting the clarity detection result and the vignetting detection result; The obtaining of the customized image, determining the distance between the camera module and the customized image, and judging whether the distance is within a preset distance interval may also include: Predetermining the preset distance interval; The predetermining the preset distance interval specifically includes: Combining a QR code and a solid color background image to form the customized image, and embedding the QR code in the center of the solid color background image; Activating the auto-focus function of the camera module to screen and obtain a first position range interval (x1, x2) in which the QR code in the customized image is 100% recognized; Turning off the autofocus function of the camera module, and filtering out a second position range (x3, x4) in the first position range where the QR code is absolutely unrecognizable; Obtain the middle value h of the second position range interval (x3, x4), the middle value h=(x3+x4) / 2, obtain the preset upper and lower deviations δh, and δh<(x4-x3) / 2, and obtain the preset distance interval based on the middle value h and the upper and lower deviations δh, and the preset distance interval=(h-δh, h+δh).

2. The automated testing method for a camera module according to claim 1, wherein: If the distance is within the preset distance interval, performing content proofreading on the customized image specifically includes: When the camera module detects the QR code in the custom picture, the width of the QR code is calculated, and the distance between the camera module and the custom picture is obtained; When the distance between the camera module and the customized image is within the preset distance interval, it is determined that the distance between the camera module and the customized image meets the specification, and the customized image is proofread; If the QR code in the customized image is parsed into a character string, the content verification is successful.

3. The automated testing method for a camera module according to claim 2, wherein: When the customized image content is successfully proofread, performing clarity detection and vignetting detection on the customized image, and outputting the clarity detection result and the vignetting detection result, specifically includes: When the customized image content is successfully proofread, the customized image is subjected to a definition test, and the photographed image and the definition test result are displayed; When the customized image content is successfully proofread, a vignetting detection is performed on the customized image, and a vignetting detection result is output.

4. The automated testing method for a camera module according to claim 3, wherein: When the customized image content is successfully proofread, the customized image is subjected to a definition test, and the photographed image and the definition test result are displayed, specifically including: When the customized image content is successfully proofread, the customized image is photographed to obtain the photographed image, and a QR code verification is performed; If the QR code in the photographed image is parsed into a string, the QR code verification passes; When the QR code verification is passed, it means that the clarity detection is passed, and the photographed picture and output clarity result are displayed.

5. The automated testing method for a camera module according to claim 3, wherein: When the customized image content is successfully proofread, performing vignetting detection on the customized image and outputting a vignetting detection result specifically includes: When the customized image content is successfully proofread, a preview image is obtained; Performing color difference calibration on preset ranges of four corners of the preview image to obtain color difference values of a first preset range, a second preset range, a third preset range, and a fourth preset range of the preview image; respectively comparing the color difference values of a first preset range, a second preset range, a third preset range, and a fourth preset range of the preview image with an expected value of a normal distribution of the preview image; If at least one difference between the color difference values in the first preset range, the second preset range, the third preset range, and the fourth preset range and the expected value of the normal distribution of the preview image exceeds a preset difference, it indicates that the vignetting is serious, and a vignetting detection failure result is output; If each difference between the color difference values in the first preset range, the second preset range, the third preset range, and the fourth preset range and the expected value of the normal distribution of the preview image does not exceed the preset difference, determining whether the number of vignetting pixels in the first preset range, the second preset range, the third preset range, and the fourth preset range of the preview image exceeds a vignetting pixel number threshold; When the number of vignetting pixels in at least one of the first preset range, the second preset range, the third preset range, and the fourth preset range of the preview image exceeds a vignetting pixel number threshold, it indicates that the vignetting is serious, and a result of vignetting detection failure is output.

6. An automated testing system for a camera module, characterized in that: The automated testing system for the camera module is used to execute the automated testing method for the camera module according to any one of claims 1 to 5, and the automated testing system for the camera module comprises: A distance detection module is configured to obtain a custom image, determine the distance between the camera module and the custom image, and determine whether the distance is within a preset distance interval; a content proofreading module, which performs content proofreading on the customized image if the distance is within the preset distance interval; The clarity and vignetting detection module performs clarity detection and vignetting detection on the customized image when the customized image content is successfully proofread, and outputs the clarity detection result and the vignetting detection result.

7. A terminal, characterized in that: The terminal includes: a memory, a processor, and an automated testing program for the camera module stored in the memory and runnable on the processor. When the automated testing program for the camera module is executed by the processor, the steps of an automated testing method for a camera module as described in any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores an automated testing program for a camera module. When the automated testing program for a camera module is executed by a processor, the steps of the automated testing method for a camera module as described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Method and system for detecting camera of mobile terminal equipment

    CN104967843A