A method for evaluating the quality of calibrated images
By combining point sharpness and non-local gradient image evaluation methods, the problem of insufficient attention to overall and detailed quality in the image calibration process in machine vision systems is solved, the accuracy of calibration feature point extraction is improved, and automated and robust image quality is achieved. evaluation, improving the calibration accuracy of the vision system.
Patent Information
- Application Number
- CN202311794482.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2043-12-25
AI Technical Summary
In the image calibration process of the machine vision system, it is difficult to pay attention to the overall image quality and detail quality at the same time in the existing technology, resulting in insufficient calibration feature point extraction accuracy and a lack of automated and robust image quality evaluation methods.
Using a calibration image quality evaluation method, through point sharpness algorithm and non-local gradient image evaluation, combined with Gaussian kernel convolution and non-maximum suppression algorithm, the overall and detailed quality of the image is calculated, the calibration feature points are extracted, and the calibration is realized Accurate assessment of image quality.
It improves the extraction accuracy of calibration feature points in the image, improves the calibration accuracy of the visual system, realizes automated and robust image quality evaluation, eliminates the influence of individual factors, and meets the calibration requirements of 0.05mm and above.
Smart Images

Figure CN117853429B
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of machine vision, and in particular to a calibration image quality evaluation method. Background Art
[0002] With the development of computer vision, artificial intelligence, robotics and other related technologies, machine vision systems are being used more and more widely in various industrial scenarios, which can greatly improve the flexibility and automation of industrial production lines. At present, machine vision systems can mainly realize four major functions: recognition, measurement, positioning and detection. When measuring and positioning, it is necessary to calibrate the optical model of the image acquisition system composed of industrial cameras and lenses. The calibration accuracy of the optical model directly affects the measurement and positioning accuracy of the system.
[0003] The calibration of machine vision systems can be divided into single-target calibration, dual-target calibration, multi-target calibration, and hand-eye calibration of robots and vision systems. The above calibrations are mainly for calibrating the internal and external parameters of the camera in the system as well as the external parameters of the camera and other modules in the system.
[0004] At present, the common calibration methods are all based on Zhang's calibration method, which mainly realizes calibration by visual system identifying calibration feature points on the checkerboard calibration board. The accuracy of visual system in extracting calibration feature points is the basis for achieving high-precision calibration, so obtaining high-quality calibration images is crucial to achieve high-precision calibration.
[0005] At present, image evaluation methods can be divided into two categories: subjective evaluation and objective evaluation. Subjective evaluation methods are based on human subjective evaluation and are easily affected by individual factors of the observer, making them difficult to apply in actual production. Objective evaluation methods that eliminate individual factors are the mainstream direction of current research. According to whether there is a real image as a reference in the evaluation process, it can be divided into three image evaluation algorithms: full reference, partial reference, and no reference. No reference lacks reference in the quality evaluation process, and it is difficult to accurately and robustly obtain the quality of details. The full reference evaluation method actually compares the similarity between the image to be evaluated and the reference image, but this method focuses on evaluating the quality of the overall image. Due to the influence of the background factors of the image to be evaluated, this method is difficult to pay attention to the details at the corners of the chessboard. At the same time, the camera needs to change its posture during the calibration process, so the position of the chessboard image in the image to be evaluated is different, which makes it difficult to obtain a high-quality reference image. Summary of the invention
[0006] The technical problem to be solved by the present invention is to provide a calibration image quality evaluation method in view of the deficiencies of the above-mentioned prior art. The calibration image quality evaluation method can pay attention to both the overall image quality and the detail quality of the image, greatly improving the extraction accuracy of calibration feature points in the image, thereby being able to accurately evaluate the quality of the calibration image.
[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0008] A calibration image quality evaluation method includes the following steps.
[0009] Step 1, obtain the image T to be evaluated: use camera A to shoot the calibration plate reference image R at a set position to obtain the image T to be evaluated; wherein the calibration plate reference image R has m calibration feature points; the image T to be evaluated contains all the calibration feature points in the calibration plate reference image R.
[0010] Step 2: Overall quality judgment of the image T to be evaluated: Use the point sharpness algorithm to evaluate the overall clarity of the image T to be evaluated; when the point sharpness p of the image T to be evaluated is not less than the minimum point sharpness threshold p min , go to step 2; otherwise, determine that the quality score of the image to be evaluated T is G=0.
[0011] Step 3: Extract calibration feature points: Extract the pixel values of all calibration feature points in the calibration plate reference image R and the image to be evaluated T respectively, so as to obtain the calibration feature point set P R and P T ;
[0012] Step 4: non-local gradient image evaluation, specifically including the following steps:
[0013] Step 4-1: Construct non-local gradient: for the calibration feature point set P R and P T The i-th calibrated feature point in constructs the non-local gradient μ R (i) and μ T (i); where 1≤i≤m.
[0014] Step 4-2: Calculate the non-local gradient μ R (i) specifically:
[0015] A. Constructing the square domain Ω: Calibrate the feature point set P R The i-th calibrated feature point in Build with The center of the square area Ω is Ω, and each side of the square area Ω has (2t+1) pixels.
[0016] B. Calculation deviation NG R (j): Let the pixel value of the jth pixel in the area Ω be r j , then NG R The calculation formula of (j) is:
[0017]
[0018] C. Calculate μ R (i): By calculating all NG R (j), and thus μ R (i).
[0019] Step 4-3: Calculate the non-local gradient μ T (i) Using the method in step 4-2, we can obtain the calibration feature point set P. T The deviation NG corresponding to the i-th calibration feature point T (j) and the non-local gradient μ T (i).
[0020] Step 4-4, calculate the average change degree similarity S 1 (i): According to μ R (i) and μ T (i) Calculated, the specific calculation formula is:
[0021]
[0022] Where λ is an arbitrary constant greater than zero.
[0023] Step 4-5: Calculate the structural similarity S 2 (i), the specific calculation formula is:
[0024]
[0025] In the formula, NG R The variance of (j), NG T The variance of (j), σ R,T (i) is NG R (j) and NG T (j) The covariance of
[0026] Step 4-6: Calculate the quality score G of the image T to be evaluated. The specific calculation formula is:
[0027]
[0028] In the formula, 0≤G≤1.
[0029] In step 4-2, the value range of t involved in the square field Ω is 20≤t≤100, which is specifically determined according to the proportion K of the calibration plate reference image R in the image to be evaluated T; when the K value is larger, the t value is also larger.
[0030] In step 1, the calibration plate reference image R is a black and white checkerboard; the calibration feature points are the corner points of the black and white checkerboard.
[0031] In step 2, the calculation formula of point sharpness p is:
[0032]
[0033] Where m and n represent the length and width of the image T to be evaluated, respectively.
[0034] df represents the change amplitude of the grayscale of the image T to be evaluated.
[0035] dx represents the distance increment between pixels.
[0036] Point sharpness p represents the diffusion degree of the gray value of each pixel in the image. The larger the p value, the greater the diffusion degree, and the clearer the image T to be evaluated is.
[0037] In step 3, the feature point set P is calibrated T The method for obtaining comprises the following steps.
[0038] Step 3-1, calculate the similarity c: use Gaussian kernel to perform convolution and calculate the similarity c between each pixel in the image to be evaluated T and the calibrated feature point.
[0039] Step 3-2, c value screening: Screen the c value in step 3-1 to obtain the calibration feature point set P T The calibration feature point set is recorded as
[0040] In step 3-1, there are four types of Gaussian kernels, namely convolution kernel A, convolution kernel B, convolution kernel C and convolution kernel D.
[0041] In step 3-1, the calculation formula of similarity c is:
[0042]
[0043] in:
[0044]
[0045]
[0046]
[0047]
[0048]
[0049]
[0050] In the formula, It is the similarity between the current pixel and the calibration plate reference image R when there is no tilt and the calibrated feature point is convolved by convolution kernels A and B.
[0051] It is the similarity between the current pixel and the calibration feature point after convolution with convolution kernels A and B when the reference image R of the calibration plate is tilted.
[0052] It is the similarity between the current pixel and the calibration feature point after convolution with convolution kernels C and D when there is no tilt between them.
[0053] It is the similarity between the current pixel and the calibration feature point after convolution with convolution kernels C and D when the reference image R of the calibration plate is tilted. They are obtained by convolving the image to be evaluated T with the n×n Gaussian kernel, and they respectively represent the convolution response values of the four convolution kernels A, B, C and D when the reference image R of the calibration plate is not tilted.
[0054] They are obtained by convolving the image to be evaluated T with the n×n Gaussian kernel, and they respectively represent the convolution response values of the four convolution kernels A, B, C and D when the reference image R of the calibration plate is tilted.
[0055] μ 1 for The mean of .
[0056] μ 2 for The mean of .
[0057] In step 3-2, the c value in step 3-1 is screened using a non-maximum suppression algorithm.
[0058] When G≥0.9, it can meet the image calibration requirements of 0.05mm and above.
[0059] In step 4-1, m μ R (i), together constitute μ R ; m μ T (i), together constitute μ T ; then μ R and μ T The specific expression is:
[0060] μ R ={μ R (1) μ R (2), ..., μ R (i)…, μ R (m)}
[0061] μ T ={μ T (1) μT (2), ..., μ T (i)…, μ T (m)}
[0062] In the formula, μ R (1) μ R (2), ..., μ R (i)…, μ R (m) are the non-local gradients of the first, second, i-th and m-th calibration feature points in the calibration plate reference image R, respectively.
[0063] μ T (1) μ T (2),…,μ T (i)…, μ T (m) are the non-local gradients of the first, second, i-th and m-th calibrated feature points in the image T to be evaluated.
[0064] The present invention has the following beneficial effects:
[0065] 1. The present invention belongs to a semi-reference evaluation method. Compared with the traditional method, this method can pay attention to both the overall image quality and the detail quality of the image, greatly improving the extraction accuracy of the calibrated feature points in the image. In addition, the reference template image is easy to obtain, which is convenient for realizing automatic calibration.
[0066] 2. When calibrating the visual system, experiments have shown that after the calibration images are screened using the image calibration method of the present invention, the calibration accuracy of the visual system can be improved by 20%-30%.
[0067] 3. The present invention can eliminate the influence of individual factors on the quality evaluation of the calibration image, has high evaluation accuracy and robustness, and realizes an automated evaluation process. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 A flow chart of a calibration image quality evaluation method of the present invention is shown.
[0069] Figure 2 A schematic diagram of a checkerboard calibration plate used in the present invention is shown.
[0070] Figure 3 A schematic diagram showing the four corner point structures of A, B, C, and D of the calibration feature points under four convolution kernels A, B, C, and D when the checkerboard calibration plate in the present invention is not tilted.
[0071] Figure 4 A schematic diagram showing the four corner point structures of A, B, C, and D of the calibration feature points under four convolution kernels A, B, C, and D when the checkerboard calibration plate is tilted in the present invention. DETAILED DESCRIPTION
[0072] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific preferred embodiments.
[0073] In the description of the present invention, it should be understood that the terms "left side", "right side", "upper part", "lower part" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. "First", "second" and the like do not indicate the importance of the components, and therefore cannot be understood as limiting the present invention. The specific dimensions used in this embodiment are only for illustrating the technical solution, and do not limit the scope of protection of the present invention.
[0074] like Figure 1 As shown, a calibration image quality evaluation method includes the following steps.
[0075] Step 1: Obtain the image T to be evaluated: Use camera A to shoot the reference image R of the calibration plate at a set position to obtain the image T to be evaluated.
[0076] The camera A can be a camera to be calibrated, and the quality of its captured images is evaluated; or it can be a calibrated camera, and the quality of its calibrated images at different positions is evaluated.
[0077] The calibration plate reference image R has m calibration feature points; the image to be evaluated T contains all the calibration feature points in the calibration plate reference image R.
[0078] In this embodiment, the calibration plate reference image R is preferably as follows: Figure 2 The black and white checkerboard shown; the calibrated feature points are the corner points of the black and white checkerboard.
[0079] Step 2: Overall quality judgment of the image T to be evaluated: Use the point sharpness algorithm to evaluate the overall clarity of the image T to be evaluated; when the point sharpness p of the image T to be evaluated is not less than the minimum point sharpness threshold p min , go to step 2; otherwise, determine that the quality score of the image to be evaluated T is G=0.
[0080] The calculation formula of the above point sharpness p is preferably:
[0081]
[0082] Where m and n represent the length and width of the image T to be evaluated, respectively.
[0083] df represents the change amplitude of the grayscale of the image T to be evaluated.
[0084] dx represents the distance increment between pixels.
[0085] Point sharpness p represents the diffusion degree of the gray value of each pixel in the image. The larger the p value, the greater the diffusion degree, and the clearer the image T to be evaluated is.
[0086] Step 3: Extract calibration feature points: Extract the pixel values of all calibration feature points in the calibration plate reference image R and the image to be evaluated T respectively, so as to obtain the calibration feature point set P R and P T .
[0087] Among them, the calibration feature point set P T The method for obtaining comprises the following steps.
[0088] Step 3-1, calculate the similarity c: use Gaussian kernel to perform convolution and calculate the similarity c between each pixel in the image to be evaluated T and the calibrated feature point.
[0089] Furthermore, there are four types of Gaussian kernels, namely convolution kernel A, convolution kernel B, convolution kernel C and convolution kernel D. Therefore, the calculation formula of similarity c is preferably:
[0090]
[0091] in:
[0092]
[0093]
[0094]
[0095]
[0096]
[0097]
[0098] In the formula, It is the similarity between the current pixel and the calibration plate reference image R when there is no tilt and the calibrated feature point is convolved by convolution kernels A and B.
[0099] It is the similarity between the current pixel and the calibration feature point after convolution with convolution kernels A and B when the reference image R of the calibration plate is tilted.
[0100] It is the similarity between the current pixel and the calibration feature point after convolution with convolution kernels C and D when there is no tilt between them.
[0101] It is the similarity between the current pixel and the calibration feature point after convolution with convolution kernels C and D when the reference image R of the calibration plate is tilted.
[0102] are obtained by convolving the image to be evaluated T with the n×n Gaussian kernel, and represent the convolution response values of the four convolution kernels A, B, C and D when the reference image R of the calibration plate is not tilted. Among them, n≥7 and is an odd number; the filtered images are as follows Figure 3 shown.
[0103] are obtained by convolving the image to be evaluated T with the n×n Gaussian kernel, and respectively represent the convolution response values of the four convolution kernels A, B, C and D when the reference image R of the calibration plate is tilted; the filtered images are as follows Figure 4 shown.
[0104] μ 1 for The mean of .
[0105] μ 2 for The mean of .
[0106] Step 3-2, c value screening: The c value in step 3-1 is preferably screened using a non-maximum suppression algorithm to obtain a calibration feature point set P T The calibration feature point set is recorded as
[0107] The above calibration feature point set P R It can be directly obtained from the program, or the above-mentioned Gaussian kernel can be used for convolution. The specific convolution method is the same as the calibration feature point set P T , which will not be repeated here, so we get
[0108] Step 4: non-local gradient image evaluation, specifically including the following steps.
[0109] Step 4-1: Construct non-local gradient: for the calibration feature point set P R and P T The i-th calibrated feature point in constructs the non-local gradient μ R (i) and μ T (i); where 1≤i≤m.
[0110] The above m μ R (i), together constitute μ R ; m μ T (i), together constitute μ T ; then μ R and μ T The specific expression is:
[0111] μ R ={μ R (1) μ R (2), ..., μ R (i)…, μ R (m)}
[0112] μ T ={μ T (1) μ T (2), ..., μ T (i)…, μ T (m)}
[0113] In the formula, μ R (1) μ R (2), ..., μ R (i)…, μ R (m) are the non-local gradients of the first, second, i-th and m-th calibration feature points in the calibration plate reference image R, respectively.
[0114] μ T (1) μ T (2), ..., μ T (i)…, μ T (m) are the non-local gradients of the first, second, i-th and m-th calibrated feature points in the image T to be evaluated.
[0115] Step 4-2: Calculate the non-local gradient μ R (i) specifically:
[0116] A. Constructing the square domain Ω: Calibrate the feature point set P R The i-th calibrated feature point in Build with The center of the square area Ω is Ω, and each side of the square area Ω has (2t+1) pixels.
[0117] The value range of t involved in the above-mentioned field Ω is 20≤t≤100, which depends on the value of The value K of the reference image R of the calibration plate is used for determination; the larger the value of K is, the larger the value of t is.
[0118] B. Calculation deviation NG R (j): Let the pixel value of the jth pixel in the area Ω be r j , then NG R The calculation formula of (j) is:
[0119]
[0120] C. Calculate μ R (i): By calculating all NGR (j), and thus μ R (i) specifically:
[0121]
[0122] Step 4-3: Calculate the non-local gradient μ T (i) Using the method in step 4-2, we can obtain the calibration feature point set P. T The deviation NG corresponding to the i-th calibration feature point T (j) and the non-local gradient μ T (i) specifically:
[0123]
[0124]
[0125] In the formula, r j is the pixel value of the jth pixel in the square domain Ω; is the center, and each of its edges has (2t+1) pixels.
[0126] Step 4-4, calculate the average change degree similarity S 1 (i): According to μ R (i) and μ T (i) Calculated, the specific calculation formula is:
[0127]
[0128] Where λ is an arbitrary constant greater than zero.
[0129] Step 4-5: Calculate the structural similarity S 2 (i), the specific calculation formula is:
[0130]
[0131] In the formula, NG R The variance of (j), NG T The variance of (j), σ R,T (i) is NG R (j) and NG T (j) The covariance of
[0132] Step 4-6: Calculate the quality score G of the image T to be evaluated. The specific calculation formula is:
[0133]
[0134] In the formula, 0≤G≤1, the larger the G value, the closer the image T is to the reference image R, and the higher the image quality; when G≥0.9, it can meet the image calibration requirements of 0.05mm and above.
[0135] The preferred embodiments of the present invention are described in detail above; however, the present invention is not limited to the specific details in the above embodiments. Within the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all belong to the protection scope of the present invention.
Claims
1. A calibration image quality assessment method, characterized in that: The steps include: Step 1, obtaining the image T to be evaluated: using camera A to shoot the calibration plate reference image R at a set position to obtain the image T to be evaluated; wherein the calibration plate reference image R has m calibration feature points; the image T to be evaluated contains all the calibration feature points in the calibration plate reference image R; Step 2: Overall quality judgment of the image T to be evaluated: Use the point sharpness algorithm to evaluate the overall clarity of the image T to be evaluated; when the point sharpness p of the image T to be evaluated is not less than the minimum point sharpness threshold p min When , go to step 2; otherwise, determine that the quality score of the image T to be evaluated is G = 0; Step 3: Extract calibration feature points: Extract the pixel values of all calibration feature points in the calibration plate reference image R and the image to be evaluated T respectively, so as to obtain the calibration feature point set P R and P T ; Step 4: non-local gradient image evaluation, specifically including the following steps: Step 4-1: Construct non-local gradient: for the calibration feature point set P R and P T The i-th calibrated feature point in constructs the non-local gradient μ R (i) and μ T (i); where 1≤i≤m; Step 4-2: Calculate the non-local gradient μ R (i) specifically: A. Constructing the square domain Ω: Calibrate the feature point set P R The i-th calibrated feature point in Build with The square area Ω is the center, and each side of the square area Ω has (2t+1) pixels; B. Calculation deviation NG R (j): Let the pixel value of the jth pixel in the area Ω be r j , then NG R The calculation formula of (j) is: C. Calculate μ R (i): By calculating all NG R (j), and thus μ R (i); Step 4-3: Calculate the non-local gradient μ T (i) Using the method in step 4-2, we can obtain the calibration feature point set P. T The deviation NG corresponding to the i-th calibration feature point T (j) and the non-local gradient μ T (i); Step 4-4, calculate the average change degree similarity S1(i): according to μ R (i) and μ T (i) Calculated, the specific calculation formula is: In the formula, λ is an arbitrary constant greater than zero; Step 4-5: Calculate the structural similarity S2(i). The specific calculation formula is: In the formula, NG R The variance of (j), NG T The variance of (j), σ R,T (i) is NG R (j) and NG T (j) covariance; Step 4-6: Calculate the quality score G of the image T to be evaluated. The specific calculation formula is: In the formula, 0≤G≤1.
2. The calibration image quality evaluation method according to claim 1, characterized in that: In step 4-2, the value range of t involved in the square field Ω is 20≤t≤100, which is specifically determined according to the proportion K of the calibration plate reference image R in the image to be evaluated T; when the K value is larger, the t value is also larger.
3. The calibration image quality assessment method according to claim 1, characterized in that: In step 1, the calibration plate reference image R is a black and white checkerboard; the calibration feature points are the corner points of the black and white checkerboard.
4. The calibration image quality assessment method according to claim 1, characterized in that: In step 2, the calculation formula of point sharpness p is: In the formula, m and n represent the length and width of the image T to be evaluated respectively; df represents the change amplitude of the grayscale of the image T to be evaluated; dx represents the distance increment between pixels; Point sharpness p represents the diffusion degree of the gray value of each pixel in the image. The larger the p value, the greater the diffusion degree, and the clearer the image T to be evaluated is.
5. The calibration image quality assessment method according to claim 1, characterized in that: In step 3, the feature point set P is calibrated T The method for obtaining comprises the following steps: Step 3-1, calculate the similarity c: use Gaussian kernel to perform convolution and calculate the similarity c between each pixel in the image to be evaluated T and the calibrated feature point; Step 3-2, c value screening: Screen the c value in step 3-1 to obtain the calibration feature point set P T The calibration feature point set is recorded as 6. The calibration image quality assessment method according to claim 5, characterized in that: In step 3-1, there are four types of Gaussian kernels, namely convolution kernel A, convolution kernel B, convolution kernel C and convolution kernel D.
7. The calibration image quality assessment method according to claim 6, characterized in that: In step 3-1, the calculation formula of similarity c is: in: Where: It is the similarity between the current pixel and the calibration plate reference image R when there is no tilt and the calibration feature point is convolved by the convolution kernels A and B; It is the similarity between the current pixel and the calibration plate reference image R when tilted after convolution with convolution kernels A and B; is the similarity between the current pixel and the calibration plate reference image R when there is no tilt and the calibration feature point is convolved by the convolution kernels C and D; It is the similarity between the current pixel and the calibration feature point after convolution with convolution kernels C and D when the reference image R of the calibration plate is tilted; are obtained by convolving the image T to be evaluated with the n×n Gaussian kernel, and represent the convolution response values of the four convolution kernels A, B, C and D when the reference image R of the calibration plate is not tilted; are obtained by convolving the image to be evaluated T with the n×n Gaussian kernel, and represent the convolution response values of the four convolution kernels A, B, C and D when the reference image R of the calibration plate is tilted; μ1 is The mean of μ2 is The mean of .
8. The calibration image quality assessment method according to claim 6, characterized in that: In step 3-2, the c value in step 3-1 is screened using a non-maximum suppression algorithm.
9. The calibration image quality assessment method according to claim 1, characterized in that: When G≥0.9, it can meet the image calibration requirements of 0.05mm and above.
10. The calibration image quality assessment method according to claim 1, characterized in that: In step 4-1, m μ R (i), together constitute μ R ; m μ T (i), together constitute μ T ; then μ R and μ T The specific expression is: m R ={μ R (1)、m R (2)、…、m R (i)…、m R (m)} m T ={μ T (1)、m T (2)、…、m T (i)…、m T (m)} In the formula, μ R (1) μ R (2),…,μ R (i)…, μ R (m) are the non-local gradients of the first, second, i-th and m-th calibration feature points in the calibration plate reference image R, respectively; μ T (1) μ T (2),…,μ T (i)…, μ T (m) are the non-local gradients of the first, second, i-th and m-th calibrated feature points in the image T to be evaluated.
