Method, device and equipment for determining angular points of checkerboard

By performing convolution and gradient analysis on the checkerboard image, combined with straight line fitting and random sampling consistency algorithm, the accuracy problem of checkerboard corner detection is solved and the accuracy of camera calibration is improved.

CN120612341APending Publication Date: 2025-09-09KUNSHAN QIUTI PHOTOELECTRIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510521827.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

When detecting corner points in a checkerboard image, the existing technology cannot accurately identify the corner points in the checkerboard image, especially when the background resolution is low or the noise is large, which affects the accuracy of camera calibration.

Method used

By convolving the initial image, the gradient magnitude and direction images in the Cartesian coordinate system are obtained. The checkerboard edge contours are classified according to the gradient information. The initial corner points are determined using the preset traversal strategy and straight line fitting, and the target corner points are further screened out through the random sampling consistency algorithm.

Benefits of technology

The detection accuracy of checkerboard corner points is improved, the accuracy of camera calibration is ensured, and the misjudgment of corner point recognition caused by noise is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120612341A_ABST
    Figure CN120612341A_ABST
Patent Text Reader

Abstract

The invention provides a method, device and equipment for determining checkerboard angular points, and the method comprises the steps: carrying out the convolution of an initial image, and determining a gradient size image and a gradient direction image; since the angular points are located at the intersection of the background and the foreground, the pixel points at the intersection are initially screened according to the gradient size image, and then the screened pixel points are classified according to the gradient direction image, so that different types of checkerboard edge contours (in different directions) can be obtained; secondly, determining an intersection point of the edge contours of the intersected checkerboard, roughly determining an initial angular point at the moment, determining straight lines passing through the initial angular point in the horizontal direction and the vertical direction in order to further improve the detection precision of the angular point, solving the two straight lines to determine an intersection point of the two straight lines, and taking the intersection point as a target intersection point; in this way, the final angular point can be accurately determined by fitting the first straight line and the second straight line and then solving, and the subsequent calibration precision of the module is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method, device and equipment for determining chessboard corner points. Background Art

[0002] Corner points, as feature points on an image, contain important information and have significant application value in image fusion and target tracking. In particular, camera calibration requires the known size of a calibration object and the correspondence between points on the object and the corresponding points in the captured image to derive the conversion relationship between the world coordinate system and the pixel coordinate system. Because checkerboard templates have known dimensions, simple features, high contrast, and ease of identification, the detection of checkerboard corner points plays a crucial role in the conversion between the world coordinate system and the camera coordinate system. The accuracy of checkerboard image corner detection directly determines the accuracy of camera calibration.

[0003] Conventional methods typically use template matching and geometric feature-based detection for corner detection. However, if the checkerboard background image has low resolution or is very noisy, these methods cannot accurately identify corners in the checkerboard image. Therefore, improving the accuracy of corner detection in checkerboard images is a pressing technical challenge. Summary of the Invention

[0004] In response to the problems existing in the prior art, the embodiments of the present invention provide a solution, device and equipment for determining the corner points of a chessboard, so as to solve or partially solve the technical problem that the prior art cannot accurately determine the corner points of the chessboard, thereby affecting the calibration accuracy of the camera module.

[0005] A first aspect of the present invention provides a method for determining checkerboard corner points, the method comprising:

[0006] Convolving the initial image to obtain a first convolution image in the X direction and a second convolution image in the Y direction of the Cartesian coordinate system; the initial image is an image obtained by photographing a checkerboard background;

[0007] Determine a gradient magnitude image and a gradient direction image according to the first convolution image and the second convolution image;

[0008] Classifying each target pixel point according to the gradient magnitude image, the gradient direction image, and a preset angle type to obtain different types of checkerboard edge contours;

[0009] Traversing the edge contours of the different types of checkerboards based on a preset traversal strategy to obtain initial corner points;

[0010] A first straight line passing through the initial corner point in the horizontal direction and a second straight line passing through the initial corner point in the vertical direction are determined, and a target corner point is determined based on the first straight line and the second straight line.

[0011] In the above solution, each pixel point is classified according to the gradient magnitude image, the gradient direction image and the preset angle type to obtain different types of checkerboard edge contours, including:

[0012] Traversing each pixel point in the gradient magnitude image, and if it is determined that the gradient value of any pixel point currently traversed is greater than a preset gradient threshold, determining the pixel point currently traversed as the target pixel point; after completing the traversal of all pixel points in the gradient magnitude image, obtaining all target pixel points;

[0013] Determine the gradient angles of all target pixels according to the gradient direction image;

[0014] Classifying all target pixel points according to the gradient angles of all target pixel points and preset angle types to obtain target pixel points of different categories;

[0015] Target pixels of each category are stored in their respective corresponding containers. For each container, the target pixels are arranged based on the coordinates of the target pixels in the container to obtain a checkerboard edge contour of the corresponding type; wherein each container contains multiple checkerboard edge contours, and the checkerboard edge contour types in different containers are different.

[0016] In the above solution, the classification of all target pixels according to their gradient angles and preset angle types includes:

[0017] If it is determined that the gradient angle of the target pixel is within a first angle range, it is determined that the target pixel belongs to a first pixel type, and the first angle range is (225, 315];

