Calibration plate circle center detection method and device, equipment and storage medium

By creating a perspective transformation matrix and clustering algorithm to merge the target circle profile, the deformation problem of the calibration plate during tilt shooting is solved, the accuracy and robustness of the center detection are improved, and it is suitable for high-precision calibration in tilt scenes.

CN120259316AActive Publication Date: 2025-07-04SHENZHEN XINRUN FULIAN DIGITAL TECH CO LTD

Patent Information

Application Number
CN202510754446.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-07-04
Estimated Expiration
2045-06-06

AI Technical Summary

Technical Problem

In the prior art, when the calibration plate is tilted, the circle is deformed into an ellipse, resulting in insufficient detection accuracy of the circle center and is susceptible to noise and light changes. The calculation complexity is high, making it difficult to meet the high-precision calibration requirements.

Method used

By creating a virtual standard square to determine the perspective transformation matrix, map the original calibration plate image into a square calibration plate image, and merge the target circle profile in the square calibration plate image through a clustering algorithm, and determine the merge center coordinates using confidence to suppress noise interference.

Benefits of technology

It effectively solves the deformation problem of the calibration plate during tilt shooting, improves the accuracy and robustness of the center detection, reduces noise interference, and is suitable for high-precision calibration in tilt scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120259316A_ABST
    Figure CN120259316A_ABST
Patent Text Reader

Abstract

The invention relates to a calibration plate circle center detection method, device and equipment and a storage medium, in the application, a perspective transformation matrix is determined by creating a virtual standard square, and the perspective transformation matrix is utilized to map an original calibration plate image into a square calibration plate image, so that the calibration plate circle center detection accuracy is improved. The problem of deformation of the calibration plate during oblique shooting can be effectively solved, so that circle center detection is not influenced by view angle inclination; moreover, the contour of each target circle is combined through a clustering algorithm in the square calibration plate image, and the coordinate of the combined center is determined through confidence, so that noise interference can be effectively suppressed, and the precision of circle center detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of camera calibration, and particularly to a method, device, equipment and storage medium for detecting the center of a calibration board. Background Art

[0002] ‌A circular calibration board‌ is a calibration tool used in machine vision, photogrammetry and three-dimensional reconstruction, which consists of a regularly arranged dot pattern. The circular calibration board is widely used for the internal and external parameter calibration of cameras. Its core principle is to detect the circular feature points in the image and calculate the distortion parameters and pose information of the camera using geometric relationships. However, when there is a large inclination angle between the calibration board and the camera, the circles in the image will be deformed into ellipses due to perspective projection, affecting the calibration accuracy. The existing technical solutions usually adopt the method of ellipse fitting to restore the center position of the circle. However, when the inclination angle is large, the short axis of the ellipse will be significantly reduced, resulting in unstable numerical calculation, error amplification, and even inaccurate fitting. Secondly, this method highly depends on edge detection and is easily affected by factors such as noise, light change, and reflection, resulting in unstable ellipse fitting. In addition, due to the influence of perspective deformation, the aspect ratio of the long and short axes cannot be directly used to restore the original circle radius, and additional geometric calculations and optimizations are required, increasing uncertainty. Further, the computational complexity of ellipse fitting is relatively high, especially in the multi-dot calibration task, which may affect real-time performance.

[0003] Therefore, how to improve the accuracy of extracting the center of the calibration board in an inclined scenario is a problem that needs to be solved by those skilled in the art. Summary of the Invention

[0004] This application provides a method, device, equipment and storage medium for detecting the center of a calibration board to improve the accuracy of extracting the center of the calibration board in an inclined scenario.

[0005] In a first aspect, this application provides a method for detecting the center of a calibration board, including: Obtaining an original calibration board image; Identifying quadrilateral corner points from the original calibration board image; Creating a virtual standard square and determining a perspective transformation matrix according to the virtual corner points of the virtual standard square and the quadrilateral corner points; Using the perspective transformation matrix to map the original calibration board image into a square calibration board image; Detecting the target circle contour in the square calibration board image; Dividing each target circle contour into at least one clustering subset, and generating a combined center coordinate according to the center coordinates and confidence levels of the target circle contours in each clustering subset; Using the perspective transformation matrix and the combined center coordinate to determine the actual center coordinate corresponding to the original calibration board image.

[0006] Optionally, identifying the quadrilateral corner points from the original calibration board image includes: Performing binarization processing on the original calibration board image according to a first target threshold to generate a processed first binarized calibration board image; Detecting the quadrilateral contour of the first binarized calibration board image; Screening the quadrilateral corner points according to the cosine values of the vertices of the quadrilateral contour; If the number of screened quadrilateral corner points is less than four, adjust the first target threshold, and continue to execute the step of performing binarization processing on the original calibration board image according to the adjusted first target threshold.

[0007] Optionally, after identifying the quadrilateral corner points from the original calibration board image, it further includes: Taking each quadrilateral corner point as the center, determining the rectangular region of interest of each quadrilateral corner point; Performing binarization processing on each rectangular region of interest to generate a binarized rectangular region image; Converting each binarized rectangular region image into corresponding two-dimensional point cloud data; Through a clustering algorithm, determining the target point cloud data subset closest to the quadrilateral corner point in the two-dimensional point cloud data, and determining the fitted edge line segment of the target point cloud data subset; If the included angle between the fitted edge line segments of the target rectangular region of interest is detected to be less than the included angle threshold, taking the quadrilateral corner point corresponding to the target rectangular region of interest as the triangular marker corner point; Determining the corner point input order according to the triangular marker corner points; wherein, the corner point input order is used to determine the input order of each quadrilateral corner point when determining the perspective transformation matrix.

