ArUco two-dimensional code corner recognition method, device, equipment, medium and product

By constructing a set of L-shaped convolution operators under multiple preset convolution kernel sizes, the weight image of the target image is convolutionized, which solves the problem of inaccurateness of the opencv library function when identifying the corner points of the ArUco QR code, and achieves more accurate corner point recognition and higher task performance.

CN120579564AActive Publication Date: 2025-09-02CENT SOUTH UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510645154.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-19
Publication Date
2025-09-02
Estimated Expiration
2045-05-19

AI Technical Summary

Technical Problem

In the prior art, the opencv library function is not accurate enough when identifying the corner points of the ArUco QR code, resulting in a degradation of the performance of subsequent tasks.

Method used

The weight image of the target image is convolutionized by using multiple sets of L-shaped convolution operators under the size of preset convolution kernels. By constructing basic and deforming L-shaped convolution operators, the corner point recognition of QR code is refined, and the features are enhanced by Gaussian blur and rotation processing are enhanced, and the contour point adjustment strategy is combined to extract more accurate corner points.

Benefits of technology

It improves the accuracy of corner point recognition of ArUco QR code and enhances the accuracy and robustness of subsequent tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120579564A_ABST
    Figure CN120579564A_ABST
Patent Text Reader

Abstract

The invention discloses an ArUco two-dimensional code corner recognition method and device, equipment, a medium and a product, and relates to the field of two-dimensional code corner recognition, and the method comprises the steps: constructing a plurality of L-shaped convolution operator sets under preset convolution kernel sizes; the L-shaped convolution operator set comprises a basic L-shaped convolution operator and a plurality of deformed L-shaped convolution operators; the basic L-shaped convolution operator is a convolution operator in which the gray values of pixel points on the connecting line of the operator center pixel point and the operator upper left corner pixel point and the connecting line of the operator center pixel point and the operator lower left corner pixel point are 1, and the other gray values are 0; performing convolution processing on the weight image by adopting an L-shaped convolution operator set, and determining the weight image of the target image after convolution based on the weight image after convolution processing; and according to the contour point set of the two-dimensional code in the weight image after convolution of the target image, determining the angular point of the two-dimensional code, so that a more accurate angular point identification result can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of two-dimensional code corner point recognition, and in particular to an ArUco two-dimensional code corner point recognition method, device, equipment, medium and product. Background Art

[0002] As precise, recognizable markers, ArUco QR codes are widely used in sensor calibration, object pose estimation, augmented reality, and robotic navigation. Accurate recognition of ArUco QR codes is crucial for the accuracy and robustness of subsequent positioning and pose estimation tasks. The accuracy of corner point recognition of the ArUco QR code's overall outline directly impacts the accuracy of the ArUco QR code's pose estimation and the success of decoding.

[0003] Related technologies use OpenCV library functions to identify and decode ArUco QR codes, obtain the corresponding corner points and code meaning of the QR code, and use this to estimate the position and posture of the plane on which the QR code is posted. However, the corner points of the ArUco QR code identified by the OpenCV library function are not accurate, resulting in reduced performance of subsequent tasks. Summary of the Invention

[0004] The purpose of this application is to provide an ArUco two-dimensional code corner point recognition method, device, equipment, medium and product, which can obtain more accurate corner point recognition results.

[0005] To achieve the above objectives, this application provides the following solutions:

[0006] In a first aspect, the present application provides an ArUco two-dimensional code corner point recognition method, comprising:

[0007] Constructing a set of L-type convolution operators under multiple preset convolution kernel sizes; the L-type convolution operator set includes a basic L-type convolution operator and multiple deformed L-type convolution operators obtained by processing the basic L-type convolution operator; the basic L-type convolution operator is a convolution operator in which the grayscale values ​​of all pixels on a first connecting line and a second connecting line are 1, and the grayscale values ​​of all pixels other than the pixels on the first connecting line and the second connecting line are 0; the first connecting line is a line connecting the center pixel point of the operator and the pixel point in the upper left corner of the operator; the second connecting line is a line connecting the center pixel point of the operator and the pixel point in the lower left corner of the operator;

[0008] Using a set of L-type convolution operators under each preset convolution kernel size, convolution processing is performed on the weighted image of the target image, and based on the weighted image after convolution processing under each preset convolution kernel size, a weighted image after convolution of the target image is determined; the target image includes one or more ArUco two-dimensional codes;