[0018] If it is determined that the gradient angle of the target pixel is within a second angle range, it is determined that the target pixel belongs to a second pixel type, and the second angle range is (135, 225];

[0019] If it is determined that the gradient angle of the target pixel is within a third angle range, it is determined that the target pixel belongs to a third pixel type, and the third angle range is (315, 360] or (0, 45];

[0020] If it is determined that the gradient angle of the target pixel point is within a fourth angle range, it is determined that the target pixel point belongs to a fourth pixel point type, and the fourth angle range is (45, 135].

[0021] In the above solution, after arranging the target pixels based on the coordinates of each target pixel in the container to obtain the corresponding checkerboard edge contour, the method further includes:

[0022] For any chessboard edge outline, determining the number of pixels included in the chessboard edge outline;

[0023] If it is determined that the number of pixel points is less than a preset number threshold, the chessboard edge outline is deleted.

[0024] In the above solution, there are four types of checkerboard edge contours. The traversal of the different types of checkerboard edge contours based on a preset traversal strategy to obtain initial corner points includes:

[0025] Add a preset number of pixels to different types of checkerboard edge outlines;

[0026] Traversing the checkerboard edge contours of two target types simultaneously to obtain a first intersection point between the checkerboard edge contours of the two target types; the checkerboard edge contours of the two target types include: any two checkerboard edge contours having an intersection point;

[0027] Traversing the remaining two types of chessboard edge contours simultaneously to obtain a second intersection point between the remaining two types of chessboard edge contours;

[0028] The initial corner point is determined according to the first intersection point and the second intersection point.

[0029] In the above solution, determining the initial corner point according to the first intersection point and the second intersection point includes:

[0030] For any first intersection point and any second intersection point, determining a first Euclidean distance between the first intersection point and the second intersection point;

[0031] If it is determined that the first Euclidean distance is less than or equal to a preset distance threshold, the first intersection point and the second intersection point are determined to be the same initial corner point.

[0032] In the above solution, determining a first straight line passing through the initial corner point in the horizontal direction and a second straight line passing through the initial corner point in the vertical direction, and determining the target corner point based on the first straight line and the second straight line includes:

[0033] For the initial corner point, pixel points included in the left and right adjacent chessboard edge contours in the horizontal direction passing through the initial corner point are fitted to obtain a first straight line;

[0034] Fitting the pixel points included in the upper and lower adjacent chessboard edge contours in the vertical direction passing through the initial corner point to obtain a second straight line;

[0035] Suppressing outliers on the first straight line and the second straight line using a random sampling consistency algorithm, and determining a third intersection point of the first straight line and the second straight line after suppressing outliers;

[0036] The third intersection point is determined as a target corner point.

[0037] In the above solution, after determining the third intersection point as the target corner point, the method further includes:

[0038] For any two adjacent target corner points, determining the second Euclidean distance between the two adjacent corner points;

[0039] If it is determined that the second Euclidean distance is less than a preset second distance threshold, determining the coordinate mean of the two adjacent target corner points;

[0040] The two adjacent target corner points are deleted, and a new target corner point is determined by taking the average of the coordinates of the two adjacent target corner points.

[0041] A second aspect of the present invention provides a device for determining chessboard corner points, the device comprising:

[0042] a convolution unit configured to convolve an initial image to obtain a first convolution image in the X direction and a second convolution image in the Y direction of a Cartesian coordinate system; the initial image being an image obtained by photographing a checkerboard background;

[0043] a first determining unit, configured to determine each gradient magnitude image and each gradient direction image according to the first convolution image and the second convolution image;

[0044] a classification unit, configured to classify each pixel point according to the gradient magnitude image, the gradient direction image, and a preset angle type to obtain different types of checkerboard edge contours;

[0045] A traversal unit, configured to traverse the edge contours of the different types of checkerboards based on a preset traversal strategy to obtain initial corner points;

[0046] The second determining unit is configured to determine a first straight line passing through the initial corner point in the horizontal direction and a second straight line passing through the initial corner point in the vertical direction, and determine the target corner point based on the first straight line and the second straight line.

[0047] According to a third aspect of the present invention, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any one of the methods described in the first aspect are implemented.

[0048] The present invention provides a method, device and equipment for determining checkerboard corner points, the method comprising: performing convolution on an initial image to obtain a first convolution image in the X direction and a second convolution image in the Y direction of a Cartesian coordinate system; the initial image is an image obtained by photographing a checkerboard background; determining a gradient magnitude image and a gradient direction image based on the first convolution image and the second convolution image; classifying each target pixel point according to the gradient magnitude image, the gradient direction image and a preset angle type to obtain different types of checkerboard edge contours; traversing the different types of checkerboard edge contours based on a preset traversal strategy to obtain an initial corner point; determining a first straight line passing through the initial corner point in the horizontal direction and a second straight line passing through the initial corner point in the vertical direction, and The target corner point is determined according to the first straight line and the second straight line. In this way, since the corner point is at the intersection of the background and the foreground, the pixel points at the intersection are initially screened according to the gradient magnitude image, and then the screened pixel points are classified according to the gradient direction image. Different types of checkerboard edge contours (different directions) can be obtained. Therefore, when the initial corner point is determined according to the checkerboard edge contour, the misjudgment of the corner point caused by noise can be reduced. In order to further improve the detection accuracy of the corner point, a straight line passing through the initial corner point in the horizontal and vertical directions is determined, and then the two straight lines are solved to determine the intersection of the two straight lines, which is the target intersection point. In this way, the final corner point can be accurately determined by fitting the first straight line and the second straight line and then solving them, thereby improving the subsequent calibration accuracy of the module. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present invention. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:

