Camera detection method compatible with face and two-dimensional code recognition
By performing QR code image analysis on the camera at different distances in production tests, the problem of inaccurate recognition caused by image distortion in the camera in facial and QR code recognition is solved, and low-cost, fast and accurate camera screening is achieved, ensuring product stability.
Patent Information
- Application Number
- CN202510309422.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-06-27
AI Technical Summary
In the prior art, when using the same camera for facial recognition and QR code recognition without increasing hardware costs, there is a problem of inaccurate QR code recognition due to image distortion, which affects the user experience.
By adding analysis of QR code images from different distances in production tests, using tooling that fixed the distance between the host and QR code images and three sizes of QR code images, a camera that can be compatible with face recognition and QR code recognition is selected.
It realizes low-cost, convenient and fast detection and accurate camera screening, ensuring that the factory-departed machines have stable quality and avoiding subjective factors of human eye observation.
Smart Images

Figure CN120223875A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of camera detection, and particularly to a camera detection method compatible with face and two-dimensional code recognition. Background Art
[0002] Currently, there are many unlocking methods for building intercom door machines in the industry, such as card swiping, password, sound wave, face recognition, two-dimensional code recognition, etc. At present, there is a need to identify two-dimensional codes in some projects. Without increasing new hardware costs, the same camera is used for face recognition and two-dimensional code recognition. Although the commonly used fish-eye lens in building intercom door machines has a wider viewing angle, it will cause image distortion, which is not conducive to two-dimensional code recognition. Since the camera needs to be compatible with face and two-dimensional code recognition, the manufacturer will fine-tune the focusing distance before the camera leaves the factory.
[0003] For the cameras shipped by the manufacturer, if they are not screened during the assembly of the door unit, some cameras may not be able to accurately recognize two-dimensional codes due to the focusing distance problem, thus affecting the user experience. Conventional screening of cameras requires building a dedicated darkroom and equipping corresponding camera resolution test cards, which is costly and not conducive to large-scale production. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a camera detection method compatible with face and two-dimensional code recognition, which adds the analysis of two-dimensional code images at different distances in production testing, screens out cameras that can be compatible with face recognition and two-dimensional code recognition, and realizes low cost, convenient, fast and accurate detection.
[0005] The present invention provides a camera detection method compatible with face and two-dimensional code recognition, including:
[0006] Test image setting process: respectively generate a small-sized first two-dimensional code image, a medium-sized second two-dimensional code image, and a large-sized third two-dimensional code image, and set the first two-dimensional code image at the first position of the detection tooling, set the second two-dimensional code image at the second position of the detection tooling, and set the third two-dimensional code image at the third position of the detection tooling;
[0007] Video stream acquisition process: perform the camera detection process, install the camera under test at the host position of the detection tooling, and the detection tooling acquires the video streams of the first two-dimensional code image, the second two-dimensional code image, and the third two-dimensional code image through the camera under test respectively;
[0008] Result analysis process: perform two-dimensional code analysis on the video stream through the detection host. If it meets the set standard, the camera under test passes the detection and proceeds to the subsequent process; if it does not meet the set standard, replace the camera and re-perform the camera detection process.
[0009] Further, the distance between the first position of the detection tooling and the host position is a first distance, the distance between the second position of the detection tooling and the host position is a second distance, and the distance between the third position of the detection tooling and the host position is a third distance, and the first distance < the second distance < the third distance.
[0010] Further, the value range of the first distance is 10 - 30 cm, the value range of the second distance is 40 - 80 cm, and the value range of the third distance is 120 - 200 cm.
[0011] Further, the first position is 20 cm away from the host position, the second position is 60 cm away from the host position, and the third position is 150 cm away from the host position.
[0012] Further, in the result analysis process, the set standard for the camera under test to pass the detection is that for n consecutive frames, the QR code images at the three distances can all clearly see more than m% of the squares.
[0013] Further, n takes the value of 5 and m takes the value of 99%.
[0014] The technical solution provided in the embodiment of the present invention has at least the following technical effects:
[0015] Only one tooling for fixing the distance between the host and the QR code image and QR code images of three sizes are needed to screen out cameras that can be compatible with face recognition and QR code recognition, greatly saving labor and environmental costs. At the same time, because the passing criteria are determined by software, the subjective factors of human eye observation can be removed, ensuring that the machines leaving the factory have stable quality.
[0016] The above description is only an overview of the technical solution of the present invention. In order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the specification. And in order to make the above and other objects, features and advantages of the present invention more obvious and understandable, the following specifically describes the embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The present invention will be further described below with reference to the accompanying drawings in conjunction with embodiments.
[0018] Figure 1 is the flowchart of the method in Embodiment 1 of the present invention;
[0019] Figure 2 is the execution flowchart of the detection in Embodiment 1 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0020] In an embodiment of the present invention, by providing a camera detection method compatible with face and QR code recognition, the parsing of QR code images at different distances is added in production testing, and cameras capable of compatible face recognition and QR code recognition are screened out, achieving low cost, convenient, fast and accurate detection.
[0021] The overall idea of the technical solution in the embodiment of the present invention is as follows:
[0022] Starting from the actual application scenario, first determine the most complex QR code to be recognized. Taking the most complex QR code as the standard, in the factory test, add the parsing of this QR code. Only a tooling with a fixed distance between the host and the QR code image and three-sized QR code images are needed to screen out cameras capable of compatible face recognition and QR code recognition. If the parsing result meets the standard, it is regarded as passing, otherwise it is regarded as failing.
[0023] Embodiment 1
[0024] This embodiment provides a camera detection method compatible with face and QR code recognition, as Figure 1 shown, including:
[0025] S1. Test image setting process: Generate a first QR code image of a small size, a second QR code image of a medium size, and a third QR code image of a large size respectively, and set the first QR code image at the first position of the detection tooling, set the second QR code image at the second position of the detection tooling, and set the third QR code image at the third position of the detection tooling;
[0026] S2. Video stream acquisition process: Execute the camera detection process, install the camera under test at the host position of the detection tooling, and the detection tooling acquires the video streams of the first QR code image, the second QR code image, and the third QR code image respectively through the camera under test;
[0027] S3. Result parsing process: Parse the QR code of the video stream through the detection host. If it meets the set standard, the camera under test passes the detection and proceeds to the subsequent process; if it does not meet the set standard, replace the camera and re-execute the camera detection process.
[0028] In this embodiment, the interval between the first position of the detection tooling and the host position is the first distance, the interval between the second position of the detection tooling and the host position is the second distance, the interval between the third position of the detection tooling and the host position is the third distance, and the first distance < the second distance < the third distance, that is, the first QR code image of a small size is set at the position closest to the host, the third QR code image of a large size is set at the position farthest from the host, and the second QR code image of a medium size is set in the middle position, so as to better meet the actual detection requirements of the building intercom door machine.
[0029] Preferably, the value range of the first distance is 10 - 30 cm, and it is taken as 20 cm in this embodiment; the value range of the second distance is 40 - 80 cm, and it is taken as 60 cm in this embodiment; the value range of the third distance is 120 - 200 cm, and it is taken as 150 cm in this embodiment.
[0030] In this embodiment, during the result analysis process, the set standard for the tested camera is that for n consecutive frames (n is taken as 5 in this embodiment), the QR code images at three distances can all clearly show more than m% (m is taken as 99% in this embodiment) of the squares. The values of n and m can also be adjusted according to actual requirements.
[0031] In a specific embodiment, as Figure 2 shown, the execution flow of the detection method is as follows:
[0032] 1. Generate the QR code with the highest complexity for use according to actual requirements.
[0033] 2. Fix the distance between the tested host and the QR code. A total of three QR codes with different sizes are required. From small to large, the distances from the tested host are 20 cm, 60 cm, and 150 cm respectively.
[0034] 3. Turn on the camera of the tested machine for factory testing to analyze the QR code. It is required that for 5 consecutive frames, the QR codes at three distances can all clearly show more than 99% of the squares to be considered passed.
[0035] Among them, the QR code at a distance of 20 cm (the smallest size) is used to check whether the QR code imaging is clear. The QR code at a distance of 60 cm (moderate size) and the QR code at a distance of 150 cm (the largest size) are used to check whether the face imaging is clear. In other application scenarios, the distances between the large, medium, and small QR codes and the tested machine can also be adjusted according to actual requirements.
[0036] The method of the embodiment of the present invention does not require building a darkroom and purchasing a special camera test card. Only a tooling for fixing the distance between the host and the QR code image and three-sized QR code images are needed to screen out cameras that can be compatible with face recognition and QR code recognition, greatly saving labor and environmental costs. At the same time, because the passing criterion is determined by software, the subjective factor of human eye observation can be removed, ensuring that the machines produced have stable quality.
[0037] Although the specific implementation manners 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 variations made by those skilled in the art in accordance with the spirit of the present invention should all be covered within the scope protected by the claims of the present invention.
Claims
1. A camera detection method compatible with face and QR code recognition, characterized in that: include: Test image setting process: generate a first two-dimensional code image of a small size, a second two-dimensional code image of a medium size, and a third two-dimensional code image of a large size respectively, and set the first two-dimensional code image at a first position of the detection tooling, set the second two-dimensional code image at a second position of the detection tooling, and set the third two-dimensional code image at a third position of the detection tooling; and the first position, the second position, the third position and the host position have different intervals; Video stream acquisition process: execute the camera detection process, install the camera under test at the host position of the detection tooling, and the detection tooling respectively acquires the video streams of the first two-dimensional code image, the second two-dimensional code image, and the third two-dimensional code image through the camera under test; Result analysis process: The detection host analyzes the video stream through the QR code. If it meets the set standards, the camera under test passes the test and proceeds to the subsequent process; if it does not meet the set standards, the camera is replaced and the camera detection process is re-executed.
2. The method according to claim 1, characterized in that: The interval between the first position of the detection tooling and the host position is a first distance, the interval between the second position of the detection tooling and the host position is a second distance, the interval between the third position of the detection tooling and the host position is a third distance, and the first distance<second distance<third distance.
3. The method according to claim 2, characterized in that: The value range of the first distance is 10-30 cm, the value range of the second distance is 40-80 cm, and the value range of the third distance is 120-200 cm.
4. The method according to claim 1, characterized in that: The first position is 20 cm away from the host position, the second position is 60 cm away from the host position, and the third position is 150 cm away from the host position.
5. The method according to claim 1, characterized in that: During the result analysis process, the camera under test passes the detection setting standard of n consecutive frames, and more than m% of the blocks of the two-dimensional code images at three distances can be clearly seen.
6. The method according to claim 5, characterized in that: The value of n is 5 and the value of m is 99%.