[0009] If the target image includes an ArUco two-dimensional code, determining the corner points of the ArUco two-dimensional code according to a set of contour points of the ArUco two-dimensional code in the weighted image after convolution of the target image;

[0010] If the target image includes multiple ArUco two-dimensional codes, for any ArUco two-dimensional code in the target image, the corner points of the ArUco two-dimensional code are determined according to the contour point set of the ArUco two-dimensional code in the weighted image after the convolution of the target image.

[0011] In one embodiment, the weight image determination process of the target image is: according to the formula Get the weight image of the target image, where I w Represents the weight image of the target image, I u It represents the first convolution result obtained by processing the grayscale image of the target image using the Sobel convolution operator, I v Represents the second convolution result obtained by processing the grayscale image of the target image using the transpose of the Sobel convolution operator.

[0012] In one embodiment, a set of L-type convolution operators under each preset convolution kernel size is used to perform convolution processing on the weighted image of the target image, and based on the weighted image after convolution processing under each preset convolution kernel size, a weighted image after convolution of the target image is determined, specifically including:

[0013] For any preset convolution kernel size, each L-type convolution operator in the set of L-type convolution operators under the preset convolution kernel size is used to perform convolution processing on the weighted image of the target image respectively, so as to obtain multiple convolution weighted images under the preset convolution kernel size;

[0014] Calculating an average value of the multiple convolution weight images to obtain a weight image after convolution processing under the preset convolution kernel size;

[0015] For a pixel point at any position of the weighted image after convolution of the target image, the maximum grayscale value in the grayscale value set corresponding to the pixel point at the position is determined as the grayscale value of the pixel point at the position of the weighted image after convolution of the target image; the grayscale value set corresponding to the pixel point at the position includes the grayscale values ​​corresponding to the pixel point at the position in the weighted image after convolution processing under all preset convolution kernel sizes.

[0016] In one embodiment, the process of determining the deformed L-type convolution operator is as follows:

[0017] Calculate the distance between each first target pixel and the nearest neighbor pixel in the basic L-type convolution operator to obtain the mask value corresponding to each first target pixel; the first target pixel is a pixel with a grayscale value of 0, and the nearest neighbor pixel is a pixel with a grayscale value of 1 that is closest to the first target pixel;

[0018] Determine that the mask value corresponding to each second target pixel in the basic L-type convolution operator is 0; the second target pixel is a pixel with a gray value of 1;

[0019] Obtaining a distance matrix according to the mask value corresponding to each first target pixel point and the mask value corresponding to each second target pixel point;

[0020] Constructing a first normal distribution matrix with a preset number of dimensions as variance and each value in the distance matrix as mean, and obtaining a first mask matrix based on the first normal distribution matrix;

[0021] Constructing a second normal distribution matrix with a preset number of dimensions as variance and the reciprocal of each value in the first mask matrix as mean, and obtaining a second mask matrix based on the second normal distribution matrix;

[0022] Using a second mask matrix, Gaussian blur is added to all pixels in the basic L-type convolution operator whose grayscale value is 0, and the minimum grayscale value of the basic L-type convolution operator after the Gaussian blur is added is set to be greater than 0;

[0023] The basic L-type convolution operator after adding Gaussian blur is rotated N times to obtain N deformed L-type convolution operators.

[0024] In one embodiment, determining the corner points of the ArUco two-dimensional code according to the contour point set of the ArUco two-dimensional code in the weighted image after the convolution of the target image specifically includes:

[0025] For any pixel point in the contour point set of the ArUco two-dimensional code in the weighted image after convolution of the target image, the position of the pixel point is adjusted according to the grayscale values ​​of the four neighboring points of the target pixel point to obtain the adjusted contour point set of the ArUco two-dimensional code in the weighted image after convolution of the target image; the target pixel point is the pixel point of the pixel point in the grayscale image of the target image;

[0026] The corner points of the ArUco two-dimensional code are determined based on the adjusted contour point set.

[0027] In one embodiment, if the target image includes multiple ArUco two-dimensional codes, the contour point set of each ArUco two-dimensional code in the weighted image after convolution of the target image is determined by:

[0028] De-noise and classify all pixels in the weighted image after convolution of the target image to obtain all pixels corresponding to each ArUco QR code;

[0029] Based on all pixel points corresponding to each ArUco two-dimensional code, a contour point set of each ArUco two-dimensional code in the weighted image after convolution of the target image is obtained.