[0050] Figure 1 A schematic flow chart of a method for determining chessboard corner points according to an embodiment of the present invention is shown;

[0051] Figure 2 shows a schematic diagram of an initial image according to an embodiment of the present invention;

[0052] Figure 3 shows a first convolution image in the X direction according to one embodiment of the present invention;

[0053] Figure 4 shows a second convolution image in the Y direction according to one embodiment of the present invention;

[0054] Figure 5 shows a gradient magnitude image according to one embodiment of the present invention;

[0055] Figure 6 shows a gradient direction image according to one embodiment of the present invention;

[0056] Figure 7 A schematic diagram of a chessboard edge outline according to an embodiment of the present invention is shown;

[0057] Figures 8 to 11 Schematic diagrams of four types of chessboard edge outlines according to an embodiment of the present invention are respectively shown;

[0058] Figure 12 A schematic diagram illustrating the intersection of a checkerboard edge contour of a first pixel point type and a checkerboard edge contour of a third pixel point type according to an embodiment of the present invention is shown;

[0059] Figure 13 A schematic diagram showing a first intersection point between a checkerboard edge contour of a first pixel point type and a checkerboard edge contour of a third pixel point type according to an embodiment of the present invention is shown;

[0060] Figure 14 A schematic diagram illustrating the intersection of a second pixel type checkerboard edge contour and a fourth pixel type checkerboard edge contour according to an embodiment of the present invention is shown;

[0061] Figure 15 A schematic diagram showing a second intersection point between a checkerboard edge contour of a second pixel point type and a checkerboard edge contour of a fourth pixel point type according to an embodiment of the present invention is shown;

[0062] Figure 16 A schematic diagram of a first straight line and a second straight line according to an embodiment of the present invention is shown;

[0063] Figure 17 shows a schematic diagram of target corner points according to one embodiment of the present invention;

[0064] Figure 18 A schematic structural diagram of a device for determining chessboard corner points according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0065] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0066] The present invention provides a method for determining chessboard corner points, such as Figure 1 As shown, the method mainly includes the following steps:

[0067] S110 , performing convolution on the initial image to obtain a first convolution image in the X direction and a second convolution image in the Y direction of a Cartesian coordinate system; the initial image is an image obtained by photographing a checkerboard background.

[0068] The initial image is obtained by shooting the chessboard background. Figure 2 As shown, the initial image is convolved to obtain a first convolution image in the X direction and a second convolution image in the Y direction.

[0069] The convolution kernel in the X direction and the convolution kernel in the Y direction are different and can be set based on actual conditions. The convolution kernel in the X direction of this embodiment is shown in Table 1, and the convolution kernel in the Y direction is shown in Table 2.

[0070] Table 1

[0071] -1 0 1 -1 0 1 -1 0 1

[0072] Table 2

[0073] -1 -1 -1 0 0 0 1 1 1

[0074] After convolution, the first convolution image in the X direction is obtained as Figure 3 As shown, the second convolution image in the Y direction is Figure 4 shown.

[0075] S111: Determine a gradient magnitude image and a gradient direction image according to the first convolution image and the second convolution image.

[0076] After obtaining the first convolution image and the second convolution image, it is necessary to determine the gradient magnitude image and the gradient direction image based on the first convolution image and the second convolution image. Figure 5 As shown, the gradient direction image is as follows Figure 6 shown.

[0077] Specifically, when determining the gradient magnitude image according to the first convolution image and the second convolution image, it is implemented as follows:

[0078] Determine the gradient G of each pixel in the X direction from the first convolution image x ;

[0079] Determine the gradient G of each pixel in the Y direction from the second convolution image y ;

[0080] According to the formula Determine the gradient value G of each pixel point. After the gradient value of each pixel point is determined, a gradient magnitude image is obtained.

[0081] When the gradient direction image is determined according to the first convolution image and the second convolution image, it is implemented as follows:

[0082] According to the formula The gradient direction of each pixel is determined, and after the gradient direction of each pixel is determined, a gradient direction image is obtained.

[0083] The gradient magnitude image records the gradient value of each pixel, which is used to represent the gradient strength; the gradient direction image represents the gradient angle of each pixel, which is usually expressed in radians.

[0084] S112 , classifying each target pixel point according to the gradient magnitude image, the gradient direction image, and a preset angle type to obtain different types of checkerboard edge contours.

[0085] In one embodiment, each target pixel is classified according to the gradient magnitude image, the gradient direction image, and the preset angle type to obtain different types of checkerboard edge contours, including:

[0086] Traverse each pixel in the gradient magnitude image. If it is determined that the gradient value of any pixel currently traversed is greater than a preset gradient threshold, the currently traversed pixel is determined as the target pixel. After traversing all pixels in the gradient magnitude image, all target pixels are obtained.

[0087] Determine the gradient angles of all target pixels based on the gradient direction image;