[0008] Optionally, detecting the target circle contour in the square calibration board image includes: Performing binarization processing on the square calibration board image according to a second target threshold to generate a processed second binarized calibration board image; wherein, the value of the second target threshold is different in each iteration process; Detecting the initial circle contour in the second binarized calibration board image; Calculating the area and second geometric feature parameters of each initial circle contour; the second geometric feature parameters include at least one of roundness, inertia ratio, and convexity; If the area of the initial circle contour is within the effective area range and the second geometric feature parameters are within the effective parameter range, taking the initial circle contour as the target circle contour.

[0009] Optionally, the determination process of the effective area range includes: Perform edge detection on the square calibration plate image, extract edge pixel points, and determine target line segments based on the edge pixel points; Search for closed target line segments according to the first geometric feature parameters of each target line segment; If so, perform circle fitting on the closed target line segment to generate a fitted target circle; Determine an area index according to the areas of the target circles, and determine an effective area range according to the area index.

[0010] Optionally, divide the contours of each target circle into at least one clustering subset, including: Calculate the confidence of each target circle contour according to the second geometric feature parameter of the target circle contour; Calculate the center coordinates of each target circle contour according to the area and pixel values of the target circle contour; Divide the contours of each target circle into at least one clustering subset according to the contour radius, center coordinates, and center distance threshold of each target circle contour during each iteration process.

[0011] Optionally, before determining the actual center coordinates corresponding to the original calibration plate image, further include: Judge whether the number of clustering subsets is the same as the number of standard circles; If so, continue to execute the step of determining the actual center coordinates corresponding to the original calibration plate image by using the perspective transformation matrix and the merged center coordinates; If not, adjust the effective parameter range, and re-determine the target circle contour according to the effective area range and the adjusted effective parameter range.

[0012] In a second aspect, the present application provides a center detection device for a calibration plate, including: An acquisition module for acquiring an original calibration plate image; An identification module for identifying quadrilateral corner points from the original calibration plate image; A matrix determination module for creating a virtual standard square and determining a perspective transformation matrix according to the virtual corner points of the virtual standard square and the quadrilateral corner points; A mapping module for mapping the original calibration plate image into a square calibration plate image by using the perspective transformation matrix; A detection module for detecting target circle contours in the square calibration plate image; A merging module for dividing the contours of each target circle into at least one clustering subset, and generating merged center coordinates according to the center coordinates and confidence levels of the target circle contours in each clustering subset. A coordinate determination module, configured to determine the actual center coordinates corresponding to the original calibration plate image by using the perspective transformation matrix and the merging center coordinates.

[0013] In a third aspect, the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus; The memory is used to store a computer program; The processor is configured to implement the steps of the above-mentioned center detection method when executing the program stored on the memory.

[0014] In a fourth aspect, the present application further provides a computer storage medium, where the computer storage medium stores computer-executable instructions, and the computer-executable instructions are used to execute the steps of the above-mentioned center detection method of the present application.

[0015] The above technical solutions provided by the embodiments of the present application have the following advantages compared with the prior art: The present application provides a method, device, equipment, and storage medium for detecting the center of a calibration plate. In the present application, a virtual standard square is created to determine the perspective transformation matrix, and the original calibration plate image is mapped into a square calibration plate image by using the perspective transformation matrix. In this way, the deformation problem caused by the inclined shooting of the calibration plate can be effectively solved, so that the center detection is not affected by the perspective tilt; moreover, in the square calibration plate image, the present application merges the contours of each target circle through a clustering algorithm and determines the merging center coordinates through confidence, which can effectively suppress noise interference and improve the accuracy of center detection. Description of the Drawings

[0016] The drawings here are incorporated into the specification and constitute a part of this specification, showing the embodiments that conform to the present invention, and are used together with the specification to explain the principles of the present invention.

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained according to these drawings without creative efforts.

[0018] One or more embodiments are exemplarily illustrated by the pictures in the corresponding drawings. These exemplary illustrations do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements, unless otherwise stated, and the drawings in the figures do not constitute a proportional limitation.

[0019] Figure 1 It is a schematic flowchart of a method for detecting the center of a calibration plate provided by an embodiment of the present application; Figure 2 Schematic diagram of an original calibration plate image provided by an embodiment of the present application; Figure 3 Square calibration plate image provided by an embodiment of the present application; Figure 4 Another square calibration plate image provided by an embodiment of the present application; Figure 5 Schematic diagram of the structure of a center detection device for a calibration plate provided by an embodiment of the present application; Figure 6 Schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0020] Existing technical solutions usually adopt the method of ellipse fitting. By detecting and fitting the ellipse edge, the center coordinates, major and minor axes, and rotation angle are calculated, and then the original center position and camera calibration parameters are further deduced to compensate for the influence of perspective distortion. However, this solution has poor robustness in the case of large inclination angles and is difficult to meet the high-precision calibration requirements.

[0021] Therefore, in the embodiments of the present application, a method, device, equipment, and storage medium for detecting the center of a calibration plate are provided. This solution can solve the problem of insufficient circle detection accuracy caused by image inclination in complex scenarios. By combining perspective transformation, edge detection, and local feature analysis, the accuracy and robustness of circle detection are significantly improved, thereby improving the accuracy of extracting the center of the calibration plate, especially suitable for inclined scenarios.

[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0023] The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. To simplify the disclosure of the present invention, components and settings of specific examples are described below. Of course, they are only examples and are not intended to limit the present invention. In addition, the present invention may repeat reference numerals and / or letters in different examples. This repetition is for the purpose of simplification and clarity and does not itself indicate the relationship between the various embodiments and / or settings discussed.

[0024] Refer to Figure 1 , which is a schematic flowchart of a method for detecting the center of a calibration plate provided by an embodiment of the present application. The method includes the following steps: S101. Obtain the original calibration board image; In this application, the original calibration board image is an image of a circular calibration board captured by an image capturing device. When there is a large inclination angle between the circular calibration board and the image capturing device, the circles in the original calibration board image will be distorted into ellipses due to perspective projection, which affects the calibration accuracy. Therefore, in this application, the perspective distortion caused by the shooting angle can be eliminated through subsequent processes to improve the accuracy of center detection.