[0030] In a second aspect, the present application provides an ArUco two-dimensional code corner point recognition device, comprising:

[0031] A construction module for constructing a set of L-type convolution operators under multiple preset convolution kernel sizes; the L-type convolution operator set includes a basic L-type convolution operator and multiple deformed L-type convolution operators obtained by processing the basic L-type convolution operator; the basic L-type convolution operator is a convolution operator in which the grayscale values ​​of all pixels on a first connecting line and a second connecting line are 1, and the grayscale values ​​of all pixels other than the pixels on the first connecting line and the second connecting line are 0; the first connecting line is a line connecting the center pixel of the operator and the pixel at the upper left corner of the operator; the second connecting line is a line connecting the center pixel of the operator and the pixel at the lower left corner of the operator;

[0032] A convolution module is configured to convolve a weighted image of a target image using a set of L-type convolution operators at various preset convolution kernel sizes, and determine a weighted image after convolution of the target image based on the weighted images after convolution at various preset convolution kernel sizes; the target image includes one or more ArUco QR codes;

[0033] A corner point determination module is configured to, if the target image includes an ArUco two-dimensional code, determine the corner points of the ArUco two-dimensional code based on the contour point set of the ArUco two-dimensional code in the weighted image after the target image is convolved; if the target image includes multiple ArUco two-dimensional codes, for any ArUco two-dimensional code in the target image, determine the corner points of the ArUco two-dimensional code based on the contour point set of the ArUco two-dimensional code in the weighted image after the target image is convolved.

[0034] In a third aspect, the present application provides a computer device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above-described ArUco two-dimensional code corner point recognition methods.

[0035] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the ArUco two-dimensional code corner point recognition method described in any one of the above items.

[0036] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the ArUco two-dimensional code corner point recognition method described in any one of the above items.

[0037] According to the specific embodiments provided in this application, this application has the following technical effects:

[0038] The present application provides an ArUco two-dimensional code corner point recognition method, device, equipment, medium and product. When the opencv library function extracts the corner points of the ArUco two-dimensional code, the contour obtained is not accurate, resulting in the inability to output accurate corner point recognition results when the corner point recognition is subsequently performed based on this contour. In response to this, the ArUco two-dimensional code corner point extraction method proposed in this application uses an L-type convolution operator to process the weighted image to obtain a basic contour. Compared with the contour extracted using the opencv library function, the basic contour obtained by this application is more refined because the L-type convolution operator does not directly process the original image, but further enhances the features corresponding to the two-dimensional code corner points based on the weighted image, so that a more refined basic contour can be obtained. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0040] Figure 1 A flowchart of an ArUco two-dimensional code corner point recognition method provided in one embodiment of the present application;

[0041] Figure 2 A schematic diagram illustrating the principle of an ArUco two-dimensional code corner point recognition method provided in one embodiment of the present application;

[0042] Figure 3 A schematic diagram of adjusting the outline pixels provided in an embodiment of the present application;

[0043] Figure 4 A schematic diagram of the functional modules of an ArUco two-dimensional code corner point recognition device provided in one embodiment of the present application;

[0044] Figure 5 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0046] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0047] In an exemplary embodiment, Figure 1 and Figure 2 As shown, a method for identifying corner points of an ArUco two-dimensional code is provided, comprising the following steps, wherein:

[0048] Step 201: Construct a set of L-type convolution operators under multiple preset convolution kernel sizes; the L-type convolution operator set includes a basic L-type convolution operator and multiple deformed L-type convolution operators obtained by processing the basic L-type convolution operator; the basic L-type convolution operator is a convolution operator in which the grayscale values ​​of all pixels on the first line and the second line are 1, and the grayscale values ​​of all pixels except the pixels on the first line and the second line are 0; the first line is the line connecting the center pixel point of the operator and the pixel point in the upper left corner of the operator; the second line is the line connecting the center pixel point of the operator and the pixel point in the lower left corner of the operator.

[0049] Step 202: Using a set of L-type convolution operators under each preset convolution kernel size, convolution processing is performed on the weighted image of the target image, and based on the weighted image after convolution processing under each preset convolution kernel size, a weighted image after convolution of the target image is determined; the target image includes one or more ArUco two-dimensional codes.

[0050] Step 203: If the target image includes an ArUco two-dimensional code, determine the corner points of the ArUco two-dimensional code according to the contour point set of the ArUco two-dimensional code in the weighted image after convolution of the target image.