[0088] Classify all target pixels according to their gradient angles and preset angle types to obtain target pixels of different categories;

[0089] The target pixels of each category are stored in their respective corresponding containers. For each container, the target pixels are arranged based on the coordinates of each target pixel in the container to obtain the corresponding type of checkerboard edge contour. Each container contains multiple checkerboard edge contours, and the checkerboard edge contour types in different containers are different.

[0090] Specifically, since the corner points are the intersection points of two checkerboards, and as can be seen from Figure 2 the background color is gray and the foreground color is black, there is an intersection area (transition area) of the background and foreground at the corner points. Generally speaking, the gradient value in the transition area will be relatively large, while the gradient values in other areas will be relatively small.

[0091] Therefore, in this embodiment, it is necessary to first find out the pixel points in the transition area. Then, when traversing the pixel points in the gradient magnitude image, the gradient value of the pixel point needs to be compared with a preset gradient threshold. If it is determined that the gradient value of the pixel point is greater than the preset gradient threshold, it means that the pixel point is located in the transition area, and this pixel point can be determined as the target pixel point. Among them, the preset gradient threshold can be set based on the actual situation of the initial image, for example, it can be 60.

[0092] After traversing the gradient magnitude image, all target pixel points can be obtained, and then all target pixel points are classified according to the gradient direction image to obtain target pixel points of different categories.

[0093] In one implementation, all target pixel points are classified according to the gradient angles of all target pixel points and a preset angle type, including:

[0094] If it is determined that the gradient angle of the target pixel point is within the first angle range, it is determined that the target pixel point belongs to the first pixel point type, and the first angle range is (225, 315];

[0095] If it is determined that the gradient angle of the target pixel point is within the second angle range, it is determined that the target pixel point belongs to the second pixel point type, and the second angle range is (135, 225];

[0096] If it is determined that the gradient angle of the target pixel point is within the third angle range, it is determined that the target pixel point belongs to the third pixel point type, and the third angle range is (315, 360] or (0, 45];

[0097] If it is determined that the gradient angle of the target pixel point is within the fourth angle range, it is determined that the target pixel point belongs to the fourth pixel point type, and the fourth angle range is (45, 135).

[0098] Specifically, in this embodiment, four types are predefined in advance. The first pixel point type is the first vertical direction type, the second pixel point type is the first horizontal direction type, the third pixel point type is the second vertical direction type, and the fourth pixel point type is the second horizontal direction type.

[0099] If it is determined that the gradient angle grad_angle of the target pixel point satisfies: 225 < grad_angle ≤ 315, it is determined that the target pixel point is a pixel point of the first pixel point type;

[0100] If it is determined that the gradient angle grad_angle of the target pixel satisfies: 135 < grad_angle ≤ 225, then determine that the target pixel is a pixel of the second pixel type;

[0101] If it is determined that the gradient angle grad_angle of the target pixel satisfies: 315 < grad_angle ≤ 360 or satisfies 0 < grad_angle ≤ 45, then determine that the target pixel is a pixel of the third pixel type;

[0102] If it is determined that the gradient angle grad_angle of the target pixel satisfies: 45 < grad_angle ≤ 135, then determine that the target pixel is a pixel of the fourth pixel type.

[0103] The total checkerboard edge contour map formed by the four types of pixels is as Figure 7 shown, in Figure 7 it, white represents the pixels of the first pixel type, red represents the pixels of the second pixel type, blue represents the pixels of the third pixel type, and green represents the pixels of the fourth pixel type. <00​​​​​​​​​​​​​​​​​​​If it is determined that the number of pixels is less than a preset threshold, the checkerboard edge outline is deleted.

[0108] Generally speaking, a checkerboard edge outline composed of a certain type of pixel points contains about 10 pixels. If a checkerboard edge outline contains 5 pixels, it means that this checkerboard edge outline is not the desired checkerboard edge outline. In this case, it is necessary to delete this checkerboard edge outline to improve the accuracy of the checkerboard edge outline and provide an accurate data basis for the subsequent determination of corner points.

[0109] S113 , traversing the different types of chessboard edge contours based on a preset traversal strategy to obtain initial corner points.

[0110] In one embodiment, there are four types of checkerboard edge contours. Different types of checkerboard edge contours are traversed based on a preset traversal strategy to obtain initial corner points, including:

[0111] Add a preset number of pixels to different types of checkerboard edge outlines;

[0112] Traversing the checkerboard edge contours of two target types simultaneously to obtain a first intersection point between the checkerboard edge contours of the two target types; the checkerboard edge contours of the two target types include: any two checkerboard edge contours having an intersection point;

[0113] Traversing the remaining two types of chessboard edge contours simultaneously to obtain a second intersection point between the remaining two types of chessboard edge contours;

[0114] An initial corner point is determined according to the first intersection point and the second intersection point.

[0115] Specifically, before determining the first intersection and the second intersection, in order to avoid the broken edge of the chessboard edge contour affecting the accuracy of intersection determination, the present invention can add a preset number of pixel points (for example, 2 to 3) to each type of chessboard edge contour.