[0025] S102. Identify the quadrilateral corner points from the original calibration board image; In this embodiment, for the input original calibration board image, first, threshold binaryzation processing needs to be performed to generate a binary calibration board image, so as to provide a high-quality image basis for subsequent contour extraction. Then, through an edge detection algorithm, the edge contour of the original calibration board image is identified, and then the four corner points of the quadrilateral in the original calibration board image are determined through the edge contour. In this embodiment, the corner points in the original calibration board image are called quadrilateral corner points. Refer to Figure 2 , which is a schematic diagram of an original calibration board image provided by an embodiment of this application. Refer to Figure 2 , Figure 2 The positions indicated by 1, 2, 3, and 4 in

[0026] are the quadrilateral corner points in the original calibration board image. S103. Create a virtual standard square, and determine the perspective transformation matrix according to the virtual corner points of the virtual standard square and the quadrilateral corner points; In this application, to solve the deformation problem of the circular calibration board during inclined shooting, based on the characteristic that the outer border of the calibration board is a square, an ideal square is defined in the target space as the virtual projection plane. The coordinate values of the four corner points of this square are set according to the geometry of the standard square. This application refers to this square as the virtual standard square. Then, a correspondence relationship is established between the real quadrilateral corner points detected in the original calibration board image and the virtual corner points of the virtual standard square, and the perspective transformation matrix between the two is calculated. Applying this perspective transformation matrix can perform perspective correction on the original calibration board image, so that the actually captured inclined original calibration board image is accurately mapped onto the preset square projection plane, thereby eliminating the perspective distortion caused by the shooting angle and generating a square calibration board image that conforms to the standard coordinate system.

[0027] S105. Detect the target circle contour in the square calibration board image; In this embodiment, after obtaining the square calibration plate image, it is necessary to perform binarization processing on the square calibration plate image to generate a second binarized calibration plate image; then, through the contour detection method, contour detection is performed on the second binarized calibration plate image. Since the circular calibration plate image in this application includes multiple circles, the contours detected from the square calibration plate image in this application are circular contours; in this application, the circular contours detected from the square calibration plate image are called target circular contours.

[0028] S106. Divide each target circular contour into at least one clustering subset, and generate a combined center coordinate according to the center coordinates and confidence levels of each target circular contour in each clustering subset. It should be noted that when detecting the target circular contour from the square calibration plate image in this application, multiple target circular contours may be detected due to reasons such as lighting and imaging conditions. Therefore, in this application, it is necessary to divide each target circular contour into at least one clustering subset; in each clustering subset, there are multiple target circular contours with close center coordinate distances. Furthermore, according to the center coordinates and confidence levels of each target circular contour in each clustering subset, the updated combined center coordinate can be generated. Among them, the confidence level of the target circular contour is a probability index used to quantify the probability that the detected target circular contour is close to an ideal circle. When calculating the confidence level, geometric parameters such as roundness, inertia ratio, and convexity can be comprehensively considered to evaluate the geometric reliability of the contour. Therefore, by generating the combined center coordinate through the center coordinates and confidence levels of each target circular contour in the clustering subset in this application, noise interference can be effectively suppressed and the accuracy of center detection can be improved.

[0029] S107. Use the perspective transformation matrix and the combined center coordinate to determine the actual center coordinates corresponding to the original calibration plate image.

[0030] In this application, the combined center coordinate detected through the above steps is located in the image space after perspective transformation. Therefore, in this application, in order to obtain the true center position in the original calibration plate image, it is necessary to map the combined center coordinate back to the original image coordinate system through the inverse transformation of the perspective transformation matrix. Specifically, for each detected combined center coordinate , apply the inverse perspective transformation matrix to perform back-projection calculation: ; where is the actual center coordinate corresponding to the original calibration plate image. Through this method in this application, it can be ensured that all geometric measurement results can finally accurately correspond to the position in the original shooting scene.

[0031] In summary, in the present application, a perspective transformation matrix is determined by creating a virtual standard square, and the original calibration board image is mapped to a square calibration board image using this perspective transformation matrix. In this way, the deformation problem caused by the inclined shooting of the calibration board can be effectively solved, and the center detection of the circle is not affected by the inclined view. Moreover, in the present application, the contours of each target circle are merged by a clustering algorithm in the square calibration board image, and the merged center coordinates are determined by the confidence level, which can effectively suppress noise interference and improve the accuracy of the center detection of the circle.

[0032] In another embodiment provided by the present application, the process of identifying the quadrilateral corner points from the original calibration board image specifically includes: Performing binarization processing on the original calibration board image according to a first target threshold to generate a processed first calibration board binarized image; detecting the quadrilateral contour of the first calibration board binarized image; screening the quadrilateral corner points according to the cosine values of the vertices of the quadrilateral contour; if the number of screened quadrilateral corner points is less than four, adjusting the first target threshold, and continuing to perform the step of binarizing the original calibration board image according to the adjusted first target threshold.

[0033] Specifically, when the present application identifies the quadrilateral corner points from the original calibration board image, first, it is necessary to perform threshold binarization processing on the input calibration board image to generate a first calibration board binarized image; detect all the contours in the first calibration board binarized image through an edge detection algorithm, and establish a hierarchical relationship tree, and use the parent-child nesting characteristics of the contours to screen out a candidate contour group that may contain the calibration board features, effectively excluding irrelevant interference contours. Then calculate the number of convex hulls of each candidate contour in the candidate contour group, quickly judge the basic shape characteristics of each candidate contour. If the number of vertices of the convex hull of the candidate contour is less than 4, it is directly excluded to ensure that the object for subsequent processing has the basic quadrilateral characteristics. If the number of vertices of the candidate contour is 4, it is determined that the candidate contour is a quadrilateral contour.

