Camera module imaging quality automatic detection method and device

By generating and shooting QR code images into binary matrices, the error rate is calculated to judge the image quality of the camera module composition, which solves the problems of low manual detection efficiency and poor accuracy, and realizes automated, fast and accurate detection.

CN120302024APending Publication Date: 2025-07-11XIAMEN STAR SMART TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510230815.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The image quality detection of existing camera mold composition relies on manual reading of the naked eye, and there are problems such as high artificial subjectivity, poor accuracy and low detection efficiency.

Method used

By generating and shooting QR code images of different sizes, converting them into binary matrices, calculating the error rate to judge the image quality of the camera module composition, and using automatic recognition method instead of manual detection.

Benefits of technology

It improves detection speed and accuracy, realizes the quantification of test results, reduces detection costs, and simplifies the detection process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120302024A_ABST
    Figure CN120302024A_ABST
Patent Text Reader

Abstract

The invention discloses a camera module imaging quality automatic detection method and device, and relates to the technical field of camera detection. The method comprises the following steps: generating at least one two-dimensional code image with a specified size, and correspondingly converting each two-dimensional code image into a first binary matrix; shooting at least one two-dimensional code image set at a set distance through a detected camera module, and then obtaining a second binary matrix obtained through analysis; and comparing the second binary matrix with the corresponding first binary matrix, calculating the error rate of the detected camera module, and judging whether the detected camera module is qualified or not. According to the camera module imaging quality automatic detection method and device provided by the invention, whether camera imaging is qualified or not is judged by detecting the correct rate of shooting the binary matrix of the two-dimensional code, the test speed and the detection precision are improved, and the method and the device have the advantages that the test result can be quantified, the test method is simple, the test cost is low and the like.
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 detection, and particularly to an automatic detection method and device for the imaging quality of a camera module. Background Art

[0002] Currently, the general process for detecting the imaging quality of a camera module is as Figure 1 shown.

[0003] First, use the camera under test to take a photo of the ISO12233 camera resolution test chart to obtain a photo of the ISO12233 camera resolution test chart, and then view the taken test chart photo on a computer to observe the clarity of the test lines and evaluate whether the camera resolution meets the standard.

[0004] During quality inspection on a factory assembly line, tens of thousands of cameras need to be detected. If relying on manual visual reading to judge whether the test chart photo is a defective product, there are problems such as high manual subjectivity, poor accuracy, low detection efficiency, and heavy detection tasks. If there is an algorithm and device that can automatically read the test image to judge whether the resolution meets the standard, thereby improving the detection efficiency and detection accuracy, it would be very meaningful. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide an automatic detection method and device for the imaging quality of a camera module, which judges whether the camera imaging is qualified by detecting the correct rate of shooting the binary matrix of a two-dimensional code, thereby improving the test speed and detection accuracy.

[0006] In a first aspect, the present invention provides an automatic detection method for the imaging quality of a camera module, including:

[0007] Step 1, generate at least one two-dimensional code image with a specified size, and convert each two-dimensional code image into a first binary matrix correspondingly;

[0008] Step 2, use the camera module under test to take at least one two-dimensional code image set at a set distance, and then obtain the second binary matrix obtained by parsing;

[0009] Step 3, compare the second binary matrix with the corresponding first binary matrix, calculate the error rate of the camera module under test, and judge whether it is qualified.

[0010] Further, in the step 1, generate three two-dimensional code images with large, medium, and small sizes, and convert each two-dimensional code image into a first binary matrix correspondingly.

[0011] Further, in the step 2, the set distance is more than one different distance.

[0012] Further, in the step 1, the first binary matrix is converted by the following formula:

[0013]

[0014] where f(x, y) is the pixel value of the standard QR code image unit block, and N is the conversion threshold, with a value range of 1 - 254.

[0015] Further, in the step 3, calculating the error rate of the camera module under test specifically includes: performing a bitwise exclusive OR operation on the second binary matrix and the corresponding first binary matrix to obtain an error matrix; calculating the error rate of the camera module under test based on the error matrix, and determining whether it is qualified by comparing with the error rate threshold.

[0016] In a second aspect, the present invention provides an automatic detection device for the imaging quality of a camera module, including:

[0017] A generation module, configured to generate at least one QR code image of a specified size, and convert each QR code image into a first binary matrix correspondingly;

[0018] A shooting and conversion module, configured to shoot at least one QR code image arranged at a set distance through the camera module under test, and then obtain the second binary matrix obtained by parsing;

[0019] A result judgment module, configured to compare the second binary matrix with the corresponding first binary matrix, calculate the error rate of the camera module under test, and determine whether it is qualified.