[0116] After the pixel points are added, considering that the checkerboard edge contour types in the four containers are different, and there is an intersection between the vertical checkerboard edge contour and the horizontal checkerboard edge contour, this embodiment can first traverse the checkerboard edge contours of the two target types at the same time to obtain the first intersection between the checkerboard edge contours of the two target types; the checkerboard edge contours of the two target types include: any two checkerboard edge contours with an intersection. For example, the checkerboard edge contours of the two target types can be: the checkerboard edge contour of the first pixel point type and the checkerboard edge contour of the fourth pixel point type, or can be: the checkerboard edge contour of the first pixel point type and the checkerboard edge contour of the third pixel point type; or can be: the checkerboard edge contour of the first pixel point type and the checkerboard edge contour of the second pixel point type; or can be: the checkerboard edge contour of the third pixel point type and the checkerboard edge contour of the fourth pixel point type.

[0117] When the two target types of checkerboard edge contours are the checkerboard edge contours of the first pixel point type and the checkerboard edge contours of the fourth pixel point type, the remaining two types of checkerboard edge contours are the checkerboard edge contours of the second pixel point type and the checkerboard edge contours of the third pixel point type. When the two target types of checkerboard edge contours are the checkerboard edge contours of the first pixel point type and the checkerboard edge contours of the second pixel point type, the remaining two types of checkerboard edge contours are the checkerboard edge contours of the third pixel point type and the checkerboard edge contours of the fourth pixel point type.

[0118] For example, when the two target types of checkerboard edge contours are the first pixel type checkerboard edge contour and the fourth pixel type checkerboard edge contour, the remaining two types of checkerboard edge contours are the second pixel type checkerboard edge contour and the third pixel type checkerboard edge contour. After traversing the checkerboard edge contours of the two target types, the image obtained is as follows Figure 12 As shown, the first intersection point identified is Figure 13 After traversing the remaining two types of chessboard edge contours, the resulting image is as follows Figure 14 As shown, the second intersection point identified is Figure 15 shown.

[0119] In one embodiment, determining the initial corner point according to the first intersection point and the second intersection point includes:

[0120] For any first intersection point and any second intersection point, determining a first Euclidean distance between the first intersection point and the second intersection point;

[0121] If it is determined that the first Euclidean distance is less than or equal to the preset distance threshold, the first intersection point and the second intersection point are determined to be the same initial corner point.

[0122] Specifically, after obtaining the first and second intersection points, which include both corner points and non-corner points, it is necessary to traverse the first and second intersection points. For any current first intersection point, the first Euclidean distance between the current first intersection point and all second intersection points is determined. If the first Euclidean distance is less than or equal to a preset distance threshold (e.g., 5 pixels), the first and second intersection points are determined to be the same initial corner point. The initial corner point is then determined based on the positions of the first and second intersection points.

[0123] If it is determined that the first Euclidean distance is greater than the preset distance threshold, it means that one or both of the two intersection points may be non-corner points. In this case, the recognition result will be abandoned and the position of the initial corner point will not be marked.

[0124] In this way, after traversing the first and second intersection points, the non-corner points in the outer circle of the chessboard can be eliminated, thereby determining the initial corner point.

[0125] S114, determining a first straight line passing through the initial corner point in the horizontal direction and a second straight line passing through the initial corner point in the vertical direction, and determining a target corner point based on the first straight line and the second straight line.

[0126] In order to further improve the detection accuracy of corner points, the present invention needs to screen the initial corner points based on a preset correction strategy to obtain target corner points.

[0127] In one embodiment, determining a first straight line in the horizontal direction and a second straight line in the vertical direction passing through the initial corner point, and determining the target corner point based on the first straight line and the second straight line includes:

[0128] For the initial corner point, the pixel points included in the left and right adjacent checkerboard edge contours in the horizontal direction passing through the initial corner point are fitted to obtain the first straight line;

[0129] Fit the pixel points included in the upper and lower adjacent chessboard edge contours in the vertical direction passing through the initial corner point to obtain a second straight line;

[0130] Suppressing outliers on the first straight line and the second straight line using a random sampling consistency algorithm, and determining a third intersection point of the first straight line and the second straight line after suppressing outliers;

[0131] The third intersection point is determined as the target corner point.

[0132] In one embodiment, after determining the third intersection point as the target corner point, the method further includes:

[0133] For any two adjacent target corner points, determine the second Euclidean distance between the two adjacent corner points;

[0134] If it is determined that the second Euclidean distance is less than a preset second distance threshold, determining the coordinate mean of the two adjacent target corner points;

[0135] Delete two adjacent target corner points and re-determine the new target corner point by taking the average of the coordinates of the two adjacent target corner points.

[0136] Specifically, for any initial corner point, the pixels included in the left and right checkerboard edge contours of the initial corner point can be fitted as a first straight line in the horizontal direction; and the pixels included in the upper and lower checkerboard edge contours of the initial intersection point can be fitted as a second straight line in the numerical direction. Figure 16 As shown, mark 161 is the first straight line, and mark 162 is the second straight line.

[0137] In practical applications, some outliers may appear on the first and second lines. Therefore, a random sampling consistency algorithm is used to suppress outliers on the first and second lines. The coordinates of two random pixels on the first line are then used to determine the equation of the first line. The coordinates of two random pixels on the second line are then used to determine the equation of the second line. These two equations are solved to obtain the third intersection of the first and second lines after outliers have been suppressed. This third intersection is the target corner point.