[0034] It should be noted that since each included angle in the original calibration image is ninety degrees, after the present application determines each quadrilateral contour with four convex hulls, four quadrilateral corner points can be screened out according to the vertex included angles of each convex hull. In the present application, first, it is necessary to calculate the cosine value of the included angle between adjacent side vectors at each vertex of the convex hull, and quantify the sharpness of the corner point by the absolute value of the cosine value, providing an objective geometric feature basis for subsequent corner point screening. Since the cosine value corresponding to a ninety-degree included angle is 0, when the present application screens the quadrilateral corner points, all the convex hull vertices can be sorted in descending order of the included angle cosine value, and the first four corner points with the cosine value closest to 0 are selected. These four corner points are the four sharpest corner points. The present application refers to the four sharpest corner points as quadrilateral corner points. In this way, it can be ensured that the screened corner points have optimal geometric features and stability.

[0035] Further, if the four sharpest corner points cannot be found in the initial detection of this application, it can automatically enter the threshold optimization stage, that is: when this application performs binarization processing on the original calibration board image according to the first target threshold, the first target threshold can be set as the minimum threshold. If the four sharpest corner points cannot be found, the first target threshold is gradually adjusted according to the step size, and the next round of iteration process is re-executed, and the above process of determining the quadrilateral corner points is continued until the four sharpest corner points are found, or when the first target threshold is adjusted to the maximum threshold, the threshold optimization stage is exited.

[0036] In summary, in this application, the quadrilateral corner points can be accurately found from the original calibration board image by performing binarization processing on the original calibration board image according to the first target threshold, and through the edge detection algorithm and the cosine value comparison method; moreover, this application dynamically optimizes the binarization effect of the image by dynamically adjusting the first target threshold, ensuring the best contrast between the circular marking points of the calibration board and the background. This method solves the limitations of the traditional fixed threshold method in complex scenarios and improves the recognition accuracy of the quadrilateral corner points.

[0037] In another embodiment provided by this application, after identifying the quadrilateral corner points from the original calibration board image, it further includes: taking each quadrilateral corner point as the center, determining the rectangular region of interest of each quadrilateral corner point; performing binarization processing on each rectangular region of interest to generate a binarized image of the rectangular region; converting each binarized image of the rectangular region into corresponding two-dimensional point cloud data; through the clustering algorithm, determining the subset of target point cloud data closest to the quadrilateral corner points in the two-dimensional point cloud data, and determining the fitted edge segments of the subset of target point cloud data; if the included angle between the fitted edge segments of the detected target rectangular region of interest is less than the angle threshold, taking the quadrilateral corner point corresponding to the target rectangular region of interest as the triangular marking corner point; determining the input order of the corner points according to the triangular marking corner points; wherein, the input order of the corner points is used to determine the input order of each quadrilateral corner point when determining the perspective transformation matrix.

[0038] Correspondingly, this application determines the perspective transformation matrix according to the virtual corner points of the virtual standard square and the quadrilateral corner points, including: using the input order of the corner points, the virtual corner points of the virtual standard square and the quadrilateral corner points to determine the perspective transformation matrix; wherein, the input order of the corner points is used to determine the input order of each quadrilateral corner point, which is consistent with the input order of each virtual corner point.

[0039] It should be noted that when determining the perspective transformation matrix based on the virtual corner points of the virtual standard square and the corner points of the quadrilateral, the input order of each corner point needs to be clarified. If the input order of the virtual corner points is inconsistent with the input order of the quadrilateral corner points, the finally calculated perspective transformation matrix will be incorrect. The incorrect perspective transformation matrix will map the original calibration board image into an incorrect square calibration board image.

[0040] See Figure 3 , which is a square calibration board image provided by an embodiment of the present application. This square calibration board image is an image generated by performing perspective correction on the original calibration board image through a correct perspective transformation matrix; see Figure 4 , which is another square calibration board image provided by an embodiment of the present application. This square calibration board image is an image generated by performing perspective correction on the original calibration board image through an incorrect perspective transformation matrix. It can be seen that when calculating and determining the perspective transformation matrix, if the input order of each quadrilateral corner point is incorrect, it will lead to the calculation of an incorrect perspective transformation matrix, and then generate an incorrect square calibration board image. Therefore, in the present application, the input order of each quadrilateral corner point can be determined by finding the triangular marker corner points, so as to eliminate the perspective distortion caused by the shooting angle through the correct perspective transformation matrix and generate a square calibration board image that conforms to the standard coordinate system.

[0041] See Figure 2 , Figure 2 The quadrilateral corner point 1 in Figure 2 , Figure 2 is different from the quadrilateral corner point 2, quadrilateral corner point 3, and quadrilateral corner point 4. The quadrilateral corner point 1 is a triangular area, so the quadrilateral corner point 1 is a specially marked point, that is, a triangular marker corner point. In this embodiment, in order to identify the triangular marker corner point, the coordinates of the four quadrilateral corner points can be obtained. With each quadrilateral corner point as the center, a rectangular region of interest (ROI) with a fixed size is established. The size of each rectangular region of interest can be reasonably set according to the actual size of the calibration board to ensure that it can completely contain the possible triangular marker area. The triangular marker area is the area containing the triangular marker corner point. See

[0042] Furthermore, the present application also needs to perform an Euclidean clustering algorithm on the two-dimensional point cloud data of each rectangular region of interest, divide the point cloud into several subsets according to the spatial distance, then calculate the Euclidean distance from the centroid of each subset to the corresponding quadrilateral corner point, and after sorting the distances from small to large, select the subset of the target point cloud data with the closest distance as the candidate triangular marking region.