[0020] Further, in the generation module, QR code images of large, medium, and small sizes are generated, and each QR code image is converted into a first binary matrix correspondingly.

[0021] Further, in the shooting and conversion module, the set distance is more than one different distance.

[0022] Further, in the generation module, the first binary matrix is converted by the following formula:

[0023]

[0024] where f(x, y) is the pixel value of the standard QR code image unit block, and N is the conversion threshold, with a value range of 1 - 254.

[0025] Further, in the result judgment module, calculating the error rate of the camera module under test specifically includes: performing a bitwise exclusive OR operation on the second binary matrix and the corresponding first binary matrix to obtain an error matrix; calculating the error rate of the camera module under test based on the error matrix, and determining whether it is qualified by comparing with the error rate threshold.

[0026] The technical solutions provided in the embodiments of the present invention have at least the following technical effects:

[0027] By detecting the accuracy rate of the binary matrix of the captured QR code to determine whether the imaging of the camera is qualified, it can automatically recognize and read the test image to determine whether the resolution meets the standard. Compared with the manual detection method, it improves the test speed and detection accuracy, and has the advantages of quantifiable test results, simple test method, and low test cost.

[0028] The above description is only an overview of the technical solutions of the present invention. In order to be able to more clearly understand the technical means of the present invention, it can be implemented according to the content of the description. And in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable, the following specifically illustrates the specific embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The present invention will be further described below with reference to the accompanying drawings in conjunction with the embodiments.

[0030] Figure 1 It is a schematic flow chart of the imaging quality detection of the camera module in the prior art;

[0031] Figure 2 It is the overall flow chart of the method in the first embodiment of the present invention;

[0032] Figure 3 It is a schematic diagram of the first binary matrix in the first embodiment of the present invention;

[0033] Figure 4 It is a schematic diagram of the second binary matrix in the first embodiment of the present invention;

[0034] Figure 5 It is a schematic diagram of the error matrix in the first embodiment of the present invention;

[0035] Figure 6 It is a schematic diagram of the detection process in the first embodiment of the present invention;

[0036] Figure 7 It is a schematic diagram of three predefined QR code images in the first embodiment of the present invention;

[0037] Figure 8 It is a schematic diagram of the QR code captured by the camera module under test at different distances in the first embodiment of the present invention;

[0038] Figure 9 It is a schematic diagram of the structure of the device in the second embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0039] In an embodiment of the present invention, by providing a method and device for automatically detecting the imaging quality of a camera module, the imaging of the camera is determined to be qualified by detecting the correct rate of the binary matrix of the captured two-dimensional code, thereby improving the test speed and detection accuracy.

[0040] The overall idea of the technical solution in the embodiment of the present invention is as follows:

[0041] 1. Pre-define the detection two-dimensional code:

[0042] 1.1 Pre-define test two-dimensional codes of three sizes;

[0043] 1.2 Load the two-dimensional code and convert it into a binary matrix BitMatrix.

[0044] 2. Shoot the two-dimensional code test image and parse the two-dimensional code:

[0045] 2.1 Shoot different two-dimensional code test images at different distances;

[0046] 2.2 Parse the content of different two-dimensional code images at different distances and extract the binary matrix.

[0047] 3. Calculate the correct rate of the captured two-dimensional code matrix relative to the pre-defined two-dimensional code matrix.

[0048] 4. Determine whether the camera module is a defective product according to the correct rate of the binary matrix.

[0049] Through the method and device for detecting the imaging quality of the camera module based on the comparison of the two-dimensional code matrix in this embodiment, it is possible to automatically recognize the test image to determine whether the resolution meets the standard, thereby improving the detection efficiency and detection accuracy, which is very meaningful.

[0050] Embodiment 1

[0051] This embodiment provides a method for automatically detecting the imaging quality of a camera module, as Figure 2 shown, including;

[0052] Step 1: Generate at least one two-dimensional code image of a specified size, and convert each two-dimensional code image into a first binary matrix correspondingly, as Figure 3 shown;

[0053] Step 2: Shoot at least one two-dimensional code image set at a set distance through the camera module to be tested, and then obtain the parsed second binary matrix, as Figure 4 shown;

[0054] Step 3: Compare the second binary matrix with the corresponding first binary matrix, calculate the error rate of the camera module to be tested, and determine whether it is qualified.

[0055] Preferably, in step 1, three QR code images of large, medium and small sizes are generated, and each QR code image is correspondingly converted into a first binary matrix.

[0056] Preferably, in step 2, the distance is set to more than one different distance. When generating three QR code images of large, medium and small sizes, images can be taken at different distances respectively to judge the imaging quality at different distances, so as to realize the detection of multi-purpose scenarios. For example, the same camera module can identify QR codes (close distance) and also recognize human faces (far distance). When only generating a single-size QR code image, images can also be taken at different distances respectively.