[0051] Step 204: If the target image includes multiple ArUco QR codes, for any ArUco QR code in the target image, determine the corner points of the ArUco QR code according to the contour point set of the ArUco QR code in the weighted image after convolution of the target image.

[0052] In another exemplary embodiment of the present application, the grayscale image acquisition process of the target image is as follows:

[0053] Connect the camera to the computer, set up the camera driver, and start the camera. Before placing the camera over the target area, ensure that the camera image is compatible with the target area. Use the camera to capture the target area, obtain the target image, and convert it into a grayscale image.

[0054] In another exemplary embodiment of the present application, the weight image determination process of the target image is: according to the formula Get the weight image of the target image, where I w Represents the weight image of the target image, I u It represents the first convolution result obtained by processing the grayscale image of the target image using the Sobel convolution operator U, I v Represents the second convolution result obtained by processing the grayscale image of the target image using the transpose V of the Sobel convolution operator.

[0055] In another exemplary embodiment of the present application, the process of determining the deformed L-type convolution operator is as follows:

[0056] The distance between each first target pixel and the nearest neighbor pixel in the basic L-type convolution operator is calculated to obtain the mask value corresponding to each first target pixel; the first target pixel is a pixel with a grayscale value of 0, and the nearest neighbor pixel is a pixel with a grayscale value of 1 that is closest to the first target pixel.

[0057] Determine that the mask value corresponding to each second target pixel in the basic L-type convolution operator is 0; the second target pixel is a pixel with a grayscale value of 1.

[0058] The distance matrix is ​​obtained based on the mask value corresponding to each first target pixel and the mask value corresponding to each second target pixel. Specifically, assume that the basic L-type convolution operator is 2 rows and 2 columns, including 4 pixel values, where the mask value corresponding to the pixel in the 1st row and 1st column is m11, then the distance matrix is

[0059] Affected by noise, a first normal distribution matrix is ​​constructed with a preset number of dimensions as the variance and each value in the distance matrix as the mean, and a first mask matrix is ​​obtained based on the first normal distribution matrix. Specifically, for any value in the distance matrix, the normal distribution corresponding to the value is constructed with the value as the mean and the preset number of dimensions as the variance. The first normal distribution matrix is ​​constructed based on the normal distributions corresponding to all values ​​in the distance matrix. For any normal distribution in the first normal distribution matrix, any value with a probability between [mean - standard deviation] and [mean + standard deviation] is selected as the mask value corresponding to the normal distribution. The preset number of dimensions can be 2.

[0060] In order to ensure that the mask is sensitive to the boundaries and corners of the ArUco code during convolution, a second normal distribution matrix is ​​constructed with a preset number of dimensions as the variance and the reciprocal of each value in the first mask matrix as the mean, and a second mask matrix is ​​obtained based on the second normal distribution matrix.

[0061] A second mask matrix is ​​used to add Gaussian blur to all pixels in the basic L-type convolution operator whose grayscale value is 0, and the minimum grayscale value of the basic L-type convolution operator after adding the Gaussian blur is set to be greater than 0.

[0062] The basic L-type convolution operator after adding Gaussian blur is rotated N times to obtain N deformed L-type convolution operators.

[0063] In another exemplary embodiment of the present application, an L-type convolution operator set C={c1, c2, c3, c4} with a preset convolution kernel size l is constructed, where l is a positive single number. The specific process is:

[0064] Set the default grayscale value of each pixel in the basic L-type convolution operator to 0, then set the grayscale value of the center pixel of the operator to 1, set the grayscale value of the pixel on the straight line (first line) between the center pixel of the operator and the pixel at the upper left corner of the operator to 1, and set the grayscale value of the pixel on the straight line (second line) between the center pixel of the operator and the pixel at the lower left corner of the operator to 1, and obtain the basic L-type convolution operator c1 in the L-type convolution operator set under the preset convolution kernel size l.