[0043] After determining the subset of the target point cloud data for each rectangular region of interest, edge extraction is performed on the subset of the target point cloud data, and the outer contour edge points of the point cloud are obtained through the boundary tracking algorithm. These edge points will be used for subsequent geometric feature analysis to exclude the interference of internal noise points. Then, the RANSAC algorithm (RANdom SAmple Consensus) is used to perform linear fitting on the edge point cloud. After each fitting, the fitted point cloud is removed, and this process is repeated until all the main fitted edge segments are extracted. Record the parametric equations and endpoint coordinates of each line segment. Calculate the included angle between adjacent fitted edge segments of each rectangular region of interest. When it is detected that there is an acute angle (such as less than 80 degrees), determine the current rectangular region of interest as the target rectangular region of interest, and the quadrilateral corner points corresponding to this target rectangular region of interest are the corner points of the triangular region, that is: the triangular marking corner points.

[0044] After the present application determines the triangular marking corner points from the quadrilateral corner points, the corner point input order of each quadrilateral corner point can be determined according to a preset order. For example: the preset order is: triangular marking corner point, ordinary quadrilateral corner point, diagonal corner point of the triangular marking corner point, and ordinary quadrilateral corner point. Therefore, after the present application determines the triangular marking corner points, the input order of each quadrilateral corner point can be determined. In this embodiment, the geometric center of the four corner points can be calculated, and direction vectors pointing from the center to other corner points are established. By comparing these direction vectors with the direction vectors of the identified triangular marking corner points, the position of the diagonal point that is 180 degrees anti-parallel to the triangular marking corner point can be accurately found. See Figure 2 , the direction vector from corner point 1 to corner point 3 and the direction vector from corner point 3 to corner point 1 are 180 degrees anti-parallel. Since corner point 1 is the triangular marking corner point, then corner point 3 is the diagonal corner point of the triangular marking corner point, and the finally determined corner point input order is: corner point 1 - corner point 2 - corner point 3 - corner point 4.

[0045] In summary, after the present application performs binarization processing on the quadrilateral corner points and converts them into two-dimensional point cloud data, the triangular marking corner points can be found from each quadrilateral corner point through clustering algorithms, edge extraction, linear fitting, etc. Furthermore, according to the triangular marking corner points, the input order of each quadrilateral corner point is determined. This method can ensure the consistency of the corner point order, provide standardized input data for subsequent perspective transformation and other processing, and ensure the calculation of an accurate perspective transformation matrix.

[0046] In another embodiment of the present application, the target circle contours in the square calibration plate image are detected, and each target circle contour is divided into at least one clustering subset, which specifically includes the following steps: The square calibration plate image is binarized according to the second target threshold to generate a processed second calibration plate binary image; wherein, the value of the second target threshold is different in each iteration process; the initial circle contours in the second calibration plate binary image are detected; the area and the second geometric feature parameter of each initial circle contour are calculated; the second geometric feature parameter includes at least one of roundness, inertia ratio, and convexity; If the area of the initial circle contour is within the effective area range and the second geometric feature parameter is within the effective parameter range, the initial circle contour is used as the target circle contour; According to the second geometric feature parameter of the target circle contour, the confidence of each target circle contour is calculated; according to the area and pixel value of the target circle contour, the center coordinates of each target circle contour are calculated; according to the contour radius, center coordinates, and center distance threshold of each target circle contour in each iteration process, each target circle contour is divided into at least one clustering subset.

[0047] In the present application, when detecting the target circle contours in the square calibration plate image, it is first necessary to binarize the input square calibration plate image. Among them, when the present application performs binarization processing on the square calibration plate image, it is necessary to perform multiple iteration processes. In the first iteration process, the second target threshold is set to the minimum binarization threshold. In each subsequent iteration process, the second target threshold is gradually increased by the step size step_thresh until the end threshold is reached. In each iteration, the improved findBlobsImprove function is called to detect the blob regions and their center points in the current binary image; wherein, the blob region is a connected pixel region, that is, the region within the target circle contour in the present application, and the center point of the blob region is the center coordinate of the target circle contour. The detected blob center points are stored in curCenters. If valid results are detected (curCenters is not empty), these center point sets are added to the main vector curCenters_vector.

[0048] Here, the specific execution process of the findBlodsImprove function is described: First, determine each target circle contour from the second calibration plate binary image: a. Perform contour detection on the input second calibration plate binary image to obtain the initial circle contours of all possible candidate regions.

