High-precision calibration method of circular calibration board with DM code and storage medium
By using a circular calibration plate with a circular pattern and DM code, combined with a high-order equation model and connected component marking, the stability and accuracy issues of DM code recognition and circle center calibration were resolved, achieving a highly efficient improvement in calibration accuracy.
Patent Information
- Application Number
- CN202410629210.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-21
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2044-05-21
AI Technical Summary
In existing technologies, DataMatrix QR code recognition has poor stability and low accuracy in center calibration. Furthermore, Zhang Zhengyou's calibration method has poor calibration accuracy with a small number of images, and the method for extracting the center is highly complex.
A circular calibration plate with a circular pattern and DM code is used. The initial transformation matrix is calculated by identifying the world coordinates of the DM code center and the pixel coordinates of the circular pattern. The distortion is eliminated by using a high-order equation model. Combined with connected component marking and caliper circle center measurement methods, the accuracy of circle center coordinate extraction is improved.
It achieves efficient and stable DM code recognition and center coordinate extraction, improving calibration accuracy and being more efficient and accurate than Zhang Zhengyou's calibration method.
Smart Images

Figure CN120996063B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and more specifically, to a high-precision calibration method and storage medium for a circular calibration plate with DM code. Background Technology
[0002] DataMatrix QR codes (DM codes) are rectangular two-dimensional barcodes that output identification information by encoding adjacent black and white squares, and are widely used in industrial manufacturing. The calibration of a self-made DM code-embedded center calibration board mainly consists of two parts: DM code recognition and center calibration. Currently, most DM code recognition methods use morphological preprocessing and Hough transform to find straight lines, which suffers from poor stability and low adaptability. For center calibration, most methods use Zhang Zhengyou's calibration method for distortion correction, but the calibration accuracy is low when the number of calibration images is less than three, and the center extraction method is complex and unstable. Summary of the Invention
[0003] To address at least one deficiency or improvement requirement of the existing technology, this invention provides a high-precision calibration method and storage medium using a circular calibration board with a DM code. The method obtains world coordinates and pixel coordinates through a circular calibration board with a circular pattern and a DM code, then calculates a preliminary transformation matrix, and eliminates distortion through a high-order equation model. Compared with Zhang Zhengyou's calibration method, this method is more efficient and has better accuracy.
[0004] To achieve the above objectives, according to a first aspect of the present invention, a high-precision calibration method for a circular calibration plate with a DM code is provided, wherein the circular calibration plate includes a plurality of circular patterns and a DM code, and the calibration method includes: Identify the DM code and obtain the center world coordinates of the DM code based on the encoding information of the identified DM code; Get the pixel coordinates of the center of the circular pattern; The center pixel coordinates of the DM code are calculated using the pixel coordinates of the center of the circular pattern. The transformation relationship between the center world coordinates and the center pixel coordinates of the DM code is calculated using a single-step model, and used as the initial transformation matrix. The first world coordinates of all circle centers are obtained based on the initial transformation matrix. Using the first world coordinates and pixel coordinates of the circle centers, a quadratic or cubic model of the pinhole camera imaging model is constructed. After eliminating distortion using the quadratic or cubic model, the final transformation matrix is obtained.
[0005] Furthermore, the high-precision calibration method for the circular calibration plate with DM code mentioned above also includes: Adaptive binarization is performed on the calibration map to obtain the binarized image of the calibration map. The size of the connected components in the image is calculated. When the size of the connected component is between a first threshold and a second threshold, the connected component is output as the first region. Calculate the minimum bounding rectangle of the first region, and obtain the diagonal coordinates of the minimum bounding rectangle as the diagonal coordinates of the DM code; based on the diagonal coordinates, extract the corresponding region in the calibration diagram as the DM code; The DM code is identified using the dmtx open-source library to obtain the DM code's encoding information. The string of the encoding information is then segmented to obtain the world coordinates of the DM code's center. A world coordinate system is then constructed using the world coordinates of the DM code's center.
[0006] Furthermore, the high-precision calibration method for the circular calibration plate with DM code mentioned above also includes: The calibration map is enhanced with point-like structures to obtain an enhanced calibration map; The contrast of the enhanced calibration map is stretched to increase its brightness, and then adaptive binarization is performed to obtain a binarized image of the enhanced calibration map. After region filling is performed on the binarized image of the enhanced calibration map, the size and circularity of the connected components are calculated. When the size of the connected components is less than the third threshold and the circularity is less than the fourth threshold, the connected component is output as the second region. Calculate the minimum bounding rectangle of the second region, obtain the diagonal coordinates of the minimum bounding rectangle, and calculate the initial center coordinates and radius of the circle in the second region; Based on the center coordinates and radius of the circle in the second region, the sub-pixel center coordinates are obtained by fitting the circle contour measurement method using calipers, and are used as the center coordinates of the circular pattern.
[0007] Furthermore, the high-precision calibration method for the circular calibration plate with DM code mentioned above also includes: Calculate the points on the calibration map using the following formula. Euclidean distance to the center of the calibration chart: ; if Then record The first count is incremented by one; if Then record The second count is incremented by one; Otherwise, remember The third count is incremented by one; among them It is a labeled image. To calibrate the height of the graph, To define the width of the calibration plot; Traverse the marked graph ; when , Assign the value to the first count; when , Assign the value to the second counter; when , The value is assigned to the third counter; where This is a kernel diagram for filtering point-like objects. After normalizing the point-like filtering kernel map, the calibration map is convolved to obtain the enhanced calibration map.
[0008] Furthermore, the high-precision calibration method for the circular calibration plate with DM code mentioned above also includes: Based on the angle step size, traverse the angle search interval and calculate the coordinates of the upper left corner of each caliper frame: ; ; in , , , , , ;in Indicates the angle step size. Indicates the starting angle of the search. Indicates the angle at which the search ends; Indicates the number of caliper frames. and These represent the length and width of the caliper frame, respectively; the initial center coordinates are expressed as... At 0 degrees, the coordinates of the four corner points of the caliper frame are respectively , , and ; Starting from the top-left corner, the coordinates are divided into the search direction and the projection direction. Based on the current angle of the caliper frame, the cumulative pixel sum along the search direction is obtained, and the average value is calculated to obtain one row. Average grayscale distribution of the column Using vectors right Partial derivatives were used to obtain the coordinates of the candidate extremum points, and a parabolic approximation was used to fit the sub-pixel circular contour coordinates. ; Based on the subpixel circle contour coordinates, the subpixel circle center coordinates are obtained using a Hyper-based overfitting method.
[0009] Furthermore, the high-precision calibration method for the circular calibration plate with DM code mentioned above also includes: The length of the DM code is calculated based on its diagonal coordinates. Hekuan ; The search area is calculated based on the length and width of the DM code and its diagonal coordinates; the search area is such that there is exactly one circle directly above, below, to the left and to the right of the DM code. In the search area, obtain the sub-pixel center coordinates of the circles directly above, below, to the left, and to the right of the DM code. Calculate the intersection coordinates of the horizontal and vertical lines and use them as the pixel coordinates of the DM code center. Construct a pixel coordinate system based on the pixel coordinates of the DM code center.
[0010] Furthermore, the high-precision calibration method for the circular calibration plate with DM code mentioned above also includes: Let the coordinates of the upper left corner of the DM code be... The coordinates of the lower right corner are ; The length and width of the DM code are calculated using Euclidean distance: ; ; Search area starting line position Starting column position End of line position End column position .
[0011] Furthermore, the high-precision calibration method for the circular calibration plate with DM code mentioned above also includes: The linear model is represented as follows: ; ; Substitute the center world coordinates of the DM code into the linear model. Substitute the center pixel coordinates of the DM code into the linear model. To calculate the initial transformation matrix, which is derived from the coefficients in the calculated linear model. according to They are arranged in column matrices from smallest to largest.
[0012] Furthermore, the high-precision calibration method for the circular calibration plate with DM code mentioned above also includes: The quadratic model is expressed as: ; ; The cubic model is represented as follows: ; ; Multiply the pixel coordinates of the center of the circle by the initial transformation matrix to obtain the first world coordinates of the center of the circle; Substitute the pixel coordinates of the center of the circle into the quadratic model or the cubic model. Substitute the first world coordinates of the center of the circle into the quadratic model. Or the cubic model The transformation matrix of the quadratic model or the transformation matrix of the cubic model is calculated using the Jacobi iteration method; the transformation matrix of the quadratic model is derived from the calculated coefficients in the quadratic model. according to The column matrix is formed in ascending order of size. The transformation matrix of the cubic model is composed of the calculated coefficients from the cubic model. according to Arrange column matrices in ascending order; Multiply the pixel coordinates of the center of the circle by the transformation matrix of the quadratic model or the transformation matrix of the cubic model to obtain the second world coordinates of the center of the circle; Substitute the world coordinates of the center of the circle into the linear model. Substitute the pixel coordinates of the circle's center into the first-order model. The final transformation matrix is calculated; the final transformation matrix is derived from the coefficients in the calculated linear model. according to They are arranged in column matrices from smallest to largest.
[0013] According to a second aspect of the invention, a storage medium is also provided, which stores a computer program executable by an access authentication device, which, when run on the access authentication device, causes the access authentication device to perform the steps of any of the methods described above.
[0014] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects: (1) The high-precision calibration method with a circular calibration plate with DM code provided by the present invention obtains world coordinates and pixel coordinates through a circular calibration plate with a circular pattern and DM code, then calculates the preliminary transformation matrix, and eliminates distortion through a high-order equation model. Compared with Zhang Zhengyou's calibration method, it is more efficient and more accurate.
[0015] (2) The high-precision calibration method for a circular calibration board with DM code provided by the present invention divides the small region with DM code by means of connected component marking, and uses the dmtx open source library to encode and recognize the DM code in the small region, thereby achieving efficient and stable DM code recognition.
[0016] (3) The high-precision calibration method of the circular calibration plate with DM code provided by the present invention uses point enhancement and connected region filling methods to obtain the initial coordinates of the center of the circle for the high-precision extraction process of the center coordinates, and uses the caliper center measurement method to locate the sub-pixel coordinates of the center of the circle, thereby realizing the high-precision extraction of the center coordinates. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of a high-precision calibration method for a circular calibration plate with a DM code, provided in an embodiment of the present invention.
[0019] Figure 2 This is a schematic diagram of a circular calibration plate with a DM code provided in an embodiment of the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0021] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0022] like Figure 1 As shown, as a first embodiment of the present invention, a high-precision calibration method for a circular calibration plate with DM code is provided. Figure 2 The circular calibration plate used for calibration in this embodiment is shown, which includes several circular patterns and DM codes. The method of this embodiment mainly includes three aspects: DM code recognition, circular pattern recognition, and calibration process. The specific details are as follows.
[0023] For the DM code recognition step, this embodiment provides the following method. First, the calibration image... Adaptive binarization is performed to obtain the calibration map. Binarized image The adaptive binarization method in this invention calculates a segmentation threshold using the OTSU algorithm to achieve binarization. Next, the area of the connected components is calculated, and the size of the connected component area is used to determine whether the region is a circular pattern or a DM code. The specific steps in this embodiment are as follows: Define a first threshold. ,right Using 8-connected region labeling, i.e., when point When all points in a 3x3 neighborhood are equal to 255, they are marked with the same value, and the size of the connected region is obtained and denoted as . ,when lie in When defining a range, output that region as the first region. In the above steps, the first threshold... The selection of [the area] is mainly to distinguish the size of the circular pattern and the DM code. In this embodiment, the connected component corresponding to the DM code is determined by the area of the connected component, and the connected component corresponding to the circle is eliminated. The connected component area threshold can be determined as described in the specific steps above. Other changes can be made as needed. In this embodiment, the lower limit of the region threshold used to determine whether a connected region is a DM code is called the first threshold, and the upper limit is called the second threshold.
[0024] The first region obtained using the above method is typically the region corresponding to the DM code. The minimum bounding rectangle of this region is calculated, and the coordinates of the rectangle's diagonals are obtained. In this embodiment, the coordinates of the top-left corner are selected. and the coordinates of the bottom right corner The calibration diagram is obtained by intercepting the coordinates of the diagonal. In the corresponding region, the DM code encoding information is obtained using the dmtx open-source library. The world coordinates of the DM code center are then obtained by segmenting the encoded string. .
[0025] For the recognition of circular patterns, this embodiment achieves high-precision recognition by extracting the sub-pixel coordinates of the center of the circular pattern. The specific steps are as follows. First, dot-matrix enhancement is performed on the calibration image. The enhancement steps are as follows.
[0026] Define the image height of the calibration plot as Width Define the marker diagram Define enhancement coefficient Define the marker count, first count Second count Third count Point-like filter kernel diagram .
[0027] Calculate the points on the calibration chart The Euclidean distance to the center of the calibration plot is calculated using the following formula: .
[0028] if Then record , .
[0029] if Then record , .
[0030] Otherwise, remember , .
[0031] Furthermore, traverse the marked graph when , Assign the value to the first count, that is ;when , Assign the value to the second counter, that is ;when , Assign the value to the third counter, that is... Finally, the point-like objects are filtered and kernel-mapped. After normalization, the calibration map is convolved to obtain an enhanced calibration map.
[0032] The calibration map is processed by convolution using a point-like filter kernel, as shown in the following formula: ,in For convolution sum, This is the pixel offset.
[0033] Secondly, contrast stretching is performed on the enhanced calibration map to increase image brightness, while SIMD instruction set and parallel processing are used to accelerate this process. Then, OTSU segmentation is used to achieve adaptive binarization, and finally, region filling is performed, i.e., edge contours are extracted and then filled to obtain the intermediate image. .
[0034] The next step is to work on the intermediate image. Perform connected component calculation, calculate the size of all connected regions, and denot it as... Simultaneously, the circularity of the connected region is calculated, and the formula for circularity is as follows: ; in This represents the maximum Euclidean distance from all points in the region to the center of the region. The size of the connected region is represented by the number of all points in the region in this embodiment.
[0035] Whether a connected region is circular is determined based on thresholds for the circularity of the connected components and the size of the connected regions. In this embodiment, the region threshold used to determine whether a connected region is a circular pattern is denoted as the third threshold, and the circularity threshold is denoted as the fourth threshold. The fourth threshold in this embodiment is set to a value of... The area determined is called the second region, which corresponds to the area where the circular pattern is located.
[0036] The next step is to obtain the minimum bounding rectangle of the second region, obtain the coordinates of the diagonals, and calculate the initial center coordinates and radius. In this embodiment, the coordinates of the top-left corner of the minimum bounding rectangle are used. and the coordinates of the bottom right corner For example, the initial center coordinates and radius They are represented as follows: .
[0037] .
[0038] .
[0039] Furthermore, the sub-pixel center coordinates are obtained by fitting the caliper circle contour measurement method, and used as the center coordinates of the circular pattern. The caliper circle contour measurement method in this embodiment includes the following steps.
[0040] First, define the starting angle for searching the caliper frame. End of search angle Number of caliper frames caliper frame length ,width ; Calculate angle step size , Calculate the coordinates of the four corner points of the caliper frame at 0 degrees as follows: , , , .
[0041] Based on the angle step size, traverse the angle search interval and calculate the coordinates of the upper left corner of each caliper frame, represented as: .
[0042] .
[0043] in , , , , , .
[0044] Starting from the top-left corner, the coordinates are divided into the search direction and the projection direction. Based on the current angle, the cumulative pixel sum along the search direction is obtained, and the average value is calculated to obtain one row. Average grayscale distribution of the column Using vectors right Partial derivatives were used to obtain the coordinates of the candidate extremum points, and a parabolic approximation was used to fit the sub-pixel circular contour coordinates. .
[0045] Subpixel circular contour coordinates The sub-pixel center coordinates are obtained using a Hyper-based overfitting method. This process is repeated until the sub-pixel coordinates of all center points have been calculated. The coordinates are denoted as... .
[0046] For the calibration process, world coordinates and pixel coordinates have already been obtained in the aforementioned steps. This embodiment constructs a first-order model, a second-order model, and a third-order model of the pinhole camera imaging model. The initial transformation matrix is calculated using the first-order model. Then, distortion is eliminated using a quadratic or cubic model to obtain the final transformation matrix. The specific calibration steps are as follows.
[0047] First, the center pixel coordinates of the DM code need to be obtained. In this embodiment, the center pixel coordinates of the DM code are calculated using the center coordinates of the circular patterns surrounding the DM code. Therefore, the first step is to determine the search area, defining a circular pattern directly above, below, to the left, and to the right of the DM code. The search box constructed in this embodiment is as follows.
[0048] Let the coordinates of the top left corner of the DM code be... The coordinates of the lower right corner are The length and width of the DM code are calculated using Euclidean distance: . The starting line position of the search area. Starting column position End of line position End column position .
[0049] By using the sub-pixel center coordinate extraction method described above within the search box, the sub-pixel center coordinates in the four directions (up, down, left, and right) of the DM code can be obtained. Connecting the up and down centers and the left and right centers yields the intersection points of the vertical and horizontal lines. These serve as the center pixel coordinates of the DM code. If none of the four circles are found in the search box, the DM code can be discarded, and another DM code can be used for subsequent calculations.
[0050] The next step is to establish a primary model of the pinhole camera imaging model using the pixel coordinates of the DM code center and world coordinates, and to calculate the initial transformation matrix. The primary model in this embodiment is as follows: .
[0051] .
[0052] The left side of the above equation It's world coordinates, on the right. These are pixel coordinates. These are the coefficients in the model. Calculate the initial transformation matrix. During the process, the world coordinates and pixel coordinates substituted into the above formula are the center world coordinates of the DM code. and pixel coordinates The initial transformation matrix can be solved. .
[0053] Furthermore, through the initial transformation matrix All center subpixel coordinates Convert to world coordinates of the center In this embodiment, the world coordinates of the center of the circle calculated in this step are denoted as the first world coordinates.
[0054] Furthermore, using the sub-pixel coordinates of the circle center and First World Coordinates Calculate either a quadratic or cubic model. In this embodiment, either a quadratic or cubic model can be selected for distortion correction. The quadratic and cubic models are as follows: .
[0055] .
[0056] .
[0057] .
[0058] Similar to the first-order model, the left side of the second-order and third-order models represents world coordinates, and the right side represents... These are pixel coordinates. These are the coefficients in the model. The transformation matrix of the quadratic or cubic model can be obtained using the Jacobi iteration method. The Jacobi iteration method can calculate an optimal solution for the transformation matrix. Then, the calculated transformation matrix of the quadratic or cubic model is substituted into the pixel coordinates of the circle's center, i.e., the sub-pixel coordinates of the circle's center. This yields new world coordinates for the circle's center, referred to as the second world coordinates in this embodiment. Finally, using the second world coordinates and the sub-pixel coordinates of the circle's center, the model is recalculated to obtain the final transformation matrix. .
[0059] In this embodiment, the initial transformation matrix, the final transformation matrix, the transformation matrix of the quadratic model, and the transformation matrix of the cubic model are all coefficients from the aforementioned linear, quadratic, and cubic models. according to The columns are arranged in ascending order. For a linear model, this can be written as... In the form of.
[0060] .
[0061] Among them The transformation matrix, in the above implementation, is initially calculated using the coordinates of the DM code, and the final transformation matrix is calculated using the coordinates of the center of the circle. The quadratic and cubic models can be rewritten in similar forms, and the corresponding transformation matrices are those described above for the quadratic and cubic models, respectively, and will not be repeated here.
[0062] In this embodiment, the coefficients in the first-order, second-order, and third-order models are all represented by signs. Representation, symbol The purpose of using symbols to distinguish the coefficients before each term in the first-order, second-order, and third-order models does not necessarily mean that the coefficients in these three models are the same. In other words, symbols are used in the first-order, second-order, and third-order models. However, in a single model In the quadratic model and in the cubic model They are not necessarily the same; in the quadratic model In the cubic model They are not necessarily the same. In actual calculations, those skilled in the art can calculate the initial transformation matrix, the transformation matrix of the quadratic model or the transformation matrix of the cubic model, and the final transformation matrix sequentially according to the aforementioned calculation method. When calculating the transformation matrix of the quadratic model or the transformation matrix of the cubic model, it is not necessary to use the initial transformation matrix obtained from the calculation. Substitute them into the equation. Similarly, when calculating the final transformation matrix, it is not necessary to use the transformation matrix obtained from the quadratic or cubic model. Bring it into the mix.
[0063] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.
[0064] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0065] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A high-precision calibration method for a circular calibration plate with a DM code, the circular calibration plate comprising a plurality of circular patterns and a DM code, the calibration method comprising: The process of identifying the DM code and obtaining its center world coordinates based on its encoding information includes: acquiring an image of the circular calibration plate to obtain a calibration map; adaptively binarizing the calibration map to obtain a binarized image of the calibration map, calculating the size of the connected components within it, and outputting the connected component as a first region when its size is between a first threshold and a second threshold; calculating the minimum bounding rectangle of the first region and obtaining the diagonal coordinates of the minimum bounding rectangle as the diagonal coordinates of the DM code; cropping the corresponding region in the calibration map based on the diagonal coordinates as the DM code; using the dmtx open-source library to identify the DM code and obtain its encoding information; segmenting the string of encoding information to obtain the center world coordinates of the DM code; and constructing a world coordinate system based on the center world coordinates of the DM code. Get the pixel coordinates of the center of the circular pattern; The center pixel coordinates of the DM code are calculated using the pixel coordinates of the center of the circular pattern. Specifically, this includes: calculating the length and width of the DM code based on its diagonal coordinates; calculating a search area based on the length, width, and diagonal coordinates of the DM code; ensuring that there is exactly one circle directly above, below, to the left, and to the right of the DM code within the search area; obtaining the center pixel coordinates of the four circles directly above, below, to the left, and to the right of the DM code within the search area; connecting the centers of the top and bottom circles to obtain a vertical line, and connecting the centers of the left and right circles to obtain a horizontal line; calculating the coordinates of the intersection of the horizontal and vertical lines as the center pixel coordinates of the DM code; and constructing a pixel coordinate system based on the center pixel coordinates of the DM code. The transformation relationship between the center world coordinates and the center pixel coordinates of the DM code is calculated using a single-step model, and used as the initial transformation matrix. The first world coordinates of all circle centers are obtained based on the initial transformation matrix. Using the first world coordinates and pixel coordinates of the circle centers, a quadratic or cubic model of the pinhole camera imaging model is constructed. After eliminating distortion using the quadratic or cubic model, the final transformation matrix is obtained.
2. The high-precision calibration method for a circular calibration plate with DM code as described in claim 1, characterized in that: To obtain the pixel coordinates of the center of a circular pattern, specifically including: The calibration map is enhanced with point-like structures to obtain an enhanced calibration map; The contrast of the enhanced calibration map is stretched to increase its brightness, and then adaptive binarization is performed to obtain a binarized image of the enhanced calibration map. After region filling is performed on the binarized image of the enhanced calibration map, the size and circularity of the connected components are calculated. When the size of the connected components is less than the third threshold and the circularity is less than the fourth threshold, the connected component is output as the second region. Calculate the minimum bounding rectangle of the second region, obtain the diagonal coordinates of the minimum bounding rectangle, and calculate the initial center coordinates and radius of the circle in the second region; Based on the center coordinates and radius of the circle in the second region, the sub-pixel center coordinates are obtained by fitting the circle contour measurement method using calipers, and are used as the pixel coordinates of the center of the circular pattern.
3. The high-precision calibration method for a circular calibration plate with DM code as described in claim 2, characterized in that: Point enhancement is applied to the calibration map, specifically including: Calculate the points on the calibration map using the following formula. Euclidean distance to the center of the calibration chart: ; if Then record The first count is incremented by one; if Then record The second count is incremented by one; Otherwise, remember The third count is incremented by one; among them It is a labeled image. To determine the number of pixels in the vertical direction of the calibration image, To determine the number of pixels in the horizontal direction of the calibration image, It is a row index. It is a column index. For enhancement coefficient; Traverse the marked graph ; when , Assign the value to the first count; when , Assign the value to the second counter; when , The value is assigned to the third counter; where This is a kernel diagram for filtering point-like objects. After normalizing the point-like filtering kernel map, the calibration map is convolved to obtain the enhanced calibration map.
4. The high-precision calibration method for a circular calibration plate with a DM code as described in claim 2, characterized in that: The caliper circular profile measurement method specifically includes: Based on the angle step size, traverse the angle search interval and calculate the coordinates of the upper left corner of each caliper frame: ; ; in , , , , , ;in Indicates the angle step size. Indicates the starting angle of the search. Indicates the angle at which the search ends; Indicates the number of caliper frames. and These represent the length and width of the caliper frame, respectively; the initial center coordinates are expressed as... At 0 degrees, the coordinates of the four corner points of the caliper frame are respectively , , and ; Starting from the top-left corner, the coordinates are divided into the search direction and the projection direction. Based on the current angle of the caliper frame, the cumulative pixel sum along the search direction is obtained, and the average value is calculated to obtain one row. Average grayscale distribution of the column Using vectors right Partial derivatives were used to obtain the coordinates of the candidate extremum points, and a parabolic approximation was used to fit the sub-pixel circular contour coordinates. ; Based on the subpixel circle contour coordinates, the subpixel circle center coordinates are obtained using a Hyper-based overfitting method.
5. The high-precision calibration method for a circular calibration plate with a DM code as described in claim 4, characterized in that: Let the coordinates of the upper left corner of the DM code be... The coordinates of the lower right corner are ; The length and width of the DM code are calculated using Euclidean distance: ; ; Search area starting line position Starting column position End of line position End column position .
6. The high-precision calibration method for a circular calibration plate with DM code as described in claim 1, characterized in that: The linear model is represented as follows: ; ; Among them, the left side of the above formula It's world coordinates, on the right. These are pixel coordinates. These are the coefficients in the model; The calculation of the initial transformation matrix specifically includes: Substitute the center world coordinates of the DM code into the linear model. Substitute the center pixel coordinates of the DM code into the linear model. The initial transformation matrix is obtained by solving for the coefficients in the solved linear model. according to They are arranged in column matrices from smallest to largest.
7. The high-precision calibration method for a circular calibration plate with DM code as described in claim 6, characterized in that: The specific methods for obtaining the final transformation matrix include: The quadratic model is expressed as: ; ; The cubic model is represented as follows: ; ; Multiply the pixel coordinates of the center of the circle by the initial transformation matrix to obtain the first world coordinates of the center of the circle; Substitute the pixel coordinates of the center of the circle into the quadratic model or the cubic model. Substitute the first world coordinates of the center of the circle into the quadratic model. Or the cubic model The transformation matrix of the quadratic model or the transformation matrix of the cubic model is calculated using the Jacobi iteration method; the transformation matrix of the quadratic model is derived from the calculated coefficients in the quadratic model. according to The column matrix is formed in ascending order of size. The transformation matrix of the cubic model is composed of the calculated coefficients from the cubic model. according to The columns are arranged in ascending order. Multiply the pixel coordinates of the center of the circle by the transformation matrix of the quadratic model or the transformation matrix of the cubic model to obtain the second world coordinates of the center of the circle; Substitute the world coordinates of the center of the circle into the linear model. Substitute the pixel coordinates of the circle's center into the first-order model. The final transformation matrix is calculated; the final transformation matrix is derived from the coefficients in the calculated linear model. according to They are arranged in column matrices from smallest to largest.
8. A storage medium, characterized in that, It stores a computer program executable by an access authentication device, which, when run on the access authentication device, causes the access authentication device to perform the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Two-dimensional code and dot combined automatic calibration method and system
CN117152261A