[0138] In addition, in actual operation, it is possible that another corner point exists near the target corner point (the distance between the two target corner points is very close). Therefore, after determining the target corner point, the method further includes:

[0139] For any two adjacent target corner points, determine the second Euclidean distance between the two adjacent corner points;

[0140] If it is determined that the second Euclidean distance is less than a preset second distance threshold, determining the coordinate mean of the two adjacent target corner points;

[0141] Delete two adjacent target corner points and re-determine the new target corner point by taking the average of the coordinates of the two adjacent target corner points.

[0142] The preset second distance threshold may be 0.5, or may be set based on actual conditions, and is not limited here.

[0143] In this way, through the above operations, the final target corner point can be determined.

[0144] The present invention takes into account that since the corner point is at the intersection of the background and the foreground, the pixel points at the intersection are initially screened according to the gradient magnitude image, and then the screened pixel points are classified according to the gradient direction image, so that different types of checkerboard edge contours (different directions) can be obtained. Therefore, when the initial corner point is determined according to the checkerboard edge contour, the misjudgment of the corner point caused by noise can be reduced; in order to further improve the detection accuracy of the corner point, a straight line passing through the initial corner point in the horizontal direction and the vertical direction is determined, and then the two straight lines are solved to determine the intersection of the two straight lines, which is the target intersection point; in this way, the final corner point can be accurately determined by fitting the first straight line and the second straight line and then solving them, thereby improving the subsequent calibration accuracy of the module.

[0145] Based on the same inventive concept as in the above embodiment, this embodiment also provides a device for determining chessboard corner points, such as Figure 18 As shown, the device provided in the embodiment of the present application includes:

[0146] A convolution unit 181 is configured to convolve an initial image to obtain a first convolution image in the X direction and a second convolution image in the Y direction of a Cartesian coordinate system; the initial image is an image obtained by photographing a checkerboard background;

[0147] a first determining unit 182, configured to determine each gradient magnitude image and each gradient direction image according to the first convolution image and the second convolution image;

[0148] a classification unit 183, configured to classify each pixel point according to the gradient magnitude image, the gradient direction image, and a preset angle type to obtain different types of checkerboard edge contours;

[0149] A traversal unit 184 is configured to traverse the edge contours of the different types of checkerboards based on a preset traversal strategy to obtain initial corner points;

[0150] The second determining unit is configured to determine a first straight line passing through the initial corner point in the horizontal direction and a second straight line passing through the initial corner point in the vertical direction, and determine the target corner point based on the first straight line and the second straight line.

[0151] In one embodiment, the classification unit 183 is specifically configured to:

[0152] Traversing each pixel point in the gradient magnitude image, and if it is determined that the gradient value of any pixel point currently traversed is greater than a preset gradient threshold, determining the pixel point currently traversed as the target pixel point; after completing the traversal of all pixel points in the gradient magnitude image, obtaining all target pixel points;

[0153] Determine the gradient angles of all target pixels according to the gradient direction image;

[0154] Classifying all target pixel points according to the gradient angles of all target pixel points and preset angle types to obtain target pixel points of different categories;

[0155] Target pixels of each category are stored in their respective corresponding containers. For each container, the target pixels are arranged based on the coordinates of the target pixels in the container to obtain a checkerboard edge contour of the corresponding type; wherein each container contains multiple checkerboard edge contours, and the checkerboard edge contour types in different containers are different.

[0156] In one embodiment, the classification unit 183 is specifically configured to:

[0157] If it is determined that the gradient angle of the target pixel is within a first angle range, it is determined that the target pixel belongs to a first pixel type, and the first angle range is (225, 315];

[0158] If it is determined that the gradient angle of the target pixel is within a second angle range, it is determined that the target pixel belongs to a second pixel type, and the second angle range is (135, 225];

[0159] If it is determined that the gradient angle of the target pixel is within a third angle range, it is determined that the target pixel belongs to a third pixel type, and the third angle range is (315, 360] or (0, 45];

[0160] If it is determined that the gradient angle of the target pixel point is within a fourth angle range, it is determined that the target pixel point belongs to a fourth pixel point type, and the fourth angle range is (45, 135].

[0161] In one embodiment, the classification unit 183 is further configured to:

[0162] For any chessboard edge outline, determining the number of pixels included in the chessboard edge outline;

[0163] If it is determined that the number of pixel points is less than a preset number threshold, the chessboard edge outline is deleted.

[0164] In one embodiment, the traversal unit 184 is configured to:

[0165] Add a preset number of pixels to different types of checkerboard edge outlines;

[0166] Traversing the checkerboard edge contours of two target types simultaneously to obtain a first intersection point between the checkerboard edge contours of the two target types; the checkerboard edge contours of the two target types include: any two checkerboard edge contours having an intersection point;

[0167] Traversing the remaining two types of chessboard edge contours simultaneously to obtain a second intersection point between the remaining two types of chessboard edge contours;

[0168] The initial corner point is determined according to the first intersection point and the second intersection point.

[0169] In one embodiment, the traversal unit 184 is configured to:

[0170] For any first intersection point and any second intersection point, determining a first Euclidean distance between the first intersection point and the second intersection point;