[0065] For the 0-value pixel point in the basic L-type convolution operator c1, first calculate its distance to the nearest 1-value pixel point to obtain the mask value of each pixel point, then determine the mask value of the 1-value pixel point in the basic L-type convolution operator c1 to be 0, and construct a first normal distribution matrix based on the above mask value with the dimension 2 as the variance, and obtain the first mask matrix based on the first normal distribution matrix. With the preset number of dimensions as the variance and the inverse of each value in the first mask matrix as the mean, a normal distribution is fitted to obtain a second normal distribution matrix, and a second mask matrix is ​​obtained based on the second normal distribution matrix. Gaussian blur is added to all 0-value areas in the basic L-type convolution operator using the second mask matrix, and the values ​​at positions corresponding to the 0-value areas in the basic L-type convolution operator in the second mask matrix are replaced with the original 0 values ​​in the basic L-type convolution operator, and the minimum threshold is set to prevent it from being 0. The operator c1 is rotated clockwise by 90 degrees, 180 degrees and 270 degrees respectively to obtain 3 deformed L-type convolution operators c2, c3, and c4 in the L-type convolution operator set under the preset convolution kernel size l, and the required four L-type convolution operators c1, c2, c3, and c4 are obtained.

[0066] In another exemplary embodiment of the present application, a set of L-type convolution operators under various preset convolution kernel sizes is used to perform convolution processing on a weighted image of a target image, and based on the weighted images after convolution processing under various preset convolution kernel sizes, a weighted image after convolution of the target image is determined, specifically including:

[0067] For any preset convolution kernel size, each L-type convolution operator in the set of L-type convolution operators under the preset convolution kernel size is used to perform convolution processing on the weighted image of the target image respectively, so as to obtain multiple convolution weighted images under the preset convolution kernel size;

[0068] Calculate the average value of multiple convolution weight images to obtain the weight image after convolution processing under the preset convolution kernel size. Taking the preset convolution kernel size l as an example, the specific formula is expressed as in, Represents the weighted image after convolution processing under the preset convolution kernel size l.

[0069] For any pixel point at a position in the weighted image after the target image is convolved, the maximum grayscale value in the grayscale value set corresponding to the pixel point at the position is determined as the grayscale value of the pixel point at the position in the weighted image after the target image is convolved; the grayscale value set corresponding to the pixel point at the position includes the grayscale values ​​corresponding to the pixel point at the position in the weighted image after convolution processing under all preset convolution kernel sizes. Specifically: Taking the three preset convolution kernel sizes l1, l2, and l3 as examples, the weighted images after convolution processing under the corresponding preset convolution kernel sizes can be obtained through the above steps. For any pixel point at any position of the weighted image after convolution of the target image, The maximum grayscale value among the grayscale values ​​corresponding to the pixel points at the position is used as the weighted image I after the convolution of the target image c The grayscale value of the pixel at the position.

[0070] In another exemplary embodiment of the present application, if the target image includes multiple ArUco two-dimensional codes, the contour point set of each ArUco two-dimensional code in the weighted image after convolution of the target image is determined by:

[0071] Denoise and classify all pixels in the weighted image after convolution of the target image to obtain all pixels corresponding to each ArUco QR code. Specifically, use the MaxMean threshold segmentation method to convolve the weighted image I c Perform threshold segmentation to obtain a binary image I b, where the 0-value area represents the background, and the 1-value area contains the pixels corresponding to the ArUco QR code and some noise. Using the DBSCAN method, the 1-value area is processed to achieve denoising and classification, and the pixels corresponding to each ArUco QR code are obtained respectively. If the image contains n ArUco QR codes, the pixel set corresponding to the i-th ArUco QR code is P i .

[0072] Based on all the pixel points corresponding to each ArUco QR code, the contour point set of each ArUco QR code in the weighted image after convolution of the target image is obtained. Specifically: (1) Contour preservation. In two-dimensional space, P i Contains many pixel outlines in the same row and column. i The top pixel set P in each column i a , the pixel set at the bottom of each column The rightmost pixel set in each row The leftmost pixel set in each row Extract as contour point set

[0073] In another exemplary embodiment of the present application, if the target image includes an ArUco two-dimensional code, the contour point set of the ArUco two-dimensional code in the weighted image after the target image is convolved, the determination process includes: in two-dimensional space, extracting the top pixel point set of each column, the bottom pixel point set of each column, the rightmost pixel point set of each row, and the leftmost pixel point set of each row in the weighted image after the target image is convolved as the contour point set.

[0074] In another exemplary embodiment of the present application, determining the corner points of the ArUco two-dimensional code according to the contour point set of the ArUco two-dimensional code in the weighted image after the convolution of the target image specifically includes:

[0075] For any pixel point in the contour point set of the ArUco QR code in the weighted image after convolution of the target image, the position of the pixel point is adjusted according to the grayscale values ​​of the four neighboring points of the target pixel point to obtain the adjusted contour point set of the ArUco QR code in the weighted image after convolution of the target image; the target pixel point is the pixel point in the grayscale image of the target image. Specifically: (2) Contour point adjustment. For each pixel point p in the contour point set i , if p i The grayscale value in the grayscale image I is greater than the average of the grayscale values ​​of its eight nearest neighbors in I, indicating that the pixel p i If it is outside the boundary of the ArUco QR code, the position of the point needs to be adjusted. iThe gray value in the gray image I and the gray value pair p of its four neighboring points in the gray image I i The logic of the adjustment strategy is as follows: the grayscale of the ArUco QR code boundary should be the minimum value among its four nearest neighbors, which can be obtained by comparing the first-order difference d of the horizontal and vertical pixels. ub with d lr The size of is used to determine the direction of current pixel adjustment. Figure 3 As shown, p i There are four types of pixel distribution of the four nearest neighbors: Type 1, Figure 3 As shown in part (a), the absolute value of the grayscale difference between the upper and lower ends (the first-order difference of the horizontal pixels) is greater than or equal to the absolute value of the grayscale difference between the left and right ends (the first-order difference of the vertical pixels) (|d ub |≥|d lr |), and the difference d is obtained by the gray value of the upper pixel minus the gray value of the lower pixel ub ≥0, this means that the AruCo QR code boundary is below the current pixel point, and the p i The position is adjusted downward. Type 2, Figure 3 As shown in part (b), |d ub |≥|d lr | and d ub <0At this time, p i Adjust the position upward, type 3 Figure 3 As shown in part (c), |d ub |<|d lr | and d ub ≥0At this time, p i Adjust the position to the right and type 4 Figure 3 As shown in part (d), |d ub |<|d lr | and d ub <0At this time, p i Adjust the position to the left.

[0076] The corner points of the ArUco two-dimensional code are determined based on the adjusted contour point set.

[0077] The overall logic of corner point extraction is to use the contour pixels of the ArUco two-dimensional code to fit four boundaries, and the intersection points corresponding to two adjacent boundaries are the corner points corresponding to the two-dimensional code in the image. Therefore, in another exemplary embodiment of the present application, the corner points of the ArUco two-dimensional code are determined based on the adjusted contour point set, specifically including: (3) straight line fitting. Four contour lines are extracted from the contour point set using the RANSAC straight line fitting method. (4) Corner point calculation. The intersection points of two adjacent straight lines are calculated respectively, and the four intersection points obtained are the corner points of the ArUco two-dimensional code.

[0078] This application designs a dedicated L-type convolution operator to extract the contour features of the image QR code, which can more finely extract the pixels corresponding to the outer contour of the QR code. Then, through the contour adjustment strategy designed in this application, combined with the image grayscale information, the pixel positions in the outer contour of the QR code are adjusted, and most non-QR code contour pixels are removed more finely to obtain more refined ArUco QR code contour pixel points, thereby improving the accuracy of subsequent straight line fitting, and further ensuring the accuracy of the corner point calculation results.

[0079] This application can adaptively identify the number of ArUco QR codes contained in an image and batch extract the corner points of each QR code.

[0080] Based on the same inventive concept, the present application also provides an ArUco QR code corner recognition device for implementing the aforementioned ArUco QR code corner recognition method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more ArUco QR code corner recognition device embodiments provided below can be found in the above-mentioned limitations of the ArUco QR code corner recognition method and will not be repeated here.

[0081] In an exemplary embodiment, Figure 4 As shown, an ArUco two-dimensional code corner point recognition device is provided, including:

[0082] Construction module A1 is used to construct a set of L-type convolution operators under multiple preset convolution kernel sizes; the L-type convolution operator set includes a basic L-type convolution operator and multiple deformed L-type convolution operators obtained by processing the basic L-type convolution operator; the basic L-type convolution operator is a convolution operator in which the grayscale value of all pixels on the first and second lines is 1, and the grayscale value of all pixels other than the pixels on the first and second lines is 0; the first line is the line connecting the center pixel of the operator and the pixel at the upper left corner of the operator; the second line is the line connecting the center pixel of the operator and the pixel at the lower left corner of the operator;

[0083] Convolution module A2 is used to convolve the weighted image of the target image using a set of L-type convolution operators under each preset convolution kernel size, and determine the weighted image after convolution of the target image based on the weighted image after convolution under each preset convolution kernel size; the target image includes one or more ArUco two-dimensional codes;

