Camera focusing accuracy inspection method, device, computer equipment and storage medium
By using image clarity verification, pattern recognition and parameter verification in camera focus accuracy verification, the reliability problems caused by relying on human eye observation in the prior art are solved, and quantitative and reliable inspection of camera focus accuracy is achieved.
Patent Information
- Application Number
- CN202110913748.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-10
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2041-08-10
AI Technical Summary
In the prior art, the inspection of camera focus accuracy depends on human eye observation, and there is subjectivity, resulting in a decrease in the reliability of the inspection results.
By acquiring images captured by the camera at different lens rotation angles, the sharpness of the image is determined and the clarity is checked based on the clarity. If passed, the image collected by the camera at different tool angles is obtained, the specific pattern is recognized and the pattern detection rate is determined, the detection image is filtered out, and the parameter verification results are determined based on the pattern position and optical center position information, and the focus accuracy is determined.
Quantitative inspection of camera focus accuracy is realized, the reliability of inspection results is improved, and the subjectivity of human eye observation is reduced.
Smart Images

Figure CN115706795B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of camera technology, and in particular to a method, device, computer equipment and storage medium for checking the focusing accuracy of a camera. Background Art
[0002] With the development of camera technology, in order to ensure that the camera can capture clear images, it is often necessary to check the focus accuracy of the camera.
[0003] In the related art, in order to complete the inspection of the camera's focus accuracy, it is often necessary to rely on the human eye to perform a quantitative inspection of the camera's focus accuracy, that is, by sticking a verification paper with a specific pattern on the wall, fixing the camera on a tooling, determining the verification paper in the image by collecting the image, and locally magnifying it by a fixed multiple, and then rotating the camera lens, observing the clarity of the pattern with the human eye, and adjusting the camera parameters to adjust it to the clearest state, and then repeatedly observing the clarity of the pattern by rotating the angle of the camera tooling until the camera tooling rotates one circle to complete the inspection of the camera's focus accuracy.
[0004] However, in the process of checking the camera's focus accuracy, it only relies on observation by the human eye, which is subjective and reduces the reliability of the inspection results. Summary of the invention
[0005] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for checking camera focus accuracy in order to solve the above technical problems.
[0006] A method for checking the focusing accuracy of a camera, the method comprising:
[0007] Acquire the first images captured by the camera at different lens rotation angles, and determine the clarity of each captured first image; perform clarity verification on the camera based on the clarity of each first image, and if the clarity verification passes, obtain multiple second images captured by the camera at different tooling angles; recognize specific patterns on the multiple second images based on preset pattern information, and determine the pattern detection rate corresponding to each second image based on the recognition result; for each tooling angle, based on the pattern detection rate corresponding to each second image at the corresponding tooling angle, select the detection images corresponding to each tooling angle from the second image; determine the parameter verification result based on the pattern position information of each specific pattern in the multiple detection images and the camera optical center position information; the parameter includes at least one of a distance parameter and an angle parameter; and determine the focus accuracy verification result of the camera based on the parameter verification result.
[0008] In one embodiment, the performing clarity check on the camera based on the clarity of each first image includes:
[0009] Based on the clarity of each of the first images, a clarity threshold is determined; a plurality of verification first images captured by the camera at different second lens rotation angles are obtained; if the verification clarity corresponding to each verification first image is greater than or equal to the clarity threshold, it is determined that the camera has passed the clarity verification.
[0010] In one embodiment, determining the detection rate of the pattern corresponding to each second image based on the recognition result includes:
[0011] Based on the recognition result of the specific pattern, the rotation angle corresponding to each specific pattern in the multiple second images is determined; for the second images captured at the same tooling angle, the rotation angle corresponding to the corresponding second image is compared with the corresponding tooling angle, and the effective determination result of each specific pattern is obtained based on the comparison result; based on the effective determination result of each specific pattern in the multiple second images and the number of specific patterns, the detection rate corresponding to each second image is determined.
[0012] In one embodiment, for each tooling angle, based on the pattern detection rates corresponding to each second image at the corresponding tooling angle, the detection images corresponding to each tooling angle are screened out from the second image, including:
[0013] For each tooling angle, if the pattern detection rates corresponding to each second image under the corresponding tooling angle are all within the detection rate range, the maximum detection rate among the multiple detection rates corresponding to the second image will be used as the target detection rate of the corresponding second image; by comparing each target detection rate corresponding to each tooling angle with the detection rate threshold, the second image corresponding to the target detection rate greater than or equal to the detection rate threshold will be used as the detection image corresponding to the tooling angle.
[0014] In one embodiment, the parameter verification result includes a distance parameter verification result and an angle parameter verification result, and the parameter verification result is determined according to the pattern position information of each specific pattern in the plurality of detection images and the camera optical center position information, including:
[0015] The distance parameter verification result is determined based on the distance between the pattern position of each specific pattern in multiple detection images and the camera optical center position; the angle parameter verification result is determined based on the position angle between specific patterns with adjacent positional relationships in each detection image.
[0016] In one embodiment, the distance parameter verification result is determined according to the distance between the pattern position of each specific pattern in the plurality of detection images and the position of the camera optical center, including:
[0017] Determine the distances between the pattern position of each specific pattern in the multiple detection images and the position of the camera optical center; if the distances corresponding to each specific pattern in the multiple detection images all meet the distance error condition, then determine that the distance parameter verification result is qualified; if there is at least one distance in the multiple detection images corresponding to each specific pattern that does not meet the distance error condition, then determine that the distance parameter verification result is unqualified.
[0018] In one embodiment, before determining the angle parameter verification result based on the position angle between specific patterns having adjacent positional relationships in each detection image, the method further includes:
[0019] For each detection image, determine the straight lines formed by the pattern positions of each specific pattern in the corresponding detection image and the camera optical center position; take the camera optical center position as the vertex of the position angle, and take the straight lines formed by two adjacent patterns in the same detection image and the camera optical center as the two sides of the position angle; based on the two sides and the vertex, determine the position angle between specific patterns with adjacent positional relationships in each detection image.
[0020] In one embodiment, the angle parameter verification result is determined based on the position angle between specific patterns having adjacent positional relationships in each detection image, including:
[0021] Determine the position angles of feature patterns with adjacent positional relationships in each detection image; if the position angles of feature patterns with adjacent positional relationships in each detection image all meet the angle error condition, then the angle parameter verification result is determined to be qualified; if at least one position angle of feature patterns with adjacent positional relationships in multiple detection images does not meet the angle error condition, then the angle parameter verification result is determined to be unqualified.
[0022] A device for checking the focusing accuracy of a camera, the device comprising:
[0023] A first acquisition module is used to acquire first images acquired by the camera at different lens rotation angles, and determine the clarity of each acquired first image;
[0024] A second acquisition module is used to perform a clarity check on the camera based on the clarity of each first image, and if the clarity check passes, obtain a plurality of second images respectively captured by the camera at different tooling angles;
[0025] A first determination module, configured to identify specific patterns in the plurality of second images respectively based on preset pattern information, and determine a pattern detection rate corresponding to each second image respectively based on the recognition result;
[0026] A screening module, for screening, for each tooling angle, detection images corresponding to each tooling angle from the second image based on the pattern detection rates corresponding to each second image at the corresponding tooling angle;
[0027] A second determination module is used to determine a parameter verification result according to the pattern position information of each specific pattern in the plurality of detection images and the camera optical center position information; the parameter includes at least one of a distance parameter and an angle parameter;
[0028] The third determination module is used to determine the focus accuracy inspection result of the camera according to the parameter verification result.
[0029] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements any of the above-mentioned methods for checking the focusing accuracy of a camera when executing the computer program.
[0030] A computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the method for checking the focusing accuracy of a camera as described above is implemented.
[0031] The above-mentioned camera focus accuracy inspection method, device, computer equipment and storage medium determine the clarity of each captured first image by acquiring the first image captured by the camera at different lens rotation angles; perform clarity verification on the camera based on the clarity of each first image, and if the clarity verification passes, then based on the camera that has completed the clarity verification, obtain multiple second images captured by the camera at different tooling angles, recognize specific patterns on the multiple second images based on preset pattern information, and determine the pattern detection rate corresponding to each second image based on the recognition result; for each tooling angle, based on the pattern detection rate corresponding to each second image at the corresponding tooling angle, select the detection images corresponding to each tooling angle from the second image; determine the parameter verification result based on the pattern position information of each specific pattern in the multiple detection images and the camera optical center position information; the parameter includes at least one of a distance parameter and an angle parameter; and determine the focus accuracy inspection result of the camera based on the parameter verification result. In this way, based on the quantitative inspection indicators of camera clarity verification, pattern detection rate, and parameter verification results, quantitative inspection of camera focus accuracy is achieved, thereby improving the reliability of the inspection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A diagram showing an application environment of a method for checking camera focus accuracy in one embodiment;
[0033] Figure 2 A schematic diagram of a flow chart of a method for checking camera focus accuracy in one embodiment;
[0034] Figure 3 A schematic flow chart of a step of determining a pattern detection rate in one embodiment;
[0035] Figure 4 A flowchart of effective determination in one embodiment;
[0036] Figure 5 A flowchart of a step of determining a detection image in one embodiment;
[0037] Figure 6 A flowchart of determining effectiveness and qualification in one embodiment;
[0038] Figure 7 is a flow chart of a method for checking camera focus accuracy in one embodiment;
[0039] Figure 8 is a structural block diagram of a device for checking camera focus accuracy in one embodiment;
[0040] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0042] The camera focus accuracy inspection method provided in this application can be applied to Figure 1In the application environment shown, the camera 102 communicates with the computer device 104 through a network or a connection line. The computer device 104 obtains the first images captured by the camera 102 at different lens rotation angles, and determines the clarity of each captured first image; the computer device 104 performs clarity verification on the camera based on the clarity of each first image, and if the clarity verification passes, obtains multiple second images captured by the camera 102 at different tooling angles; the computer device 104 recognizes specific patterns on the multiple second images based on preset pattern information, and determines the pattern detection rate corresponding to each second image based on the recognition result; for each tooling angle, based on the pattern detection rate corresponding to each second image at the corresponding tooling angle, the detection images corresponding to each tooling angle are screened out from the second image; the computer device 104 determines the parameter verification result based on the pattern position information of each specific pattern in the multiple detection images and the camera optical center position information; the parameter includes at least one of a distance parameter and an angle parameter; the computer device 104 determines the focus accuracy verification result of the camera 102 based on the parameter verification result.
[0043] In one embodiment, Figure 2 As shown, a method for checking the focus accuracy of a camera is provided, and the method is applied to Figure 1 The computer device in the example is used to illustrate, including the following steps:
[0044] Step S202, obtaining first images captured by the camera at different lens rotation angles, and determining the clarity of each captured first image.
[0045] The lens rotation angle is the angle formed by the rotation of the lens in the camera.
[0046] Specifically, the computer device acquires a plurality of first images corresponding to the number of rotations of the first lens, and obtains the clarity corresponding to each first image based on each first image.
[0047] The first lens rotation times are determined by setting the first lens rotation angle and the first lens rotation step, and the first lens rotation angle threshold is 360 degrees. The clarity refers to the clarity of each detail pattern and its boundary on the image.
[0048] For example, the computer device sets the first lens rotation step and the first lens rotation angle threshold, and the computer device determines the first lens rotation angle corresponding to the first lens rotation number based on the first lens rotation step, and the computer device obtains a plurality of first images corresponding to each first lens rotation angle, and obtains the clarity corresponding to each first image based on each first image. For example, the computer device sets the first lens rotation step to 30 degrees and the first lens rotation angle threshold to 360 degrees, then the first lens rotation number threshold is 12 times, and the computer device determines the first lens rotation number to be the first time, the second time, ..., and the twelfth time based on the first lens rotation step of 30 degrees, and determines each first lens rotation angle respectively, that is, the first lens rotation angle corresponding to the first time is 30 degrees, the first lens rotation angle corresponding to the second time is 60 degrees ..., and the first lens rotation angle corresponding to the twelfth time is 360 degrees, and the computer device obtains 12 first images corresponding to each first rotation angle, and obtains the clarity corresponding to each first image based on each first image.
[0049] Step S204, performing clarity verification on the camera based on the clarity of each first image, and if the clarity verification passes, obtaining a plurality of second images respectively captured by the camera at different tooling angles.
[0050] The camera is fixed on the tooling, the tooling angle is selected by the tooling step, the tooling angle ranges from 0 degrees to 360 degrees, and the tooling angle threshold is 360 degrees.
[0051] In one of the embodiments, the camera is subjected to clarity verification based on the clarity of each first image, including: determining a clarity threshold based on the clarity of each first image; acquiring a plurality of verification first images captured by the camera at different second lens rotation angles; and determining that the camera passes the clarity verification if the verification clarity corresponding to each verification first image is greater than or equal to the clarity threshold.
[0052] The second lens rotation angle is a rotation angle corresponding to the second lens rotation times, the second lens rotation times are determined by setting the second lens rotation angle and the second lens rotation step, and the second lens rotation angle threshold is 360 degrees.
[0053] Specifically, the computer device compares the clarity of each first image based on its clarity, determines the maximum clarity, and obtains the clarity error. The computer device determines the clarity threshold based on the maximum clarity and the clarity error. The computer device obtains a plurality of verification first images corresponding to the number of rotations of the second lens, and obtains the verification clarity corresponding to each verification first image based on each verification first image. When each verification clarity is greater than or equal to the clarity threshold, it is determined that the clarity verification is passed. If the clarity verification is passed, the computer device obtains a plurality of second images captured by the camera at different tooling angles.
[0054] The second lens rotation times are determined by setting the second lens rotation angle and the second lens rotation step, and the second lens rotation angle threshold is 360 degrees.
[0055] For example, the computer device obtains 12 first images corresponding to the number of first lens rotations, and obtains the clarity corresponding to each first image, that is, 12 clarity, and determines the maximum clarity as MAX based on the obtained multiple clarity, and the computer device obtains the clarity error as d, and subtracts the clarity error from the maximum clarity to obtain the clarity threshold, that is, MAX-d. The computer device sets the second lens rotation step to 40 degrees, and the second lens rotation angle threshold to 360 degrees, then the second lens rotation number threshold is 9 times, and the computer device determines the second lens rotation number as the first time, the second time, ..., and the ninth time based on the second lens rotation step of 40 degrees, and determines each second lens rotation angle respectively, that is, the second lens rotation angle corresponding to the first time is 40 degrees, the second lens rotation angle corresponding to the second time is 80 degrees ..., and the second lens rotation angle corresponding to the ninth time is 360 degrees. The computer device obtains 9 verification first images corresponding to each second rotation angle, and obtains the verification clarity corresponding to each verification first image based on each verification first image, and compares the 9 verification clarity with the clarity threshold MAX-d. If the 9 verification clarity is greater than or equal to the clarity threshold MAX-d, the computer device determines that the clarity verification is passed. If the clarity verification is passed, the computer device obtains a tooling step of 60 degrees, and based on the tooling angle threshold of 360 degrees, the tooling angles are 60 degrees, 120 degrees, 180 degrees, 240 degrees, 300 degrees, and 360 degrees, that is, 6 tooling angles, and the computer device obtains multiple second images captured by the camera at the 6 tooling angles.
[0056] Step S206: Recognize specific patterns on the plurality of second images respectively based on the preset pattern information, and determine the pattern detection rate corresponding to each second image respectively based on the recognition result.
[0057] The preset pattern information is a unique identifier used to characterize the pattern and a label of the pattern. The pattern detection rate is the probability that the pattern of each image is correctly determined.
[0058] Specifically, the computer device obtains preset pattern information corresponding to each specific pattern of the second image, and the computer device obtains pattern information corresponding to each specific pattern in each second image. For each specific pattern in each second image, the computer device identifies the pattern information corresponding to the specific pattern with the corresponding preset pattern information to obtain a recognition result. The computer device obtains the number of specific patterns in each image, and determines the pattern detection rate corresponding to each second image based on the number of specific patterns corresponding to each second image and the recognition result.
[0059] For example, the computer device acquires 10 second images at each tooling angle, and the acquisition camera acquires 60 second images F at 6 tooling angles. mn , where F mn Identify the nth second image in the mth tooling angle, such as F 11 The computer device obtains the preset pattern information corresponding to each specific pattern in the second image, which may be the preset Aruco code of each specific pattern, and the computer device obtains each second image F mn If there are three specific patterns in each second image, the specific pattern can be expressed as C mn-a , which means the ath specific pattern in the nth second image at tooling angle m, where the subscript a represents the order of the pattern from left to right on the image, i.e. C mn-1 is the leftmost specific pattern in the second image, C mn-2 is the specific pattern in the middle of the second image, C mn-3 is the rightmost specific pattern in the second image. The computer device obtains the Aruco code of each specific pattern in the 60 second images respectively, and the computer device converts C mn-a The corresponding Aruco code and C mn-a The corresponding preset Aruco code is identified to obtain the identification result. If C mn-a The corresponding Aruco code and C mn-a If the corresponding preset Aruco codes are consistent, the recognition result is successful recognition, and the computer device determines the pattern detection rate corresponding to each second image based on the recognition result.
[0060] Step S208 , for each tooling angle, based on the pattern detection rates corresponding to each second image at the corresponding tooling angle, the detection images corresponding to each tooling angle are screened out from the second image.
[0061] Specifically, the computer device obtains the pattern detection rate at each tooling angle. For each tooling angle, based on the pattern detection rate corresponding to each second image at the corresponding tooling angle, the detection images corresponding to each tooling angle are screened out from the second image.
[0062] For example, the computer device obtains the pattern detection rate at each tooling angle and obtains the detection rate range. If the detection rates corresponding to the second image at the corresponding tooling angle all meet the detection rate range, the second image corresponding to the maximum detection rate among the multiple detection rates that is greater than the detection rate threshold is used as the detection image corresponding to the corresponding tooling angle.
[0063] Step S210, determining a parameter verification result according to the pattern position information of each specific pattern in the plurality of detection images and the camera optical center position information; the parameter includes at least one of a distance parameter and an angle parameter.
[0064] Specifically, the computer device obtains the pattern position information of each specific pattern in each detection image, and the camera optical center position information, and determines the parameter verification result corresponding to each detection image based on the pattern position information of each specific pattern in multiple detection images, and the camera optical center position information.
[0065] For example, the computer device obtains the pattern position information of each specific pattern in each detection image and the camera optical center position information, determines the distance parameters and angle parameters corresponding to each specific pattern in each detection image according to the pattern information of each specific pattern in multiple detection images and the camera optical center position information, and determines the parameter verification result corresponding to each detection image based on the distance parameters and angle parameters corresponding to each specific pattern in each detection image.
[0066] Step S212, determining the focus accuracy inspection result of the camera according to the parameter verification result.
[0067] Specifically, the computer device obtains the parameter verification result corresponding to each detection image, and determines the focus accuracy verification result of the camera according to the parameter verification result.
[0068] For example, the computer device obtains the parameter verification result corresponding to each detection image. If the parameter verification results corresponding to each detection image are qualified, then the focus accuracy verification result of the camera is determined to be qualified; if there is at least one detection image whose corresponding verification result is unqualified, then the diagonal accuracy verification result of the camera is determined to be unqualified.
[0069] In the above-mentioned method for checking the focus accuracy of the camera, the clarity of each first image captured by the camera at different lens rotation angles is determined by acquiring the first image captured by the camera at different lens rotation angles; the clarity of the camera is checked based on the clarity of each first image, and if the clarity check passes, a plurality of second images captured by the camera at different tooling angles are acquired based on the camera that has completed the clarity check, and specific patterns are respectively identified for the plurality of second images based on preset pattern information, and the pattern detection rate corresponding to each second image is determined based on the recognition result; for each tooling angle, based on the pattern detection rate corresponding to each second image at the corresponding tooling angle, the detection images corresponding to each tooling angle are screened out from the second image; the parameter verification result is determined based on the pattern position information of each specific pattern in the plurality of the detection images and the camera optical center position information; the parameter includes at least one of a distance parameter and an angle parameter; and the focus accuracy inspection result of the camera is determined based on the parameter verification result. In this way, based on the quantitative inspection indicators of camera clarity verification, pattern detection rate, and parameter verification results, quantitative inspection of camera focus accuracy is achieved, thereby improving the reliability of the inspection results.
[0070] In one embodiment, Figure 3 As shown, the method of determining the pattern detection rate corresponding to each second image based on the recognition result includes:
[0071] Step S302: Based on the recognition result of the specific pattern, determine the rotation angle corresponding to each specific pattern in the plurality of second images.
[0072] The recognition result includes whether each specific pattern is successfully recognized and the reference center coordinate information corresponding to the specific pattern, such as the a-th specific pattern C in the n-th second image at the tooling angle m. mn-a , the C mn-a The recognition result includes whether the specific pattern is recognized and whether it is related to C mn-a The corresponding reference center coordinate information. The recognition result is the recognition success of each specific pattern in each second image, and the recognition failure of each specific pattern in each second image.
[0073] Specifically, the computer device obtains the recognition result of each specific pattern in each second image. If the recognition result of each specific pattern in each second image is successful, the computer device determines the reference center coordinate information corresponding to each specific pattern based on each specific pattern whose recognition result is successful. The computer device obtains the center coordinate information corresponding to each specific pattern in each second image and the camera optical center position information. The computer device determines the rotation angle corresponding to each specific pattern in the plurality of second images based on the center coordinate information corresponding to each pattern in each second image and the camera optical center position information.
[0074] For example, for the a-th specific pattern C in the n-th second image at tooling angle m mn-a , the computer device obtains the specific pattern C mn-a Based on the recognition result, the specific pattern C mn-a The reference center coordinates (x mn-a0 ,y mn-a0 ). The computer device obtains the specific pattern C mn-a The center coordinates (x mn-a ,y mn-a ), and the camera optical center coordinates (x 0 ,y 0 ), the computer equipment is based on the reference center coordinates (x mn-a0 ,y mn-a0 )、center coordinates(x mn-a ,y mn-a ), camera optical center coordinates (x 0 ,y 0 ), determine the straight line L formed by the reference center of the specific pattern and the optical center of the camera mn-a0 , the straight line L formed by the center of the specific pattern and the optical center of the camera mn-a , the computer equipment will straight line L mn-a0 , straight line L mn-a As a specific pattern C mn-a The computer equipment is based on the straight line L mn-a0 , straight line L mn-a , and the camera optical center, determine the specific pattern C mn-a The corresponding rotation angle.
[0075] Step S304, for the second image captured at the same tooling angle, the rotation angle corresponding to the corresponding second image is compared with the corresponding tooling angle, and the effective determination result of each specific pattern is obtained based on the comparison result.
[0076] Specifically, the computer device obtains the rotation angle corresponding to each specific pattern in the multiple second images. For the second images captured at the same tooling angle, the computer device compares the rotation angle corresponding to the corresponding second image with the corresponding tooling angle to obtain each comparison result, and obtains a valid determination result for each specific pattern based on each comparison result.
[0077] For example, the computer device obtains the rotation angle corresponding to each specific pattern in the multiple images. For the multiple second images collected at each tooling angle, the computer device compares the rotation angle corresponding to each specific pattern in the corresponding second image with the corresponding tooling angle. If, under the same tooling, the rotation angle corresponding to each specific pattern in the corresponding second image is the same as the tooling angle, then the determination result of each pattern is a valid determination result. If, under the same tooling angle, there is at least one specific pattern in the corresponding second image whose corresponding rotation angle is different from the tooling angle, then the determination result of each specific pattern in the corresponding second image is an invalid determination result.
[0078] Step S306 , determining the detection rate corresponding to each second image based on the effective determination results of each specific pattern in the plurality of second images and the number of specific patterns.
[0079] Specifically, the computer device obtains the determination results of each pattern in multiple second images at each tooling angle, as well as the number of patterns in the corresponding second images, and determines the effective determination results from the determination results of each specific pattern. Based on the effective determination results of each specific pattern in each second image at each tooling angle, the effective number corresponding to the effective determination result is determined. At each tooling angle, the computer device divides the corresponding effective number in each second image by the number of specific patterns in the corresponding second image to determine the detection rate corresponding to each second image at the tooling angle.
[0080] For example, for each second image F in each tooling angle mn , the computer device obtains the second image F mn Three specific patterns in C mn-a (respectively C mn-1 , C mn-2 , C mn-3 ) in each specific pattern, wherein the specific pattern C mn-1 , C mn-2 The computer device determines the result of the second image F as a valid determination result. mn The effective determination result in determines the effective number of specific groups corresponding to the effective determination result, that is, 2. Then, the detection rate corresponding to the second image at this tooling angle is 2 / 3.
[0081] In this embodiment, based on the recognition result of the specific pattern, the rotation angle corresponding to each specific pattern in the multiple second images is determined; for the second images captured at the same tooling angle, the rotation angle corresponding to the corresponding second image is compared with the corresponding tooling angle, and the effective judgment result of each specific pattern is obtained based on the comparison result; based on the effective judgment result of each specific pattern in the multiple second images and the number of specific patterns, the detection rate corresponding to each second image is determined. In this way, it can be determined whether the detection rate in each second image at each tooling angle is qualified, which is helpful to quantitatively check the camera focus accuracy, and then the reliability of the inspection result can be improved.
[0082] In one embodiment, if Figure 4 As shown, the computer device determines the recognition result of each specific pattern in each second image based on the recognition result of each specific pattern. If there is at least one specific pattern with an unsuccessful recognition result, the determination result of the second image corresponding to the unsuccessful recognition specific pattern is an invalid determination result; if the recognition result of each specific pattern in each second image is a successful recognition, the computer device determines the reference center coordinate information corresponding to each specific pattern based on the recognition result of each specific pattern, obtains the center coordinate information corresponding to each specific pattern in each second image, and the camera optical center position information, and determines the rotation angle corresponding to each specific pattern in the multiple second images based on the center coordinate information corresponding to each pattern in each second image and the camera optical center position information. For the second image captured at the same tooling angle, the computer device compares the rotation angle corresponding to the corresponding second image with the corresponding tooling angle to obtain various comparison results. If, under the same tooling, the rotation angle corresponding to each specific pattern in the corresponding second image is the same as the tooling angle, then the determination result of each pattern is a valid determination result. If, under the same tooling angle, there is at least one specific pattern in the corresponding second image whose corresponding rotation angle is different from the tooling angle, then the determination result of each specific pattern in the corresponding second image is an invalid determination result.
[0083] In this embodiment, based on the recognition result of the specific pattern, if at least one specific pattern has a recognition failure, the determination result of the second image corresponding to the specific pattern that failed to be recognized is an invalid determination result. If the specific pattern is successfully recognized, the rotation angle corresponding to the corresponding second image is performed. If the rotation angle corresponding to each specific pattern in the corresponding second image is the same as the tooling angle under the same tooling, the determination result of each pattern is a valid determination result. If at the same tooling angle, at least one specific pattern in the corresponding second image has a rotation angle different from the tooling angle, the determination result of each specific pattern in the corresponding second image is an invalid determination result. In this way, the rotation angle is determined only when the specific pattern is successfully recognized. By determining the determination result of each pattern through two determinations, the reliability of the subsequent determination result of whether the detection rate in each second image under each tooling angle is qualified can be further ensured, thereby facilitating the quantitative inspection of the camera focus accuracy, and thus improving the reliability of the inspection result.
[0084] In one embodiment, for each tooling angle, detection images corresponding to each tooling angle are screened out from the second image based on the pattern detection rates corresponding to each second image under the corresponding tooling angle, including: for each tooling angle, if the pattern detection rates corresponding to each second image under the corresponding tooling angle are all within the detection rate range, then the maximum detection rate among the multiple detection rates corresponding to the second image is used as the target detection rate of the corresponding second image; by comparing each target detection rate corresponding to each tooling angle with a detection rate threshold, the second image corresponding to the target detection rate greater than or equal to the detection rate threshold is used as the detection image corresponding to the tooling angle.
[0085] Specifically, for each tooling angle, the computer device obtains the pattern detection rate corresponding to each second image. If there is at least one pattern detection rate based on the second image at the corresponding tooling angle that is not within the detection rate range, the effective determination result of the second image at the corresponding tooling angle is determined to be unqualified, and the second image at the corresponding tooling angle is re-acquired; if the pattern detection rates corresponding to the second image at the corresponding tooling angle are all within the detection rate range, the effective determination result of the second image at the corresponding tooling angle is determined to be qualified. The computer device compares the multiple detection rates corresponding to the multiple second images, determines the maximum detection rate corresponding to each tooling angle, and uses the maximum detection rate as the target detection rate. The computer device compares each target detection rate corresponding to each tooling angle with the detection rate threshold, and uses the second image corresponding to the target detection rate greater than or equal to the detection rate threshold as the detection image corresponding to the tooling angle.
[0086] For example, for a tooling angle of m, 10 second images are obtained, each of which has 3 specific patterns, and the computer device obtains the detection rates corresponding to the 10 second images, and determines that the detection rate ranges from 85% to 100%. If there is at least one second image with a detection rate lower than 85%, the corresponding second image lower than 85% is re-acquired. If the detection rate of each second image is higher than 85%, the computer device determines that the effective determination results of the corresponding second images are qualified under the tooling angle of m, and compares the 10 detection rates to obtain the maximum detection rate as the target detection rate under the tooling angle, wherein the second second image corresponds to the maximum detection rate. If the target detection rate corresponding to the tooling angle of m is 99%, the computer device compares the target detection rate with the detection rate threshold of 90%, determines that the target detection rate is greater than the detection rate threshold, and uses the second second image corresponding to the target detection rate as the detection image corresponding to the tooling angle of m.
[0087] In this embodiment, for each tooling angle, if the pattern detection rates corresponding to each second image under the corresponding tooling angle are all within the detection rate range, the maximum detection rate among the multiple detection rates corresponding to the second image will be used as the target detection rate of the corresponding second image; by comparing the target detection rates corresponding to each tooling angle with the detection rate threshold, the second image corresponding to the target detection rate greater than or equal to the detection rate threshold is used as the detection image corresponding to the tooling angle. In this way, by judging the detection rate range and the detection rate threshold of the detection rate of each second image under each tooling angle, the detection images under each tooling angle that meet the detection rate qualification standard are obtained, which can further ensure the reliability of the subsequent verification of the parameter verification results, thereby facilitating the quantitative verification of the camera focus accuracy, and further improving the reliability of the verification results.
[0088] In one embodiment, if Figure 5As shown, for each tooling angle, the computer device is based on the recognition results of each specific pattern in each second image. If at least one specific pattern has a recognition failure, the determination result of the second image corresponding to the specific pattern that failed to be recognized is an invalid determination result; if the recognition result of each specific pattern in each second image is a recognition success, the computer device determines the reference center coordinate information corresponding to each specific pattern based on the recognition result of each specific pattern, and determines the rotation angle corresponding to each specific pattern in the multiple second images based on the center coordinate information and camera optical center position information corresponding to each pattern in each second image. If the rotation angle corresponding to each specific pattern in the corresponding second image is the same as the tooling angle under the same tooling, the determination result of each pattern is a valid determination result. If at least one specific pattern in the corresponding second image has a rotation angle different from the tooling angle under the same tooling angle, the determination result of each specific pattern in the corresponding second image is an invalid determination result, and each second image is reacquired. The computer device determines the pattern detection rate corresponding to each second image based on the valid determination results of each second image. If at least one pattern detection rate based on the second image at the corresponding tooling angle is not within the detection rate range, the effective determination result of the second image at the corresponding tooling angle is determined to be unqualified, and the second image at the corresponding tooling angle is reacquired; if the pattern detection rates corresponding to the second image at the corresponding tooling angle are all within the detection rate range, the effective determination result of the second image at the corresponding tooling angle is determined to be qualified. The computer device compares the multiple detection rates corresponding to the multiple second images, determines the maximum detection rate corresponding to each tooling angle, and uses the maximum detection rate as the target detection rate. The computer device compares each target detection rate corresponding to each tooling angle with the detection rate threshold, and uses the second image corresponding to the target detection rate greater than or equal to the detection rate threshold as the detection image corresponding to the tooling angle.
[0089] In this embodiment, for each tooling angle, each second image is obtained by acquiring, identifying a specific pattern to determine the effective determination result corresponding to each second image, and the detection rate corresponding to each second image is determined based on the effective determination result. If the pattern detection rates corresponding to each second image are all within the detection rate range, the maximum detection rate among the multiple detection rates corresponding to the second image is used as the target detection rate of the corresponding second image. By comparing each target detection rate with the detection rate threshold, the second image corresponding to the target detection rate greater than or equal to the detection rate threshold is used as the detection image corresponding to the tooling angle. In this way, by judging the detection rate range and detection rate threshold of the detection rate of each second image at each tooling angle, the detection images at each tooling angle that meet the detection rate qualification standard are obtained, which can further ensure the reliability of the subsequent inspection of the parameter verification results and the obtained inspection results, thereby facilitating the quantitative inspection of the camera focus accuracy, and thus improving the reliability of the inspection results.
[0090] In one embodiment, the parameter verification result includes a distance parameter verification result and an angle parameter verification result. The parameter verification result is determined based on the pattern position information of each specific pattern in the multiple detection images and the camera optical center position information, including: determining the distance parameter verification result based on the distance between the pattern position of each specific pattern in the multiple detection images and the camera optical center position; determining the angle parameter verification result based on the position angle between specific patterns with adjacent positional relationships in each detection image.
[0091] Specifically, the computer device obtains the pattern position of each specific pattern in the multiple detection images and the camera optical center position, and determines the distance parameter verification result according to the distance between the pattern position of each specific pattern in the multiple detection images and the camera optical center position. The computer device determines the specific patterns with adjacent positional relationships in each detection image based on the pattern position of each specific pattern in the multiple detection images, and determines the angle parameter verification result based on the position angle between the specific patterns with adjacent positional relationships in each detection image.
[0092] For example, the computer obtains six detection images corresponding to tooling angles of 60 degrees, 120 degrees, 180 degrees, 240 degrees, 300 degrees, and 360 degrees, respectively. For each detection image, the computer device obtains the center coordinates of three specific patterns in the detection image and the coordinates of the camera optical center. The computer device determines the distance between each specific pattern and the camera optical center based on the center coordinates of the three specific patterns in the detection image and the coordinates of the camera optical center. The computer device determines the distance parameter verification result based on the distance corresponding to each specific pattern in the six detection images. The computer device obtains the distance parameter verification result based on the distance corresponding to each specific pattern in each detection image. mn-1 , C mn-2 , C mn-3The subscripts in the image determine the adjacent position relationship of two specific patterns, where the subscript a represents the order of the patterns from left to right on the image, i.e., C mn-1 is the leftmost specific pattern in the second image, C mn-2 is the specific pattern in the middle of the second image, C mn-3 The computer device determines the angle parameter verification result based on the position angle between the specific patterns with adjacent position relationship in the 6 detection images.
[0093] In this embodiment, the distance parameter verification result is determined based on the distance between the pattern position of each specific pattern in the multiple detection images and the camera optical center position; the angle parameter verification result is determined based on the position angle between the specific patterns with adjacent positional relationship in each detection image. Therefore, for each detection image obtained when both the camera clarity verification and the pattern detection rate are qualified, the distance parameter verification result and the angle parameter verification result are respectively obtained, thereby obtaining the parameter verification result, and further improving the reliability of the inspection result.
[0094] In one embodiment, the distance parameter verification result is determined based on the distance between the pattern position of each specific pattern in the multiple detection images and the optical center position of the camera, including: determining the distance between the pattern position of each specific pattern in the multiple detection images and the optical center position of the camera; if the distances corresponding to each specific pattern in the multiple detection images all meet the distance error condition, then the distance parameter verification result is determined to be qualified; if there is at least one distance in the multiple detection images corresponding to each specific pattern that does not meet the distance error condition, then the distance parameter verification result is determined to be unqualified.
[0095] Specifically, the computer device obtains the pattern position of each specific pattern in the multiple detection images and the camera optical center position, and determines the distance between the pattern position of each specific pattern in the multiple detection images and the camera optical center position based on each pattern position and the camera optical center position. The computer device obtains a distance threshold range, and determines a distance error condition based on the distance threshold range. If the distances corresponding to each specific pattern in the multiple detection images are within the distance threshold range, the distance error condition is satisfied, and the computer device determines that the distance parameter verification result is qualified. If at least one distance corresponding to each specific pattern in the multiple detection images is not within the distance threshold range, the distance error condition is not satisfied, and the computer device determines that the distance parameter verification result is unqualified.
[0096] For example, the computer obtains six detection images corresponding to tooling angles of 60 degrees, 120 degrees, 180 degrees, 240 degrees, 300 degrees, and 360 degrees, respectively. For each detection image, the computer device obtains the center coordinates of three specific patterns in the detection image and the coordinates of the camera optical center. The computer device determines the distance between each specific pattern and the camera optical center based on the center coordinates of the three specific patterns in the detection image and the coordinates of the camera optical center, that is, L mn-a (The tooling angle is the distance between the ath specific pattern in the nth second image in m and the optical center of the camera). The computer device obtains the distance threshold ΔL. If each distance L mn-a If all of the distances are within the range of the distance threshold ΔL, it is determined that the distance error condition is met, and the computer device determines that the distance parameter verification result is qualified; if at least one distance is not within the distance threshold range, the distance error condition is not met, and the computer device determines that the distance parameter verification result is unqualified.
[0097] In this embodiment, the distances between the pattern positions of each specific pattern in a plurality of the detection images and the position of the camera optical center are determined; if the distances corresponding to each specific pattern in the plurality of the detection images all satisfy the distance error condition, the distance parameter verification result is determined to be qualified; if there is at least one distance in the plurality of the detection images corresponding to each specific pattern that does not satisfy the distance error condition, the distance parameter verification result is determined to be unqualified. Therefore, for each detection image obtained based on the condition that both the camera clarity verification and the pattern detection rate are qualified, the distance parameter verification is performed separately to obtain the distance parameter verification result, which is helpful to judge the parameter verification result, and further helps to improve the reliability of the inspection result.
[0098] In one embodiment, before determining the angle parameter verification result based on the position angle between specific patterns with adjacent positional relationships in each detection image, it also includes: for each detection image, determining the straight lines formed by the pattern position of each specific pattern in the corresponding detection image and the camera optical center position; using the camera optical center position as the vertex of the position angle, and using the straight lines formed by two adjacent patterns in the same detection image and the camera optical center as the two sides of the position angle; determining the position angle between specific patterns with adjacent positional relationships in each detection image based on the two sides and the vertex.
[0099] Specifically, for each detection image, the computer device obtains the center coordinates of each specific pattern in the corresponding detection image and the coordinates of the camera optical center, and determines the straight lines formed by each specific pattern in the corresponding detection image and the camera optical center based on the center coordinates and the coordinates of the optical center of each specific pattern. The computer device determines two specific patterns in each adjacent positional relationship based on each specific pattern in the corresponding detection image. The computer device uses the optical center coordinates of the camera optical center as the vertex of the position angle, and uses the straight lines formed by two adjacent patterns in the same detection image and the camera optical center as the two sides of the position angle, and determines the position angle between the specific patterns with adjacent positional relationships in each detection image based on the two sides and the vertex.
[0100] For example, for the nth second image with tooling angle m, there are three specific patterns, namely C mn-1 , C mn-2 , C mn-3 , the computer device obtains the center coordinates of each specific pattern, namely C mn-1 is (x mn-1 ,y mn-1 ), C mn-2 is (x mn-2 ,y mn-2 ), C mn-3 is (x mn-3 ,y mn-3 ), and obtain the camera optical center coordinates (x 0 ,y 0 ). The computer device determines each straight line L formed by the center coordinates of the specific pattern and the camera optical center based on the center coordinates of each specific pattern and the camera optical center coordinates. mn-1 , L mn-2 , L mn-3 , where L mn-1 For a specific pattern C mn-1 The corresponding straight line, L mn-2 For a specific pattern C mn-2 The corresponding straight line, L mn-3 For a specific pattern C mn-3 The computer device uses the optical center coordinates of the camera optical center as the vertex of the position angle, and uses the straight lines formed by two adjacent patterns in the same detection image and the camera optical center as the two sides of the position angle, and determines the position angle between specific patterns with adjacent positional relationships in each detection image based on the two sides and the vertex, that is, based on the straight line L mn-1 , straight line L mn-2 , and the vertex optical center coordinates (x 0 ,y 0 ) Determine the position angle 1 based on the straight line L mn-2 , straight line L mn-3, and the vertex optical center coordinates (x 0 ,y 0 )Determine the position angle 2.
[0101] In this embodiment, for each detection image, the straight lines formed by the pattern positions of each specific pattern in the corresponding detection image and the camera optical center position are determined; the camera optical center position is used as the vertex of the position angle, and the straight lines formed by two adjacent patterns in the same detection image and the camera optical center are used as the two sides of the position angle; based on the two sides and the vertex, the position angle between specific patterns with adjacent positional relationships in each detection image is determined. In this way, the angle parameter verification result can be determined based on the acquired position angle, and then the parameter verification result can be judged, which helps to improve the reliability of the inspection result.
[0102] In one embodiment, the angle parameter verification result is determined based on the position angles between specific patterns with adjacent positional relationships in each detection image, including: determining the position angles of characteristic patterns with adjacent positional relationships in each detection image; if the position angles of characteristic patterns with adjacent positional relationships in each detection image all meet the angle error condition, then determining that the angle parameter verification result is qualified; if at least one position angle of characteristic patterns with adjacent positional relationships in multiple detection images does not meet the angle error condition, then determining that the angle parameter verification result is unqualified.
[0103] Specifically, the computer device obtains the position angle of each detection image, and obtains the angle threshold range, and determines the angle error condition based on the angle threshold range. If the position angles of the feature patterns with adjacent positional relationships in each detection image are within the angle threshold range, the angle error condition is met, and the computer device determines that the angle verification result is qualified. If the position angles of the feature patterns with adjacent positional relationships in multiple detection images exist within the angle threshold range of at least one position angle step, the angle error condition is not met, and the computer device determines that the angle parameter verification result is unqualified.
[0104] For example, for the detection image corresponding to the tooling angle m, the computer device obtains the image based on the straight line L mn-1 , straight line L mn-2 , and the vertex optical center coordinates (x 0 ,y 0 ) Determine the position angle 1 based on the straight line L mn-2 , straight line L mn-3 , and the vertex optical center coordinates (x 0 ,y 0) Determine the position angle 2. The computer device obtains the angle threshold range Δα. If the position angles in the detection image corresponding to each tooling angle are all within the angle threshold range, it is determined that the angle error condition is met, and the computer device determines that the angle parameter verification result is qualified. If there is at least one position angle that is not within the angle threshold range, the angle error condition is not met, and the computer device determines that the angle parameter verification result is unqualified.
[0105] In this embodiment, the position angles of feature patterns with adjacent positional relationships in each detection image are determined; if the position angles of feature patterns with adjacent positional relationships in each detection image all meet the angle error condition, then the angle parameter verification result is determined to be qualified; if there is at least one position angle of feature patterns with adjacent positional relationships in multiple detection images that does not meet the angle error condition, then the angle parameter verification result is determined to be unqualified. In this way, the parameter verification result can be judged based on the angle parameter verification result, which helps to improve the reliability of the inspection result.
[0106] In one embodiment, if Figure 6As shown, the computer device obtains the pattern position of each specific pattern in multiple detection images and the camera optical center position, and determines the distance between the pattern position of each specific pattern in the multiple detection images and the camera optical center position based on each pattern position and the camera optical center position, and the computer device obtains the distance threshold range, and determines the distance error condition based on the distance threshold range. If there is at least one distance that is not within the distance threshold range among the distances corresponding to each specific pattern in the multiple detection images, the distance error condition is not satisfied, and the computer device determines that the distance parameter verification result is unqualified, and the computer device determines that the parameter verification result is unqualified, and if the distances corresponding to each specific pattern in the multiple detection images are within the distance threshold range, the distance error condition is satisfied, and the computer device determines that the distance parameter verification result is qualified, then the computer device obtains the center coordinates of each specific pattern in the corresponding detection image and the camera optical center coordinates, and determines each straight line formed by each specific pattern in the corresponding detection image and the camera optical center based on the center coordinates and the optical center coordinates of each specific pattern. The computer device determines two specific patterns of each adjacent positional relationship based on each specific pattern in the corresponding detection image. The computer device uses the optical center coordinates of the camera optical center as the vertex of the position angle, and uses the straight lines formed by the two adjacent patterns in the same detection image and the camera optical center as the two sides of the position angle, and determines the position angle between the specific patterns with adjacent positional relationships in each detection image based on the two sides and the vertex. The computer device obtains the position angle of each detection image, and obtains the angle threshold range, and determines the angle error condition based on the angle threshold range. If the position angle of the characteristic patterns with adjacent positional relationships in multiple detection images exists in at least one position angle step angle threshold range, the angle error condition is not met, the computer device determines that the angle parameter verification result is unqualified, and then the parameter verification result is judged to be unqualified. If the position angles of the characteristic patterns with adjacent positional relationships in each detection image are all within the angle threshold range, the angle error condition is met, the computer device determines that the angle verification result is qualified, and then the computer device judges that the parameter verification result is qualified.
[0107] In this embodiment, the distance from each specific pattern in each detection image to the optical center of the camera is used to determine whether each distance satisfies the distance error condition. If there is a distance that does not satisfy the condition, the parameter verification result is determined to be unqualified. If all distances satisfy the condition, the position angle of each detection image is further determined, and it is determined whether each position angle satisfies the angle error condition. If there is a position angle that does not satisfy the condition, the angle verification result is determined to be unqualified, and then the parameter verification result is determined to be unqualified. If all position angles satisfy the condition, the angle verification result is determined to be qualified, and then the parameter verification result is determined to be qualified. In this way, the inspection result is determined based on the parameter verification result, which can further improve the reliability of the inspection result.
[0108] In order to facilitate a clearer understanding of the technical solution of the present application, a more detailed embodiment is provided for description. Figure 7 As shown, in order to check the focusing accuracy of the fisheye camera, the fisheye camera is placed on the tooling, and the fisheye camera is connected to the computer. The computer device obtains multiple first images corresponding to the number of rotations of the first lens, and obtains the clarity corresponding to each first image based on each first image. The computer device compares each clarity based on the clarity of each first image, determines the maximum clarity, and obtains the clarity error. The computer device determines the clarity threshold based on the maximum clarity and the clarity error. The computer device obtains multiple verification first images corresponding to the number of rotations of the second lens, and obtains the verification clarity corresponding to each verification first image based on each verification first image. When there is a verification clarity less than the clarity threshold, it is determined that the clarity verification fails, and the first image is re-acquired. When each verification clarity is greater than or equal to the clarity threshold, it is determined that the clarity verification passes.
[0109] If the clarity check passes, the computer device sets the parameters of the detection process such as the step angle of the tooling rotation, the preset pattern information corresponding to the specific pattern, and the number of specific patterns, and obtains multiple second images collected by the camera at different tooling angles. The computer device obtains the preset pattern information corresponding to each specific pattern of the second image, and the computer device obtains the pattern information corresponding to each specific pattern in each second image. For each specific pattern in each second image, the computer device identifies the pattern information corresponding to the specific pattern with the corresponding preset pattern information to obtain a recognition result. If the recognition result of each specific pattern in each second image is successful, the computer device determines the reference center coordinate information corresponding to each specific pattern based on each specific pattern whose recognition result is successful. The computer device obtains the center coordinate information corresponding to each specific pattern in each second image, and the camera optical center position information. The computer device determines the rotation angle corresponding to each specific pattern in the multiple second images based on the center coordinate information corresponding to each pattern in each second image and the camera optical center position information. For the second image captured at the same tooling angle, the computer device compares the rotation angle corresponding to the corresponding second image with the corresponding tooling angle, obtains each comparison result, and obtains the effective determination result of each specific pattern based on each comparison result. The computer device obtains the number of patterns in the corresponding second image, and determines the effective determination result from the determination results of each specific pattern. Based on the effective determination results of each specific pattern in each second image at each tooling angle, the effective number corresponding to the effective determination result is determined. At each tooling angle, the computer device divides the corresponding effective number in each second image by the number of specific patterns in the corresponding second image to determine the detection rate corresponding to each second image at the tooling angle. For each tooling angle, the computer device obtains the pattern detection rate corresponding to each second image. If there is at least one pattern detection rate based on the second image at the corresponding tooling angle that is not within the detection rate range, the effective determination result of the second image at the corresponding tooling angle is determined to be unqualified, and the second image at the corresponding tooling angle is re-acquired; if the pattern detection rates corresponding to the second image at the corresponding tooling angle are all within the detection rate range, the effective determination result of the second image at the corresponding tooling angle is determined to be qualified.
[0110] The computer device compares the multiple detection rates corresponding to the multiple second images, determines the maximum detection rate corresponding to each tooling angle, and uses the maximum detection rate as the target detection rate. The computer device compares the target detection rates corresponding to each tooling angle with the detection rate threshold, and uses the second image corresponding to the target detection rate greater than or equal to the detection rate threshold as the detection image corresponding to the tooling angle. The computer device obtains the pattern position of each specific pattern in the multiple detection images and the camera optical center position, and determines the distance between the pattern position of each specific pattern in the multiple detection images and the camera optical center position based on each pattern position and the camera optical center position. The computer device obtains the distance threshold range, and determines the distance error condition based on the distance threshold range. If the distances corresponding to each specific pattern in the multiple detection images are within the distance threshold range, the distance error condition is met, and the computer device determines that the distance parameter verification result is qualified. If there is at least one distance that is not within the distance threshold range between the distances corresponding to each specific pattern in the multiple detection images, the distance error condition is not met, and the computer device determines that the distance parameter verification result is unqualified. For each detection image, the computer device obtains the center coordinates of each specific pattern in the corresponding detection image and the coordinates of the camera optical center, and determines each straight line formed by each specific pattern in the corresponding detection image and the camera optical center based on the center coordinates and the coordinates of the optical center of each specific pattern. The computer device determines two specific patterns in each adjacent positional relationship based on each specific pattern in the corresponding detection image. The computer device uses the optical center coordinates of the camera optical center as the vertex of the position angle, and uses the straight lines formed by two adjacent patterns in the same detection image and the camera optical center as the two sides of the position angle, and determines the position angle between specific patterns with adjacent positional relationships in each detection image based on the two sides and the vertex. The computer device obtains the position angle of each detection image, and obtains the angle threshold range, and determines the angle error condition based on the angle threshold range. If the position angle of the feature patterns with adjacent positional relationships in multiple detection images exists in at least one position angle step angle threshold range, the angle error condition is not satisfied, and the computer device determines that the angle parameter verification result is unqualified, then the computer device judges that the parameter verification result is unqualified, and determines that the focus accuracy inspection result of the fisheye camera is unqualified based on the parameter verification result. If the position angle of the feature patterns with adjacent positional relationships in each detection image is within the angle threshold range, the angle error condition is satisfied, and the computer device determines that the angle verification result is qualified, then the computer device judges that the parameter verification result is qualified, and determines that the focus accuracy inspection result of the fisheye camera is qualified based on the parameter verification result.
[0111] In this embodiment, by verifying the clarity of the fisheye camera, when each verified clarity is greater than or equal to the clarity threshold, it is determined that the clarity verification has passed, and then the pattern detection rate is verified, that is, by identifying the specific pattern in each second image at each tooling angle, when the recognition result is successful, the rotation angles corresponding to each specific pattern are compared, and the effective judgment result of each pattern is obtained based on the comparison result, and the detection rate corresponding to each second image is determined based on the effective judgment result, and whether each second image at each tooling angle is effectively judged to be qualified is determined based on the detection rate. If there is If the result is qualified, then the detection images corresponding to each tooling angle are screened out from the second image based on the detection rate, and the process of verifying the parameters is performed based on the detection images, that is, the distance parameter verification result is determined according to the distance between the pattern position of each specific pattern in the multiple detection images and the camera optical center position. If the distance parameter verification result is qualified, the angle parameter verification result is determined based on the position angle between the specific patterns with adjacent positional relationship in each detection image. If the angle parameter verification result is qualified, the parameter verification result is qualified, and then the diagonal accuracy inspection result of the fisheye camera is determined to be qualified. In this way, based on the quantitative inspection indicators of camera clarity verification, pattern detection rate, and parameter verification results, quantitative inspection of camera focus accuracy is achieved, thereby improving the reliability of the inspection results.
[0112] It should be understood that although Figures 2 to 7 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figures 2 to 7 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0113] In one embodiment, Figure 8 As shown, a device for checking the focus accuracy of a camera is provided, comprising: a first acquisition module 802, a second acquisition module 804, a first determination module 806, a screening module 808, a second determination module 810 and a third determination module 812, wherein:
[0114] The first acquisition module 802 is used to acquire first images acquired by the camera at different lens rotation angles and determine the clarity of each acquired first image.
[0115] The second acquisition module 804 is used to perform clarity verification on the camera based on the clarity of each first image, and if the clarity verification passes, obtain multiple second images respectively captured by the camera at different tooling angles.
[0116] The first determination module 806 is configured to identify specific patterns in the plurality of second images respectively based on the preset pattern information, and determine a pattern detection rate corresponding to each second image respectively based on the identification result.
[0117] The screening module 808 is used to screen out detection images corresponding to each tooling angle from the second image based on the pattern detection rates corresponding to each second image at the corresponding tooling angle for each tooling angle.
[0118] The second determination module 810 is used to determine the parameter verification result according to the pattern position information of each specific pattern in the multiple detection images and the camera optical center position information; the parameter includes at least one of a distance parameter and an angle parameter.
[0119] The third determination module 812 is used to determine the focus accuracy inspection result of the camera according to the parameter verification result.
[0120] In one embodiment, the second acquisition module 804 is used to determine a clarity threshold based on the clarity of each first image; obtain multiple verification first images captured by the camera at different second lens rotation angles; if the verification clarity corresponding to each verification first image is greater than or equal to the clarity threshold, it is determined that the camera has passed the clarity verification.
[0121] In one embodiment, the first determination module 806 is used to determine the rotation angle corresponding to each specific pattern in the multiple second images based on the recognition result of the specific pattern; for the second images captured at the same tooling angle, the rotation angle corresponding to the corresponding second image is compared with the corresponding tooling angle, and the validity determination result of each specific pattern is obtained based on the comparison result; based on the validity determination result of each pattern in the multiple second images and the number of patterns, the detection rate corresponding to each second image is determined.
[0122] In one embodiment, the screening module 808 is used to, for each tooling angle, if the pattern detection rates corresponding to the second images at the corresponding tooling angle are all within the detection rate range, then the maximum detection rate among the multiple detection rates corresponding to the second image is used as the target detection rate of the corresponding second image; by comparing the target detection rates corresponding to the various tooling angles with the detection rate threshold, the second image corresponding to the target detection rate greater than or equal to the detection rate threshold is used as the detection image corresponding to the tooling angle.
[0123] In one embodiment, the second determination module 810 is used to determine the distance parameter verification result based on the distance between the pattern position of each specific pattern in the multiple detection images and the camera optical center position; and determine the angle parameter verification result based on the position angle between the specific patterns with adjacent positional relationships in each detection image.
[0124] In one embodiment, the second determination module 810 is used to determine the distance between the pattern position of each specific pattern in the multiple detection images and the camera optical center position; if the distances corresponding to each specific pattern in the multiple detection images all meet the distance error condition, then the distance parameter verification result is determined to be qualified; if there is at least one distance in the multiple detection images corresponding to each specific pattern that does not meet the distance error condition, then the distance parameter verification result is determined to be unqualified.
[0125] In one embodiment, the second determination module 810 is also used to determine, for each detection image, the straight lines formed by the pattern positions of each specific pattern in the corresponding detection image and the camera optical center position; using the camera optical center position as the vertex of the position angle, and using the straight lines formed by two adjacent patterns in the same detection image and the camera optical center as the two sides of the position angle; and determining the position angle between specific patterns having adjacent positional relationships in each detection image based on the two sides and the vertex.
[0126] In one embodiment, the second determination module 810 is used to determine the position angles of feature patterns with adjacent positional relationships in each detection image; if the position angles of feature patterns with adjacent positional relationships in each detection image all meet the angle error condition, then the angle parameter verification result is determined to be qualified; if at least one position angle of feature patterns with adjacent positional relationships in multiple detection images does not meet the angle error condition, then the angle parameter verification result is determined to be unqualified.
[0127] For the specific definition of the device for checking the camera focus accuracy, please refer to the definition of the method for checking the camera focus accuracy in the above text, which will not be repeated here. Each module in the above-mentioned device for checking the camera focus accuracy can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0128] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig. 9As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the inspection data of the camera focus accuracy. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for inspecting the focus accuracy of a camera is implemented.
[0129] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0130] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0131] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0132] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0133] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0134] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for checking the focusing accuracy of a camera, characterized in that: The method comprises: Acquire first images captured by the camera at different first lens rotation angles, and determine the clarity of each captured first image; Performing a clarity check on the camera based on the clarity of each first image, and if the clarity check passes, obtaining a plurality of second images respectively captured by the camera at different tooling angles; Recognize specific patterns on the plurality of second images respectively based on the preset pattern information, and determine the pattern detection rate corresponding to each second image respectively based on the recognition result; For each tooling angle, based on the pattern detection rates corresponding to the second images at the corresponding tooling angle, the detection images corresponding to the respective tooling angles are screened out from the second images; Determine a parameter verification result according to the pattern position information of each specific pattern in the plurality of detection images and the camera optical center position information; the parameter includes at least one of a distance parameter and an angle parameter; According to the parameter verification result, the focus accuracy verification result of the camera is determined.
2. The method according to claim 1, characterized in that The performing clarity check on the camera based on the clarity of each first image includes: Determining a clarity threshold based on the clarity of each of the first images; Acquire a plurality of verification first images captured by the camera at different second lens rotation angles; If the verification clarity corresponding to each verification first image is greater than or equal to the clarity threshold, it is determined that the camera passes the clarity verification.
3. The method according to claim 1, characterized in that The determining, based on the recognition result, the pattern detection rate corresponding to each second image, comprises: Based on the recognition result of the specific pattern, determining the rotation angle corresponding to each specific pattern in the plurality of second images; For the second image captured at the same tooling angle, the rotation angle corresponding to the corresponding second image is compared with the corresponding tooling angle, and the effective determination result of each specific pattern is obtained based on the comparison result; The detection rate corresponding to each second image is determined based on the effective determination results of each specific pattern in the plurality of second images and the number of specific patterns.
4. The method according to claim 1, characterized in that: For each tooling angle, based on the pattern detection rates corresponding to each second image at the corresponding tooling angle, the detection images corresponding to each tooling angle are screened out from the second images, including: For each tooling angle, if the pattern detection rates corresponding to each second image at the corresponding tooling angle are all within the detection rate range, the maximum detection rate among the multiple detection rates corresponding to the second image is used as the target detection rate of the corresponding second image; By comparing the target detection rates corresponding to the tooling angles with the detection rate thresholds, the second image corresponding to the target detection rate greater than or equal to the detection rate threshold is used as the detection image corresponding to the tooling angle.
5. The method according to claim 1, characterized in that The parameter verification result includes a distance parameter verification result and an angle parameter verification result. The parameter verification result is determined according to the pattern position information of each specific pattern in the plurality of detection images and the camera optical center position information, including: Determine the distance parameter verification result according to the distance between the pattern position of each specific pattern in the plurality of detection images and the position of the camera optical center; Based on the position angles between specific patterns having adjacent positional relationships in each detection image, the angle parameter verification result is determined.
6. The method according to claim 5, characterized in that The step of determining the distance parameter verification result according to the distance between the pattern position of each specific pattern in the plurality of detection images and the position of the optical center of the camera comprises: Determine the distance between the pattern position of each specific pattern in the plurality of detection images and the position of the optical center of the camera; If the distances corresponding to the specific patterns in the plurality of detection images all satisfy the distance error condition, then determining that the distance parameter verification result is qualified; If at least one of the distances corresponding to the specific patterns in the plurality of detection images does not satisfy the distance error condition, it is determined that the distance parameter verification result is unqualified.
7. The method according to claim 5, characterized in that Before determining the angle parameter verification result based on the position angle between specific patterns having adjacent positional relationships in each detection image, the method further includes: For each detection image, determine the straight lines formed by the pattern position of each specific pattern in the corresponding detection image and the position of the optical center of the camera; The position of the camera optical center is taken as the vertex of the position angle, and the straight lines formed by two adjacent patterns in the same detection image and the camera optical center are taken as the two sides of the position angle; The position angles between specific patterns having adjacent positional relationships in each detection image are determined based on the two edges and the vertices.
8. The method according to claim 5, characterized in that The method of determining the angle parameter verification result based on the position angle between specific patterns having adjacent positional relationships in each detection image includes: Determine the position angle of the feature patterns having adjacent position relationship in each detection image; If the position angles of the feature patterns with adjacent positional relationships in each detection image all meet the angle error condition, then the angle parameter verification result is determined to be qualified; If at least one of the position angles of the feature patterns having adjacent positional relationships in the plurality of detection images does not satisfy the angle error condition, it is determined that the angle parameter verification result is unqualified.
9. A device for checking the focusing accuracy of a camera, characterized in that: The device comprises: A first acquisition module is used to acquire first images acquired by the camera at different lens rotation angles, and determine the clarity of each acquired first image; A second acquisition module is used to perform a clarity check on the camera based on the clarity of each first image, and if the clarity check passes, obtain a plurality of second images respectively captured by the camera at different tooling angles; A first determination module, configured to identify specific patterns in each of the plurality of second images based on preset pattern information, and determine a pattern detection rate corresponding to each second image based on the recognition result; A screening module, for screening, for each tooling angle, detection images corresponding to each tooling angle from the second images based on the pattern detection rates corresponding to each second image at the corresponding tooling angle; A second determination module is used to determine a parameter verification result according to the pattern position information of each specific pattern in the plurality of detection images and the camera optical center position information; the parameter includes at least one of a distance parameter and an angle parameter; The third determination module is used to determine the focus accuracy inspection result of the camera according to the parameter verification result.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Camera configuration method and device
CN108234900A
Imaging quality detection method and device, electronic equipment and readable storage medium
CN111031311A