[0171] If it is determined that the first Euclidean distance is less than or equal to a preset distance threshold, the first intersection point and the second intersection point are determined to be the same initial corner point.

[0172] In one embodiment, the second determining unit 185 is configured to:

[0173] For the initial corner point, pixel points included in the left and right adjacent chessboard edge contours in the horizontal direction passing through the initial corner point are fitted to obtain a first straight line;

[0174] Fitting the pixel points included in the upper and lower adjacent chessboard edge contours in the vertical direction passing through the initial corner point to obtain a second straight line;

[0175] Suppressing outliers on the first straight line and the second straight line using a random sampling consistency algorithm, and determining a third intersection point of the first straight line and the second straight line after suppressing outliers;

[0176] The third intersection point is determined as a target corner point.

[0177] In one embodiment, the second determining unit 185 is further configured to:

[0178] For any two adjacent target corner points, determining the second Euclidean distance between the two adjacent corner points;

[0179] If it is determined that the second Euclidean distance is less than a preset second distance threshold, determining the coordinate mean of the two adjacent target corner points;

[0180] The two adjacent target corner points are deleted, and a new target corner point is determined by taking the average of the coordinates of the two adjacent target corner points.

[0181] Since the device described in the embodiments of the present invention is used to implement the method for determining chessboard corner points in the embodiments of the present invention, the specific structure and variations of the device are readily apparent to those skilled in the art based on the methods described in the embodiments of the present invention, and therefore, a detailed description thereof will not be given here. All devices used in the methods of the embodiments of the present invention fall within the scope of protection of the present invention.

[0182] Based on the same inventive concept, this embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any step of the method described above is implemented.

[0183] Through one or more embodiments of the present invention, the present invention has the following beneficial effects or advantages:

[0184] The present invention provides a method, device and equipment for determining checkerboard corner points, the method comprising: performing convolution on an initial image to obtain a first convolution image in the X direction and a second convolution image in the Y direction of a Cartesian coordinate system; the initial image is an image obtained by photographing a checkerboard background; determining a gradient magnitude image and a gradient direction image based on the first convolution image and the second convolution image; classifying each pixel point according to the gradient magnitude image, the gradient direction image and a preset angle type to obtain different types of checkerboard edge contours; traversing the different types of checkerboard edge contours based on a preset traversal strategy to obtain an initial corner point; determining a first straight line in the horizontal direction and a second straight line in the vertical direction passing through the initial corner point, and classifying the first straight line in the horizontal direction and the second straight line in the vertical direction according to the first convolution image and the second convolution image; classifying each pixel point according to the gradient magnitude image, the gradient direction image and a preset angle type to obtain different types of checkerboard edge contours; traversing the different types of checkerboard edge contours based on a preset traversal strategy to obtain an initial corner point; determining a first straight line in the horizontal direction and a second straight line in the vertical direction passing through the initial corner point, and classifying the first straight line in the vertical direction according to the first convolution image and the second convolution image; classifying the first straight line in the horizontal direction and the ... The straight line and the second straight line determine the target corner point; in this way, since the corner point is at the intersection of the background and the foreground, the pixels at the intersection are initially screened according to the gradient magnitude image, and then the screened pixels are classified according to the gradient direction image, and different types of checkerboard edge contours (different directions) can be obtained. Then, when the initial corner point is determined according to the checkerboard edge contour, the misjudgment of the corner point caused by noise can be reduced; in order to further improve the detection accuracy of the corner point, the straight line in the horizontal and vertical directions passing through the initial corner point is determined, and then the two straight lines are solved to determine the intersection of the two straight lines, which is the target intersection point; in this way, the final corner point can be accurately determined by fitting the first straight line and the second straight line and then solving them, thereby improving the subsequent calibration accuracy of the module.

[0185] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general-purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing this type of system. In addition, the present invention is not directed to any specific programming language. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the above description of specific languages ​​is for the purpose of disclosing the best mode of the present invention.

[0186] In the description provided herein, numerous specific details are described. However, it is understood that embodiments of the present invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.

[0187] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Accordingly, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of the invention.

[0188] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition may be divided into multiple submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed herein may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0189] Furthermore, those skilled in the art will appreciate that although some embodiments herein include certain features included in other embodiments but not other features, combinations of features from different embodiments are intended to be within the scope of the present invention and to form different embodiments. For example, in the claims below, any of the claimed embodiments may be used in any combination.

[0190] The various component embodiments of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components in the gateway, proxy server, or system according to an embodiment of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0191] It should be noted that the above embodiments illustrate rather than limit the invention, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising several different elements and by means of suitably programmed computers. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.

[0192] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0193] The above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for determining chessboard corner points, characterized in that: The method comprises: Convolving the initial image to obtain a first convolution image in the X direction and a second convolution image in the Y direction of the Cartesian coordinate system; the initial image is an image obtained by photographing a checkerboard background; Determining a gradient magnitude image and a gradient direction image according to the first convolution image and the second convolution image; Classifying each target pixel point according to the gradient magnitude image, the gradient direction image, and a preset angle type to obtain different types of checkerboard edge contours; Traversing the edge contours of the different types of checkerboards based on a preset traversal strategy to obtain initial corner points; A first straight line passing through the initial corner point in the horizontal direction and a second straight line passing through the initial corner point in the vertical direction are determined, and a target corner point is determined based on the first straight line and the second straight line.