[0057] Specifically, in step 1, the first binary matrix is converted by the following formula:

[0058]

[0059] where f(x,y) is the pixel value of the standard QR code image unit block (the QR code matrix generally has only two pixel values, 0 and 255), N is the conversion threshold, and the value range is 1-254. As long as it satisfies converting white units to 0 and black units to 1, the preferred value is 127.

[0060] Preferably, in step 3, the error rate of the camera module under test is calculated, specifically including: performing a bitwise exclusive OR operation on the second binary matrix and the corresponding first binary matrix to obtain an error matrix, as Figure 5 shown; then calculating the error rate of the camera module under test according to the error matrix, and judging whether it is qualified by comparing with the error rate threshold.

[0061] As Figure 6 shown, in an embodiment, the automatic detection process of the camera module imaging quality is implemented as follows:

[0062] 1. Pre-define the detection QR code

[0063] 1.1 Pre-define three sizes of test QR codes

[0064] A set of pre-defined QR code test cards for camera imaging quality detection are three hard cards, the same size as A4 paper, with 3 QR codes of large, medium, small and 3 respectively on them, as Figure 7 shown, the size and parameters of the pre-defined QR codes are as follows:

[0065] QR Code Name Physical Size cm Binary Matrix Error Correction Rate QR Code Content Large 14x14 41x41 15% Large Middle 7x7 41x41 15% Middle Small 3x3 41x41 15% Small

[0066] 1.2 Load the QR code and convert it into a binary matrix

[0067] Read the above standard QR code image f and convert it into the first binary matrix M according to the following formula std:

[0068]

[0069] Among them, f(x, y) is the pixel value of the standard QR code image unit block.

[0070] The first binary matrix M std (i.e., the standard binary matrix) is as Figure 3 shown.

[0071] 2. Take a test image of the QR code and parse the QR code

[0072] 2.1 At different distances, take different test images of the QR code to achieve the detection of multi-purpose scenarios, such as Figure 8 shown:

[0073] Take a photo of the QR code (small) at a distance of 15 cm between the test card and the camera module;

[0074] Take a photo of the QR code (medium) at a distance of 60 cm between the test card and the camera module;

[0075] Take a photo of the QR code (large) at a distance of 160 cm between the test card and the camera module.

[0076] 2.2. Parse the content of different QR code images at different distances and extract the binary matrix

[0077] Call the QR code parsing algorithm (existing technology) to parse the photos of different QR codes taken at different distances respectively, and parse to obtain the QR code content and the QR code binary matrix M camera .

[0078] 3. Calculate the correct rate of the captured QR code matrix relative to the predefined QR code matrix

[0079] According to the parsed QR code content, find the binary matrix M of the predefined QR code corresponding to the captured QR code std :

[0080]

[0081] For the binary matrix M of the predefined QR code std (i.e., the second binary matrix) and the binary matrix M of the QR code captured by the camera module camera (i.e., the first binary matrix), perform a bitwise exclusive OR (XOR) operation according to the above formula to obtain the error matrix M error , as Figure 5 shown.

[0082] According to the error matrix M error calculate the binary matrix M of the QR code captured by the camera modulecamera (i.e., the second binary matrix) relative to the binary matrix M of the predefined QR code std (i.e., the first binary matrix) error rate P:

[0083]

[0084] where M is the number of unit blocks in each row / column of the binary matrix.

[0085] 4. Determine whether the camera module is defective according to the correct rate of the binary matrix

[0086] If any error rate P is higher than the error rate threshold T (T can be set as needed, 3% in this embodiment), the captured image is unqualified, and it is determined that the currently inspected camera module is defective.

[0087] Based on the same inventive concept, the present application also provides an apparatus corresponding to the method in Embodiment 1. For details, see Embodiment 2.

[0088] Embodiment 2

[0089] In this embodiment, an automatic detection device for the imaging quality of a camera module is provided, as Figure 9 shown, including:

[0090] A generation module, configured to generate at least one QR code image of a specified size, and convert each QR code image into a first binary matrix correspondingly;

[0091] A shooting and conversion module, configured to shoot at least one QR code image set at a set distance through the inspected camera module, and then obtain the second binary matrix obtained by parsing;

[0092] A result judgment module, configured to compare the second binary matrix with the corresponding first binary matrix, calculate the error rate of the inspected camera module, and determine whether it is qualified.

[0093] Preferably, in the generation module, QR code images of large, medium, and small sizes are generated, and each QR code image is converted into a first binary matrix correspondingly.

[0094] Preferably, in the shooting and conversion module, the set distance is more than one different distance.