[0049] b. Traverse each initial circle contour and calculate the area of the contour ( a. Geometric feature. The following is the formula for calculating the area: ; where is the value (0 or 1) of the binary image at pixel .

[0050] c. Calculate the roundness of the initial circle contour ( ). The following is the formula for calculating the roundness: a. Geometric feature. The following is the formula for calculating the area: ; The perimeter is calculated by the following formula: ; where is the point on the contour is the Euclidean distance. The roundness of an ideal circle is 1, and the smaller the value, the more deviated from a circle.

[0051] d. Calculate the inertia ratio of the initial circle contour ( ). The following is the formula for calculating the inertia ratio: a. Geometric feature. The following is the formula for calculating the area: ; where and are the eigenvalues of the inertia matrix: ; The eigenvalues are calculated as follows: ; The closer the inertia ratio is to 1, the closer the contour is to a circle; the closer it is to 0, the more slender the contour is.

[0052] e. Calculate the convexity of the initial circle contour ( ). The following is the formula for calculating the inertia ratio: a. Geometric feature. The following is the formula for calculating the area: ; ; where is the coordinate of the i-th vertex of the convex hull , , (closed at the beginning and end). : The contour is completely convex (such as a circle, rectangle, convex polygon).

[0053] f. After calculating the area, roundness, inertia ratio, and convexity of each initial circle contour through the above process, it is necessary to compare the area of each initial circle contour with the effective area range, and compare the roundness, inertia ratio, and convexity of each initial circle contour with the corresponding effective parameter range. If the area of the initial circle contour is within the effective area range, and the roundness, inertia ratio, and convexity are all within the effective parameter range, then the initial circle contour is determined as the target circle contour.

[0054] In another embodiment of the present application, the determination process of the effective area range includes: performing edge detection on the square calibration plate image to extract edge pixel points, and determining target line segments based on the edge pixel points; searching for closed target line segments according to the first geometric feature parameters of each target line segment; if so, performing circle fitting on the closed target line segments to generate a fitted target circle; determining an area index according to the areas of the target circles, and determining the effective area range according to the area index.

[0055] The present application determines the effective area range according to the areas of the circles in the square calibration plate image. That is: the present application performs edge detection on the square calibration plate image after perspective transformation to extract edge pixel points. Connect the edge pixel points into continuous target line segments, and calculate the first geometric features of each target line segment, such as the starting point, ending point, length, etc.; then check whether each target line segment is close to being closed, that is: the distance between the starting point and the ending point is less than a threshold; if the target line segment is close to being closed, then the target line segment is called a closed target line segment, and circle fitting is directly performed on the closed target line segment. Circle fitting fits the circle equation by the least squares method:

[0056] Then calculate the area of each generated target circle after fitting, and obtain the arithmetic mean of all circle areas as the characteristic area index . After determining the area index, the present application can establish a dynamic threshold system based on the area index, and set the effective area range as . The shape constraint parameters uniformly adopt a triple verification mechanism. Among them, the qualified thresholds of roundness, inertia ratio, and convexity are all set in the interval [0.7, 0.99], and the three characteristic parameters have equal weights.

[0057] For each target circle contour, the center coordinates and confidence level need to be calculated through the following process: 1. Calculate the center coordinates of the target circle contour by using the image moment method: ; Among them, ,, is the area of the contour.

[0058] 2. Comprehensive score confidence level based on geometric features : ; g. Use the Welzl algorithm to calculate the radius of the minimum circumscribed circle of the contour ( ).

[0059] II. Through the above process, in each iteration, the contour radius, center coordinates, and confidence of each target circle contour in different binary images of the second calibration plate can be obtained. The present application can use a clustering algorithm to merge contours with close distances. For any two target contours i and contour j, an adjacency relationship is established when any of the following conditions is met: ; wherein, are the center coordinates of target contour i, are the center coordinates of target contour j, is the contour radius of target contour i, is the contour radius of target contour j, is a preset minimum center distance threshold, represents the Euclidean distance.

[0060] III. For each clustering subset in the present application, , it is necessary to calculate the center coordinates, confidence, and radius after merging of each target circle contour in each clustering subset.

[0061] Among them, the merged center coordinates are obtained by confidence weighting, specifically: ; wherein, is the merged center coordinate of the m-th clustering subset, is the m-th clustering subset, is the confidence of the i-th target circle contour, is the center coordinate of the i-th target circle contour.

[0062] The merged confidence is obtained by arithmetic mean: ; wherein, is the number of contours in subset , is the merged confidence of the m-th clustering subset.

[0063] Merged radius: ; wherein, is the radius of the i-th target circle contour, is the merged radius of the m-th clustering subset.

[0064] In another embodiment of the present application, before determining the actual center coordinates corresponding to the original calibration plate image, it further includes: determining whether the number of clustering subsets is the same as the number of standard circles; If so, continue to execute the step of determining the actual center coordinates corresponding to the original calibration plate image by using the perspective transformation matrix and the combined center coordinates; If not, adjust the effective parameter range, and re-determine the target circle contour according to the effective area range and the adjusted effective parameter range.

[0065] It should be noted that in the initial target circle contour detection process of this application, a strict effective parameter range can be set. For example, the effective parameter ranges of convexity, circularity, and inertia ratio are all set to 0.99, and the contour is screened through the strict effective parameter range; if after clustering, the number of contours that meet the requirements is the same as the number of standard circles on the calibration plate, the combined center coordinates of the current clustering result are directly used to determine the center coordinates; if the number is insufficient, the effective parameter range is gradually relaxed, the target circle contour is re-searched, and the subsequent process is executed; when the number of contours exceeds the number of standard circles, secondary clustering is started through the above clustering process, and high geometric quality contours are always preferentially retained. Through this hierarchical processing mechanism, this application not only ensures the center positioning accuracy (only fusing high-confidence contours), but also ensures complete coverage of all target circles through dynamic threshold adjustment. The finally output weighted center coordinates can accurately reflect the true center distribution of the calibration plate.

[0066] To verify that the center coordinates can be more accurately identified through this solution, this application is verified in the following way: 1. Respectively use the method described in this solution and the traditional ellipse fitting method to extract the center pixel coordinates in the image, establish a coordinate system with the upper left corner of the calibration plate as the origin, and determine the physical positions (in millimeters) of each center in this coordinate system.

[0067] 2. Based on the correspondence between two-dimensional pixel coordinates and three-dimensional physical coordinates, use the Zhang Zhengyou calibration method to calculate the camera parameters and external parameters obtained by the two methods respectively. The camera parameters include focal length, principal point coordinates, and distortion coefficients, and the external parameters include rotation vector and translation vector.

[0068] 3. The center coordinates in the calibration plate coordinate system are back-projected to the image plane through the calculated internal and external parameters to obtain the theoretical pixel coordinates, and the Euclidean distance between it and the actually detected center coordinates is calculated as the reprojection error. The comparison results show that the calibration error of this solution is significantly smaller than that of the traditional ellipse fitting method. Therefore, the center accuracy extracted by this solution is higher than that of the traditional method.

[0069] In summary, the present application combines multi-threshold iterative detection with geometric feature screening to achieve sub-pixel accuracy in circle center positioning. Its dynamic threshold adjustment mechanism can adapt to different lighting and imaging conditions. The confidence-weighted fusion algorithm is used to effectively suppress noise interference, and the hierarchical clustering strategy is used to ensure accurate identification of all calibrated circular dots under complex backgrounds. The present application effectively solves the deformation problem caused by the inclined shooting of the calibration board through the perspective transformation correction technology, so that the circle center detection is not affected by the perspective tilt. Finally, the accuracy of the extracted circle center is verified by the reprojection error. The whole set of methods significantly improves the calibration accuracy and robustness while maintaining the degree of automation, and is especially suitable for application scenarios such as high-precision vision measurement and three-dimensional reconstruction.

[0070] See Figure 5 , Figure 5 which is a schematic structural diagram of a circle center detection device for a calibration board provided by an embodiment of the present application. The device specifically includes: An acquisition module 11, configured to acquire an original calibration board image; An identification module 12, configured to identify quadrilateral corner points from the original calibration board image; A matrix determination module 13, configured to create a virtual standard square, and determine a perspective transformation matrix according to the virtual corner points of the virtual standard square and the quadrilateral corner points; A mapping module 14, configured to use the perspective transformation matrix to map the original calibration board image into a square calibration board image; A detection module 15, configured to detect a target circle contour in the square calibration board image; A merging module 16, configured to divide each target circle contour into at least one clustering subset, and generate a merged center coordinate according to the center coordinates and confidence levels of each target circle contour in each clustering subset; A coordinate determination module 17, configured to use the perspective transformation matrix and the merged center coordinate to determine the actual circle center coordinate corresponding to the original calibration board image.

[0071] As an optional embodiment, the identification module includes: A first processing unit, configured to perform binarization processing on the original calibration board image according to a first target threshold to generate a processed first binarized calibration board image; A first detection unit, configured to detect the quadrilateral contour of the first binarized calibration board image; A screening unit, configured to screen quadrilateral corner points according to the cosine values of the vertices of the quadrilateral contour; An adjustment unit, configured to adjust the first target threshold if the number of screened quadrilateral corner points is less than four, so that the first processing unit continues to perform binarization processing on the original calibration board image according to the adjusted first target threshold.

[0072] As an alternative embodiment, the center detection device further includes: A region determination module for determining a rectangular region of interest for each quadrilateral corner point with each quadrilateral corner point as the center; A processing module for performing binarization processing on each rectangular region of interest to generate a binarized image of the rectangular region; A conversion module for converting the binarized image of each rectangular region into corresponding two-dimensional point cloud data; A clustering module for determining, through a clustering algorithm, a subset of target point cloud data closest to the quadrilateral corner point in the two-dimensional point cloud data, and determining a fitted edge line segment of the subset of target point cloud data; A corner point determination module for, if the included angle between the fitted edge line segments of the target rectangular region of interest is less than an included angle threshold, using the quadrilateral corner point corresponding to the target rectangular region of interest as a triangular marked corner point; An order determination module for determining the input order of the corner points according to the triangular marked corner points; wherein, the input order of the corner points is used to determine the input order of each quadrilateral corner point when determining a perspective transformation matrix.

[0073] As an alternative embodiment, the detection module includes: A second processing unit for performing binarization processing on the square calibration plate image according to a second target threshold to generate a processed second binarized calibration plate image; wherein, the value of the second target threshold is different in each iteration process; A second detection unit for detecting an initial circle contour in the second binarized calibration plate image; A calculation unit for calculating the area and second geometric feature parameters of each initial circle contour; the second geometric feature parameters include at least one of roundness, inertia ratio, and convexity; A determination unit for, if the area of the initial circle contour is within an effective area range and the second geometric feature parameters are within an effective parameter range, using the initial circle contour as a target circle contour.

[0074] As an alternative embodiment, the center detection device further includes: A line segment determination module for performing edge detection on the square calibration plate image, extracting edge pixel points, and determining target line segments according to the edge pixel points; A search module for searching for a closed target line segment according to the first geometric feature parameters of each target line segment; if so, triggering a fitting module; A fitting module for performing circle fitting on the closed target line segment to generate a fitted target circle; A range determination module, configured to determine an area index according to the areas of the target circles, and determine an effective area range according to the area index.

[0075] As an optional embodiment, the merging module is specifically configured to: Calculate the confidence of each target circle contour according to the second geometric feature parameter of the target circle contour; calculate the center coordinates of each target circle contour according to the area and pixel value of the target circle contour; divide each target circle contour into at least one clustering subset according to the contour radius, center coordinates and center distance threshold of each target circle contour in each iteration process.

[0076] As an optional embodiment, the center detection device further includes: A judgment module, configured to judge whether the number of clustering subsets is the same as the number of standard circles; If so, trigger the coordinate determination module; if not, adjust the effective parameter range, and re-determine the target circle contour through the detection module according to the effective area range and the adjusted effective parameter range.

[0077] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.

[0078] See Figure 6 , Figure 6 which is a schematic structural diagram of an electronic device provided by an embodiment of the present application, including a processor 21, a communication interface 22, a memory 23, and a communication bus 24. Among them, the processor 21, the communication interface 22, and the memory 23 communicate with each other through the communication bus 24; The memory 23 is used to store a computer program; When the processor 21 is configured to execute the program stored on the memory 23, it implements the steps of the center detection method described in any of the above method embodiments, which will not be elaborated herein.

[0079] The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity of representation, Figure 6 only a thick line is used to represent it in [the figure], but it does not mean that there is only one bus or one type of bus.

[0080] The communication interface is used for communication between the above terminal and other devices.

[0081] The memory may include a Random Access Memory (RAM), or may also include a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0082] The aforementioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0083] In another exemplary embodiment, a computer storage medium is also provided. When the program instructions are executed by the processor, the steps of the center detection method described in any of the above method embodiments are implemented. Among them, the storage medium may include: various media that can store program codes, such as USB flash drives, mobile hard disks, Read-Only Memory (ROM), Random Access Memory (RAM), magnetic disks, or optical discs.