[0084] The corner point determination module A3 is used to determine the corner points of the ArUco two-dimensional code according to the contour point set of the ArUco two-dimensional code in the weighted image after the target image is convolved if the target image includes an ArUco two-dimensional code; if the target image includes multiple ArUco two-dimensional codes, for any ArUco two-dimensional code in the target image, determine the corner points of the ArUco two-dimensional code according to the contour point set of the ArUco two-dimensional code in the weighted image after the target image is convolved.

[0085] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store ArUco two-dimensional code corner point recognition data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an ArUco two-dimensional code corner point recognition method is implemented.

[0086] Those skilled in the art will understand that Figure 5 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application and does not constitute a limitation on the computer device to which the solution of the present application is applied. A specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement. In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the above-mentioned method embodiments when executing the computer program.

[0087] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the above-mentioned method embodiments when executed by a processor.

[0088] In an exemplary embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the above method embodiments are implemented.

[0089] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0090] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0091] The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may include, but are not limited to, general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic units, data processing logic units based on quantum computing, and the like.

[0092] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0093] This document uses specific examples to illustrate the principles and implementation methods of this application. The description of the above examples is only intended to help understand the method and core concept of this application. At the same time, for those skilled in the art, based on the concept of this application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A method for identifying corner points of an ArUco two-dimensional code, characterized in that: The ArUco two-dimensional code corner point recognition method includes: Constructing a set of L-type convolution operators under multiple preset convolution kernel sizes; the L-type convolution operator set includes a basic L-type convolution operator and multiple deformed L-type convolution operators obtained by processing the basic L-type convolution operator; the basic L-type convolution operator is a convolution operator in which the grayscale values ​​of all pixels on a first connecting line and a second connecting line are 1, and the grayscale values ​​of all pixels other than the pixels on the first connecting line and the second connecting line are 0; the first connecting line is a line connecting the center pixel point of the operator and the pixel point in the upper left corner of the operator; the second connecting line is a line connecting the center pixel point of the operator and the pixel point in the lower left corner of the operator; Using a set of L-type convolution operators under each preset convolution kernel size, convolution processing is performed on the weighted image of the target image, and based on the weighted image after convolution processing under each preset convolution kernel size, a weighted image after convolution of the target image is determined; the target image includes one or more ArUco two-dimensional codes; If the target image includes an ArUco two-dimensional code, determining the corner points of the ArUco two-dimensional code according to a set of contour points of the ArUco two-dimensional code in the weighted image after convolution of the target image; If the target image includes multiple ArUco two-dimensional codes, for any ArUco two-dimensional code in the target image, the corner points of the ArUco two-dimensional code are determined according to the contour point set of the ArUco two-dimensional code in the weighted image after the convolution of the target image.

2. The ArUco two-dimensional code corner point recognition method according to claim 1, characterized in that: The weight image determination process of the target image is: According to the formula Get the weight image of the target image, where I w Represents the weight image of the target image, I u It represents the first convolution result obtained by processing the grayscale image of the target image using the Sobel convolution operator, I v Represents the second convolution result obtained by processing the grayscale image of the target image using the transpose of the Sobel convolution operator.

3. The ArUco two-dimensional code corner point recognition method according to claim 1, characterized in that: The weighted image of the target image is convolved using a set of L-type convolution operators under each preset convolution kernel size, and the weighted image after convolution of the target image is determined based on the weighted image after convolution under each preset convolution kernel size, specifically including: For any preset convolution kernel size, each L-type convolution operator in the set of L-type convolution operators under the preset convolution kernel size is used to perform convolution processing on the weighted image of the target image respectively, so as to obtain multiple convolution weighted images under the preset convolution kernel size; Calculating an average value of the plurality of convolution weight images to obtain a weight image after convolution processing under the preset convolution kernel size; For a pixel point at any position of the weighted image after convolution of the target image, the maximum grayscale value in the grayscale value set corresponding to the pixel point at the position is determined as the grayscale value of the pixel point at the position of the weighted image after convolution of the target image; the grayscale value set corresponding to the pixel point at the position includes the grayscale values ​​corresponding to the pixel point at the position in the weighted image after convolution processing under all preset convolution kernel sizes.