2. The method according to claim 1, wherein Each target pixel point is classified according to the gradient magnitude image, the gradient direction image, and the preset angle type to obtain different types of checkerboard edge contours, including: Traversing each pixel point in the gradient magnitude image, and if it is determined that the gradient value of any pixel point currently traversed is greater than a preset gradient threshold, determining the pixel point currently traversed as the target pixel point; after completing the traversal of all pixel points in the gradient magnitude image, obtaining all target pixel points; Determine the gradient angles of all target pixels according to the gradient direction image; Classifying all target pixel points according to the gradient angles of all target pixel points and preset angle types to obtain target pixel points of different categories; Target pixels of each category are stored in their respective corresponding containers. For each container, the target pixels are arranged based on the coordinates of the target pixels in the container to obtain a checkerboard edge contour of the corresponding type; wherein each container contains multiple checkerboard edge contours, and the checkerboard edge contour types in different containers are different.

3. The method according to claim 2, wherein The classifying of all target pixel points according to their gradient angles and preset angle types includes: If it is determined that the gradient angle of the target pixel is within a first angle range, it is determined that the target pixel belongs to a first pixel type, and the first angle range is (225, 315]; If it is determined that the gradient angle of the target pixel is within a second angle range, it is determined that the target pixel belongs to a second pixel type, and the second angle range is (135, 225]; If it is determined that the gradient angle of the target pixel is within a third angle range, it is determined that the target pixel belongs to a third pixel type, and the third angle range is (315, 360] or (0, 45]; If it is determined that the gradient angle of the target pixel point is within a fourth angle range, it is determined that the target pixel point belongs to a fourth pixel point type, and the fourth angle range is (45, 135].

4. The method according to claim 2, wherein After arranging the target pixels based on the coordinates of each target pixel in the container to obtain a corresponding checkerboard edge contour, the method further includes: For any chessboard edge outline, determining the number of pixels included in the chessboard edge outline; If it is determined that the number of pixel points is less than a preset number threshold, the chessboard edge outline is deleted.

5. The method according to claim 1, wherein There are four types of checkerboard edge contours. The different types of checkerboard edge contours are traversed based on a preset traversal strategy to obtain initial corner points, including: Add a preset number of pixels to different types of checkerboard edge outlines; Traversing the checkerboard edge contours of two target types simultaneously to obtain a first intersection point between the checkerboard edge contours of the two target types; the checkerboard edge contours of the two target types include: any two checkerboard edge contours having an intersection point; Traversing the remaining two types of chessboard edge contours simultaneously to obtain a second intersection point between the remaining two types of chessboard edge contours; The initial corner point is determined according to the first intersection point and the second intersection point.

6. The method according to claim 5, wherein The determining the initial corner point according to the first intersection point and the second intersection point includes: For any first intersection point and any second intersection point, determining a first Euclidean distance between the first intersection point and the second intersection point; If it is determined that the first Euclidean distance is less than or equal to a preset distance threshold, the first intersection point and the second intersection point are determined to be the same initial corner point.

7. The method according to claim 1, wherein The determining of a first straight line passing through the initial corner point in a horizontal direction and a second straight line passing through the initial corner point in a vertical direction, and determining the target corner point based on the first straight line and the second straight line includes: For the initial corner point, pixel points included in the left and right adjacent chessboard edge contours in the horizontal direction passing through the initial corner point are fitted to obtain a first straight line; Fitting the pixel points included in the upper and lower adjacent chessboard edge contours in the vertical direction passing through the initial corner point to obtain a second straight line; Suppressing outliers on the first straight line and the second straight line using a random sampling consistency algorithm, and determining a third intersection point of the first straight line and the second straight line after suppressing outliers; The third intersection point is determined as a target corner point.

8. The method according to claim 7, wherein After determining the third intersection point as a target corner point, the method further includes: For any two adjacent target corner points, determining the second Euclidean distance between the two adjacent corner points; If it is determined that the second Euclidean distance is less than a preset second distance threshold, determining the coordinate mean of the two adjacent target corner points; The two adjacent target corner points are deleted, and a new target corner point is determined by taking the average of the coordinates of the two adjacent target corner points.

9. A device for determining chessboard corner points, characterized in that: The device comprises: a convolution unit configured to convolve an initial image to obtain a first convolution image in the X direction and a second convolution image in the Y direction of a Cartesian coordinate system; the initial image being an image obtained by photographing a checkerboard background; a first determining unit, configured to determine each gradient magnitude image and each gradient direction image according to the first convolution image and the second convolution image; a classification unit, configured to classify each pixel point according to the gradient magnitude image, the gradient direction image, and a preset angle type to obtain different types of checkerboard edge contours; A traversal unit, configured to traverse the edge contours of the different types of checkerboards based on a preset traversal strategy to obtain initial corner points; The second determining unit is configured to determine a first straight line in the horizontal direction and a second straight line in the vertical direction passing through the initial corner point, and determine the target corner point based on the first straight line and the second straight line.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the method according to any one of claims 1 to 8 are implemented.