[0084] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and will not be elaborated herein.

[0085] It should be understood that the terms used in the text are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" as used in the text may also represent the plural form. The terms "include", "comprise", "contain", and "have" are inclusive and thus specify the presence of the stated features, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described in the text are not to be construed as necessarily requiring them to be executed in the specific order described or illustrated, unless the execution order is explicitly stated. It should also be understood that additional or alternative steps may be used.

[0086] The above are only specific embodiments of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for detecting the center of a calibration board, characterized in that, Including: Obtain the original calibration board image; Identify the quadrilateral corner points from the original calibration board image; Create a virtual standard square, and determine the perspective transformation matrix according to the virtual corner points of the virtual standard square and the quadrilateral corner points; Use the perspective transformation matrix to map the original calibration board image into a square calibration board image; Detect the target circle contours in the square calibration board image; Divide each target circle contour into at least one clustering subset, and generate combined center coordinates according to the center coordinates and confidence levels of the target circle contours in each clustering subset; Use the perspective transformation matrix and the combined center coordinates to determine the actual center coordinates corresponding to the original calibration board image.

2. The center detection method according to claim 1, characterized in that, The identifying the quadrilateral corner points from the original calibration board image includes: Perform binarization processing on the original calibration board image according to the first target threshold to generate a processed first calibration board binarized image; Detect the quadrilateral contours of the first calibration board binarized image; Filter the quadrilateral corner points according to the cosine values of the vertices of the quadrilateral contour; If the number of filtered quadrilateral corner points is less than four, adjust the first target threshold, and continue to perform the step of binarizing the original calibration board image according to the adjusted first target threshold.