4. The ArUco two-dimensional code corner point recognition method according to claim 1, characterized in that: The process of determining the deformed L-type convolution operator is: Calculate the distance between each first target pixel and the nearest neighbor pixel in the basic L-type convolution operator to obtain the mask value corresponding to each first target pixel; the first target pixel is a pixel with a grayscale value of 0, and the nearest neighbor pixel is a pixel with a grayscale value of 1 that is closest to the first target pixel; Determine that the mask value corresponding to each second target pixel in the basic L-type convolution operator is 0; the second target pixel is a pixel with a gray value of 1; Obtaining a distance matrix according to the mask value corresponding to each first target pixel point and the mask value corresponding to each second target pixel point; Constructing a first normal distribution matrix with a preset number of dimensions as variance and each value in the distance matrix as mean, and obtaining a first mask matrix based on the first normal distribution matrix; Constructing a second normal distribution matrix with a preset number of dimensions as variance and the reciprocal of each value in the first mask matrix as mean, and obtaining a second mask matrix based on the second normal distribution matrix; Using a second mask matrix, Gaussian blur is added to all pixels in the basic L-type convolution operator whose grayscale value is 0, and the minimum grayscale value of the basic L-type convolution operator after the Gaussian blur is added is set to be greater than 0; The basic L-type convolution operator after adding Gaussian blur is rotated N times to obtain N deformed L-type convolution operators.

5. The ArUco two-dimensional code corner point recognition method according to claim 1, characterized in that: Determining the corner points of the ArUco two-dimensional code according to the contour point set of the ArUco two-dimensional code in the weighted image after the convolution of the target image specifically includes: For any pixel point in the contour point set of the ArUco two-dimensional code in the weighted image after convolution of the target image, the position of the pixel point is adjusted according to the grayscale values ​​of the four neighboring points of the target pixel point to obtain the adjusted contour point set of the ArUco two-dimensional code in the weighted image after convolution of the target image; the target pixel point is the pixel point of the pixel point in the grayscale image of the target image; The corner points of the ArUco two-dimensional code are determined based on the adjusted contour point set.

6. The ArUco two-dimensional code corner point recognition method according to claim 1, characterized in that: If the target image includes multiple ArUco QR codes, the contour point set of each ArUco QR code in the weighted image after convolution of the target image is determined by: De-noise and classify all pixels in the weighted image after convolution of the target image to obtain all pixels corresponding to each ArUco QR code; Based on all pixel points corresponding to each ArUco two-dimensional code, a contour point set of each ArUco two-dimensional code in the weighted image after convolution of the target image is obtained.

7. An ArUco two-dimensional code corner point recognition device, characterized in that: The ArUco two-dimensional code corner point recognition device includes: A construction module for constructing a set of L-type convolution operators under multiple preset convolution kernel sizes; the L-type convolution operator set includes a basic L-type convolution operator and multiple deformed L-type convolution operators obtained by processing the basic L-type convolution operator; the basic L-type convolution operator is a convolution operator in which the grayscale values ​​of all pixels on a first connecting line and a second connecting line are 1, and the grayscale values ​​of all pixels other than the pixels on the first connecting line and the second connecting line are 0; the first connecting line is a line connecting the center pixel of the operator and the pixel at the upper left corner of the operator; the second connecting line is a line connecting the center pixel of the operator and the pixel at the lower left corner of the operator; A convolution module is configured to convolve a weighted image of a target image using a set of L-type convolution operators at various preset convolution kernel sizes, and determine a weighted image after convolution of the target image based on the weighted images after convolution at various preset convolution kernel sizes; the target image includes one or more ArUco QR codes; A corner point determination module is configured to, if the target image includes an ArUco two-dimensional code, determine the corner points of the ArUco two-dimensional code based on the contour point set of the ArUco two-dimensional code in the weighted image after the target image is convolved; if the target image includes multiple ArUco two-dimensional codes, for any ArUco two-dimensional code in the target image, determine the corner points of the ArUco two-dimensional code based on the contour point set of the ArUco two-dimensional code in the weighted image after the target image is convolved.

8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein the processor executes the computer program to implement the ArUco two-dimensional code corner point recognition method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the ArUco two-dimensional code corner point recognition method according to any one of claims 1 to 6 is implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the ArUco two-dimensional code corner point recognition method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Corner point detection method based on circular target

    CN103606146A

  • Optical sensor calibration method and computer readable storage medium

    CN115841518A

  • Automatic photographing device based on image recognition

    CN117061868A

  • Two-dimensional code reader and two-dimensional code reading method

    JP2006107535A

  • Multi-image sharpening and denoising using lucky imaging

    US20110211758A1