[0095] Preferably, in the generation module, the first binary matrix is converted by the following formula:

[0096]

[0097] where f(x, y) is the pixel value of the unit block of the standard QR code image, and N is the conversion threshold, and the value range is 1 - 254.

[0098] Preferably, in the result judgment module, calculating the error rate of the camera module to be inspected specifically includes: performing a bitwise exclusive OR operation on the second binary matrix and the corresponding first binary matrix to obtain an error matrix; calculating the error rate of the camera module to be inspected according to the error matrix, and determining whether it is qualified by comparing with an error rate threshold.

[0099] Since the device introduced in the second embodiment of the present invention is the device adopted for implementing the method of the first embodiment of the present invention, based on the method introduced in the first embodiment of the present invention, those skilled in the art can understand the specific structure and variations of the device, so it will not be elaborated here. Any device adopted by the method of the first embodiment of the present invention falls within the scope of protection of the present invention.

[0100] The embodiment of the present invention determines whether the camera imaging is qualified by detecting the correct rate of the binary matrix of the captured two-dimensional code, can automatically recognize the test image to determine whether the resolution meets the standard. Compared with the manual detection method, it improves the test speed and detection accuracy, and has the advantages of quantifiable test results, simple test method, and low test cost.

[0101] Those skilled in the art should understand that the embodiments of the present invention can be provided as methods, devices, or computer program products. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code.

[0102] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0103] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions in the process Figure 1one process or multiple processes and / or blocks Figure 1 the functions specified in one block or multiple blocks.

[0104] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 the steps of the functions specified in one block or multiple blocks.

[0105] Although the specific embodiments of the present invention have been described above, those skilled in the art of this technology should understand that the specific embodiments we described are illustrative rather than used to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be covered by the scope protected by the claims of the present invention.

Claims

1. An automatic detection method for the imaging quality of a camera module, characterized in that, Including: Step 1: Generate at least one two-dimensional code image of a specified size, and correspondingly convert each two-dimensional code image into a first binary matrix; Step 2: Shoot at least one two-dimensional code image set at a set distance through the camera module to be inspected, and then obtain the parsed second binary matrix; Step 3: Compare the second binary matrix with the corresponding first binary matrix, calculate the error rate of the camera module to be inspected, and determine whether it is qualified.

2. The method according to claim 1, wherein: In the said Step 1, generate two-dimensional code images of large, medium, and small sizes, and correspondingly convert each two-dimensional code image into a first binary matrix.

3. The method according to claim 1, wherein: In the said Step 2, the set distance is more than one different distance.

4. The method according to claim 1, characterized in that: In the said Step 1, the first binary matrix is converted by the following formula: where f(x, y) is the pixel value of the standard two-dimensional code image unit block, and N is the conversion threshold, with a value range of 1 - 254.

5. The method according to claim 1, wherein In the said Step 3, calculating the error rate of the camera module to be inspected specifically includes: performing a bitwise exclusive OR operation on the second binary matrix and the corresponding first binary matrix to obtain an error matrix; calculating the error rate of the camera module to be inspected according to the error matrix, and determining whether it is qualified by comparing with the error rate threshold.

6. An automatic detection device for the imaging quality of a camera module, characterized in that, Including: A generation module, configured to generate at least one two-dimensional code image of a specified size, and correspondingly convert each two-dimensional code image into a first binary matrix; A shooting and conversion module, configured to shoot at least one two-dimensional code image set at a set distance through the camera module to be inspected, and then obtain the parsed second binary matrix; A result judgment module, configured to compare the second binary matrix with the corresponding first binary matrix, calculate the error rate of the camera module to be inspected, and determine whether it is qualified.

7. The device according to claim 6, characterized in that: In the said generation module, generate two-dimensional code images of large, medium, and small sizes, and correspondingly convert each two-dimensional code image into a first binary matrix.

8. The device according to claim 6, characterized in that: In the said shooting and conversion module, the set distance is more than one different distance.

9. The device according to claim 6, characterized in that: In the said generation module, the first binary matrix is converted by the following formula: where f(x, y) is the pixel value of the standard two-dimensional code image unit block, and N is the conversion threshold, with a value range of 1 - 254.

10. The device according to claim 6, characterized in that, In the said result judgment module, calculating the error rate of the camera module to be inspected specifically includes: performing a bitwise exclusive OR operation on the second binary matrix and the corresponding first binary matrix to obtain an error matrix; calculating the error rate of the camera module to be inspected according to the error matrix, and determining whether it is qualified by comparing with the error rate threshold.

Citation Information

Cited By

  • Camera quality detection method and system based on data analysis

    CN120529068A

  • A camera quality detection method and system based on data analysis

    CN120529068B