3. The center detection method according to claim 1, wherein After identifying the quadrilateral corner points from the original calibration board image, it further includes: Taking each quadrilateral corner point as the center, determine the rectangular region of interest of each quadrilateral corner point; Perform binarization processing on each rectangular region of interest to generate a rectangular region binarized image; Convert each rectangular region binarized image into corresponding two-dimensional point cloud data; Through a clustering algorithm, determine the target point cloud data subset closest to the quadrilateral corner points in the two-dimensional point cloud data, and determine the fitted edge line segments of the target point cloud data subset; If the included angle between the fitted edge line segments of the detected target rectangular region of interest is less than the angle threshold, take the quadrilateral corner point corresponding to the target rectangular region of interest as the triangular marked corner point; Determine the corner point input order according to the triangular marked corner points; wherein, the corner point input order is used to determine the input order of each quadrilateral corner point when determining the perspective transformation matrix.

4. The center detection method according to any one of claims 1 to 3, characterized in that Detecting the target circle contours in the square calibration board image includes: Perform binarization processing on the square calibration board image according to the second target threshold to generate a processed second calibration board binarized image; wherein, the value of the second target threshold is different in each iteration process; Detect the initial circle contours in the second calibration board binarized image; Calculate the area and the second geometric feature parameters of each initial circle contour; the second geometric feature parameters include at least one of roundness, inertia ratio, and convexity; If the area of the initial circle contour is within the effective area range and the second geometric feature parameters are within the effective parameter range, take the initial circle contour as the target circle contour.

5. The center detection method according to claim 4, wherein The determination process of the effective area range includes: Perform edge detection on the square calibration board image, extract edge pixel points, and determine target line segments according to the edge pixel points; Search for closed target line segments according to the first geometric feature parameters of each target line segment; If so, perform circle fitting on the closed target line segment to generate a target circle after fitting; Determine an area index according to the areas of the target circles, and determine an effective area range according to the area index.

6. The center detection method according to claim 4, wherein Divide the contours of the target circles into at least one clustering subset, including: Calculate the confidence of each target circle contour according to the second geometric feature parameter of the target circle contour; Calculate the center coordinates of each target circle contour according to the area and pixel value of the target circle contour; According to the contour radius, center coordinates and center distance threshold of each target circle contour in each iteration process, divide the contours of the target circles into at least one clustering subset.

7. The center detection method according to claim 4, wherein Before determining the actual center coordinates corresponding to the original calibration plate image, it further includes: Judge whether the number of clustering subsets is the same as the number of standard circles; If so, continue to execute the step of determining the actual center coordinates corresponding to the original calibration plate image by using the perspective transformation matrix and the merged center coordinates; If not, adjust the effective parameter range, and re-determine the target circle contour according to the effective area range and the adjusted effective parameter range.

8. A calibration plate center detection device, characterized in that It includes: An acquisition module for acquiring an original calibration plate image; An identification module for identifying quadrilateral corner points from the original calibration plate image; A matrix determination module for creating a virtual standard square and determining a perspective transformation matrix according to the virtual corner points of the virtual standard square and the quadrilateral corner points; A mapping module for mapping the original calibration plate image into a square calibration plate image by using the perspective transformation matrix; A detection module for detecting the target circle contour in the square calibration plate image; A merging module for dividing the contours of the target circles into at least one clustering subset, and generating merged center coordinates according to the center coordinates and confidence of each target circle contour in each clustering subset; A coordinate determination module for determining the actual center coordinates corresponding to the original calibration plate image by using the perspective transformation matrix and the merged center coordinates.

9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory and a communication bus. Among them, the processor, the communication interface and the memory complete mutual communication through the communication bus; The memory is used for storing a computer program; The processor is used for realizing the steps of the center detection method described in any one of claims 1 to 7 when executing the program stored on the memory.

10. A computer storage medium, characterized in that, The computer storage medium stores computer executable instructions, and the computer executable instructions are used for executing the steps of the center detection method described in any one of claims 1 to 7 of the present application.

Citation Information

Patent Citations

  • Calibration board detection method and device, computer equipment and storage medium

    CN114862866A

  • Feature point extraction method and device based on circle fitting, equipment and storage medium

    CN115115619A

  • Calibration apparatus, calibration method, program for calibration, and calibration jig

    US20040170315A1

  • Object recognition method, apparatus, device and storage medium

    US20220122353A1

Cited By

  • Water surface floating object classification and measurement method based on image recognition

    CN120852885A

  • Method for evaluating reliability of convexity setting calculation result

    CN122346662A