Chessboard calibration plate corner point screening method and device, equipment and storage medium

By selecting corner points within a preset threshold range on a checkerboard calibration board and constructing circumscribed polygons, the accuracy problem of checkerboard corner point detection in complex environments is solved, and the robustness and ease of use of the calibration are improved.

CN119339099BActive Publication Date: 2026-02-13SHENZHEN ZMOTION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411360634.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2026-02-13
Estimated Expiration
2044-09-27

AI Technical Summary

Technical Problem

In existing technologies, the corner detection algorithm of the checkerboard calibration board has poor anti-interference ability for non-black and white checkerboard patterns in complex environments, which leads to the detection of corner points in the background and affects the accuracy of industrial camera calibration.

Method used

All corner points of the calibration board are obtained through a corner detection algorithm, a first set of corner points is constructed, and corner points within a preset threshold range are selected through feature analysis. A circumscribed polygon is constructed to enclose the calibration target area, and it is determined whether the corner point is located inside the polygon. Valid calibration points are retained.

Benefits of technology

It improves the robustness of chessboard calibration, effectively extracts corner points on the chessboard in complex environments, avoids interference from non-chessboard calibration boards, and enhances the ease of use and accuracy of calibration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119339099B_ABST
    Figure CN119339099B_ABST
Patent Text Reader

Abstract

The application discloses a chessboard calibration plate corner point screening method and device, equipment and a storage medium, and relates to the technical field of visual processing. The method comprises the following steps: acquiring all corner points of a calibration plate on a to-be-detected chessboard by using a corner point detection algorithm, and constructing a first corner point set; performing feature analysis on each corner point in the first corner point set, comparing the feature value of each corner point with a first preset threshold, retaining the corner points within the first preset threshold range to construct a second corner point set; screening a calibration target region of a black square on the chessboard calibration plate; constructing an external polygon surrounding the calibration target region; judging whether the corner points in the second corner point set are located inside the external polygon, and retaining the corner points located inside the external polygon to construct an effective calibration point set. By screening the effective region of the calibration plate, the calibration points are located only on the chessboard, and the corner points on the non-chessboard calibration plate are avoided, so that the robustness of the chessboard calibration is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of visual processing, and particularly relates to a chessboard calibration plate corner point screening method and device, equipment and a storage medium. BACKGROUND

[0002] The chessboard calibration plate is usually a plane plate printed with a black and white square grid pattern, and the corner points of each grid can be used as a significant feature point in image processing. The coordinates of these corner points are known, and their positions in the image can be detected by a corner point detection algorithm through image processing, as a feature point for industrial camera parameter calibration.

[0003] However, the corner point detection algorithm in the prior art has poor anti-interference ability for non-black and white chessboard corner points, and the corner points outside the background of the chessboard calibration plate are also detected. This requires that the background of the calibration plate image be simple and have no interference points, and that all the detected corner points be valid corner points to successfully complete the calibration of the industrial camera. However, in industrial applications, the scene is often complex and variable, and the background environment is also complex, which is not conducive to extracting valid corner points.

[0004] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY

[0005] The main purpose of the present application is to provide a chessboard calibration plate corner point screening method, device, equipment and storage medium, which aims to solve the technical problem that the existing technology is prone to extracting non-chessboard calibration plate corner points when extracting chessboard corner points in a complex environment.

[0006] To achieve the above purpose, the present application provides a chessboard calibration plate corner point screening method, which comprises:

[0007] Using a corner point detection algorithm to obtain all corner points of the calibration plate on the chessboard to be detected, and constructing a first corner point set;

[0008] Performing feature analysis on each corner point in the first corner point set, comparing the feature value of each corner point with a first preset threshold, and retaining the corner points within the first preset threshold range to construct a second corner point set;

[0009] Screening a calibration target region of a black square on the chessboard calibration plate;

[0010] Constructing an enclosing polygon surrounding the calibration target region;

[0011] determining whether the corner points in the second corner point set are inside the circumscribed polygon, and retaining the corner points inside the circumscribed polygon to construct a valid calibration point set.

[0012] In an embodiment, the step of performing feature analysis on each corner point in the first corner point set, retaining the corner points within a first preset threshold range to construct a second corner point set, by comparing the feature value of each corner point with the first preset threshold, comprises:

[0013] performing image segmentation on the checkerboard to obtain a binary image;

[0014] performing feature analysis on each corner point in the first corner point set using the binary image, determining the pair rate of pixels in the corner point field and the difference rate of black pixels;

[0015] retaining the corner points in which the pair rate of pixels and the difference rate of black pixels are both within the first preset threshold range to construct a second corner point set.

[0016] In an embodiment, after the step of performing image segmentation on the checkerboard to obtain a binary image, the method further comprises:

[0017] performing image segmentation on the checkerboard using Otsu automatic threshold to obtain a binary image;

[0018] defining the points with pixel value of 255 in the binary image as foreground target points;

[0019] converting all the foreground target points in the binary image into a foreground target region;

[0020] storing the foreground target region in the form of row coordinates of adjacent target points, starting coordinates of adjacent target points, and ending coordinates of adjacent target points.

[0021] In an embodiment, the step of screening out the calibration target region of the black square on the checkerboard calibration plate comprises:

[0022] performing morphological dilation on the image region of the checkerboard calibration plate using a rectangular structure element with a first preset size to obtain a first dilation region;

[0023] performing connected component analysis on the first dilation region to screen out the largest white connected region;

[0024] performing hole filling on the white connected region to obtain a hole filling region inside the white connected region;

[0025] performing difference set operation on the hole filling region and the white connected region to obtain a difference region;

[0026] performing morphological dilation processing on the difference area by using a rectangular structure element with a second preset size to obtain a second dilated area;

[0027] performing connected component analysis on the second dilated area to filter out a largest-area black connected region to obtain a calibration target region of the black square.

[0028] In an embodiment, the step of constructing the circumscribed polygon of the calibration target region comprises:

[0029] calculating horizontal circumscribed rectangular coordinates of the calibration target region;

[0030] filtering out a boundary point set with coordinates corresponding to the horizontal circumscribed rectangular coordinates from a point set represented by the second dilated area, and calculating a four-side barycenter point of the boundary point set;

[0031] constructing a coordinate system of the calibration target region;

[0032] generating four straight lines surrounding the calibration target region according to the coordinate system and the four-side barycenter point;

[0033] calculating an intersection point of the four straight lines surrounding the calibration target region as a four-side point, and expanding the four-side point by a preset distance in all directions according to the direction of the coordinate system to construct the circumscribed polygon.

[0034] In an embodiment, the step of constructing the coordinate system of the calibration target region comprises:

[0035] calculating a barycenter point coordinate of the second set of corner points;

[0036] selecting four coordinate system corner points closest to the barycenter point coordinate from the second set of corner points;

[0037] selecting three corner points from the four coordinate system corner points as an origin point, an x-axis point and a y-axis point of the coordinate system of the calibration target region, so that the included angle of the coordinate axes of the coordinate system satisfies a preset angle threshold and the sum of the distances between the two axis points and the origin point is minimum.

[0038] In an embodiment, the step of generating four straight lines surrounding the calibration target region according to the coordinate system and the four-side barycenter point comprises:

[0039] calculating points of the four-side barycenter point located on the left and right sides of the x-axis and the y-axis of the coordinate axes, obtaining an x-axis left point located on the left side of the x-axis and farthest from the x-axis, an x-axis right point located on the right side of the x-axis and farthest from the x-axis, an y-axis left point located on the left side of the y-axis and farthest from the y-axis, and a y-axis right point located on the right side of the y-axis and farthest from the y-axis;

[0040] calculating a coordinate axis vector according to the coordinate system angle point;

[0041] calculating straight lines passing through the x-axis left point, the x-axis right point, the y-axis left point and the y-axis right point and parallel to the coordinate axis according to the coordinate axis vector, and constructing four straight lines surrounding the calibration target area.

[0042] In addition, to achieve the above object, the present application also proposes a chessboard calibration plate angle point screening device, which comprises:

[0043] an angle point acquisition module, configured to acquire all angle points of the calibration plate on the to-be-detected chessboard using an angle point detection algorithm, and construct a first angle point set;

[0044] a primary optimization module, configured to perform feature analysis on each angle point in the first angle point set, retain angle points within a first preset threshold range by comparing feature values of each angle point with the first preset threshold, and construct a second angle point set;

[0045] a region screening module, configured to screen a calibration target area of the black square on the chessboard calibration plate;

[0046] a region construction module, configured to construct a circumscribed polygon surrounding the calibration target area;

[0047] a secondary optimization module, configured to judge whether the angle points in the second angle point set are located inside the circumscribed polygon, retain angle points located inside the circumscribed polygon, and construct an effective calibration point set.

[0048] In addition, to achieve the above object, the present application also proposes a chessboard calibration plate angle point screening device, which comprises a memory, a processor and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the chessboard calibration plate angle point screening method as described above.

[0049] In addition, to achieve the above object, the present application also proposes a storage medium, which is a computer readable storage medium, and a computer program is stored on the storage medium, and the computer program is executed by a processor to implement the steps of the chessboard calibration plate angle point screening method as described above.

[0050] The application provides a chessboard calibration plate corner point screening method. The application first acquires all corner points of a calibration plate on a to-be-detected chessboard by using a corner point detection algorithm to construct a first corner point set; performs feature analysis on each corner point in the first corner point set, compares the feature value of each corner point with a first preset threshold, retains the corner points within the first preset threshold range to construct a second corner point set; screens a calibration target region of a black square on the chessboard calibration plate; constructs an external polygon surrounding the calibration target region; judges whether the corner points in the second corner point set are located inside the external polygon, retains the corner points located inside the external polygon to construct an effective calibration point set. The effective region of the calibration plate is screened to make the calibration points only located on the chessboard, and the corner points on the non-chessboard calibration plate are avoided to improve the robustness of the chessboard calibration. BRIEF DESCRIPTION OF DRAWINGS

[0051] The drawings incorporated in the specification and forming a part thereof illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application.

[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without any creative effort.

[0053] Figure 1 A flowchart of a first embodiment of the chessboard calibration plate corner point screening method of the present application;

[0054] Figure 2 A flowchart provided for the second embodiment of the chessboard calibration plate corner point screening method of the present application;

[0055] Figure 3 A flowchart provided for the third embodiment of the chessboard calibration plate corner point screening method of the present application;

[0056] Figure 4 A chessboard diagram provided for the third embodiment of the chessboard calibration plate corner point screening method of the present application;

[0057] Figure 5 A chessboard diagram provided for the third embodiment of the chessboard calibration plate corner point screening method of the present application, in which a white connection region is screened out;

[0058] Figure 6 A calibration target region diagram provided for the third embodiment of the chessboard calibration plate corner point screening method of the present application;

[0059] Figure 7A flowchart of an outer polygon construction provided for the third embodiment of the chessboard calibration plate corner point screening method of the present application is shown in the figure;

[0060] Figure 8 A module structure diagram of the chessboard calibration plate corner point screening device of the embodiment of the present application is shown in the figure;

[0061] Figure 9 A chessboard calibration plate corner point screening device structure diagram of the hardware running environment involved in the chessboard calibration plate corner point screening method of the embodiment of the present application is shown in the figure.

[0062] The object implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0063] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0064] In order to better understand the technical solutions of the present application, the specific embodiments will be described in detail below with reference to the drawings and the specific embodiments.

[0065] The main solution of the embodiment of the present application is: using the corner point detection algorithm to obtain all the corner points of the calibration plate on the chessboard to be detected, and constructing a first corner point set; performing feature analysis on each corner point in the first corner point set, comparing the feature value of each corner point with a first preset threshold value, and retaining the corner points within the first preset threshold value to construct a second corner point set; screening out the calibration target area of the black square on the chessboard calibration plate; constructing an outer polygon surrounding the calibration target area; judging whether the corner points in the second corner point set are located inside the outer polygon, and retaining the corner points located inside the outer polygon to construct an effective calibration point set.

[0066] Since the corner point detection algorithm in the prior art has poor anti-interference ability for the corner points of the chessboard which are not black and white, the corner points outside the chessboard calibration plate will also be detected. This requires that the image background of the calibration plate be simple and have no interference points, and that all the checked corner points be effective corner points to successfully complete the calibration of the industrial camera. However, in industrial applications, the scene is often complex and the background environment is also complex, which is not conducive to extracting effective corner points.

[0067] The present application provides a solution by locating the effective area of the calibration plate to limit the effective calibration points to only belong to the chessboard, thereby avoiding the corner points on the non-chessboard calibration plate in complex environments. The effective corner points can be well extracted for the chessboard calibration plate which is positive, perspective inclined, distorted or part of which is outside the field of view, improving the ease of use and robustness of the chessboard calibration.

[0068] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or a checkerboard calibration board corner point screening device capable of performing the above functions. The following description uses a checkerboard calibration board corner point screening device as an example to illustrate this embodiment and the subsequent embodiments.

[0069] Based on this, embodiments of this application provide a method for filtering corner points of a chessboard calibration board, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the checkerboard corner point selection method of this application.

[0070] In this embodiment, the corner point selection method of the chessboard calibration board includes steps S10 to S50:

[0071] Step S10: Use a corner detection algorithm to obtain all corners of the calibration board on the chessboard to be detected, and construct the first corner set.

[0072] It should be noted that the corner detection algorithm can be an algorithm that detects points with significant features in an image (e.g., located at the intersection of multiple edges, where the pixel grayscale changes significantly in multiple directions), such as the Harris corner detection algorithm or the Shi-Tomasi corner detection algorithm.

[0073] It should be understood that the aforementioned corner detection algorithm has poor anti-interference ability for non-black and white checkerboard corners; therefore, corners in the background outside the checkerboard calibration board will also be detected. The first set of corners can be the set of all corners detected by the corner detection algorithm, including both inside and outside the checkerboard calibration board, pts = {x i y i}

[0074] Step S20: Perform feature analysis on each corner point in the first corner point set, and compare the feature value of each corner point with a first preset threshold to retain the corner points within the range of the first preset threshold to construct a second corner point set.

[0075] It should be noted that the process of performing feature analysis on the corner points can be based on the characteristics of the black and white checkerboard (e.g., the pairing rate of white pixels and the difference rate of black pixels) to initially filter the first set of corner points that satisfy the condition of being surrounded by both white and black squares. The feature value can be a numerical value used to determine whether a corner point satisfies the standard characteristic of being surrounded by both white and black squares.

[0076] It should be understood that due to the perspective tilt or distortion of the checkerboard calibration plate, the characteristic values of the corner points do not completely conform to the values of the standard corner point characteristics, and therefore the first preset threshold can be set in advance, and the corner points within the first preset threshold range can be preliminarily removed from the non-calibration plate. The reserved intersection point constructs the second corner point set pts1 = {x i ,y i}.

[0077] Step S30: screening the calibration target region of the black square of the checkerboard calibration plate.

[0078] It should be noted that the region of the black square of the checkerboard calibration plate is screened, and the region (i.e. the calibration target region) is located on the checkerboard calibration plate. For a positive, perspective tilt, distortion or a part of the checkerboard calibration plate outside the field of view, the calibration target region of the calibration plate can be determined.

[0079] It should be understood that the screening of the calibration target region can be realized by morphological dilation processing and connected domain analysis, which is not specifically limited in the embodiment.

[0080] Step S40: constructing a circumscribed polygon surrounding the calibration target region.

[0081] Step S50: judging whether the corner points in the second corner point set are located inside the circumscribed polygon, and constructing an effective calibration point set by retaining the corner points located inside the circumscribed polygon.

[0082] It should be noted that the circumscribed polygon surrounds the calibration target region, i.e. all black squares on the checkerboard calibration plate, and therefore the circumscribed polygon is on the calibration plate, and all corner points located inside the circumscribed polygon are effective corner points. Therefore, whether each corner point in the second corner point set is inside the circumscribed polygon can be judged, and the effective calibration point set is constructed by using the corner points inside the circumscribed polygon.

[0083] In this embodiment, all corner points of the calibration board on the chessboard to be detected are acquired by using a corner detection algorithm to construct a first corner point set; feature analysis is performed on each corner point in the first corner point set, and by comparing the feature value of each corner point with a first preset threshold, the corner points within the first preset threshold range are retained to construct a second corner point set; a calibration target region of the black square on the chessboard calibration board is screened out; a circumscribed polygon surrounding the calibration target region is constructed; it is judged whether the corner points in the second corner point set are located inside the circumscribed polygon, and the corner points located inside the circumscribed polygon are retained to construct an effective calibration point set. By screening out the effective region of the calibration board, the calibration points are located only on the chessboard, and the corner points on the non-chessboard calibration board are avoided, so as to improve the robustness of the chessboard calibration.

[0084] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as the above-mentioned first embodiment can be referred to the above introduction, and the following will not be repeated. On this basis, please refer to Figure 2 , Figure 2 The flowchart provided for the second embodiment of the chessboard calibration board corner point screening method of the present application is shown in the figure. In step S20, the chessboard calibration board corner point screening method comprises:

[0085] Step S201: image segmentation is performed on the chessboard to obtain a binary image.

[0086] It should be noted that the binary image can be obtained by image segmentation of the chessboard using the Otsu automatic threshold. The Otsu automatic threshold can be an image segmentation method that assumes that the image is composed of two parts of foreground and background, and the threshold is calculated to maximize the inter-class variance to segment the two parts of the image.

[0087] It should be understood that the points with a pixel value of 255 in the binary image can be defined as foreground target points, and all foreground target points in the binary image can be converted into a foreground target region. The foreground target region is stored in the form of a run set to reduce the data amount and improve the calculation performance. The run is defined as a structure of continuous adjacent pixels in an image row, that is, run r = {row, cb, ce}, wherein row is the row coordinate of the adjacent target point pixel, cb is the starting coordinate of the adjacent target point pixel, and ce is the end coordinate of the adjacent target point pixel, and the foreground target region region = {r i} is obtained.

[0088] Step S202: feature analysis is performed on each corner point in the first corner point set using the binary image, and the pair rate of the pixels in the corner point field and the difference rate of the black pixels are judged.

[0089] Step S203: retain the corner points whose pair ratio and difference ratio of black pixels are both within the first preset threshold range to construct a second corner point set.

[0090] It should be noted that in the binary image, the pixel value of a certain pixel in the field of the corner point is equal to the pixel value of the pixel on the diagonal line of the corner point, that is, the pixel is a paired pixel. Then the pixel pair ratio satisfies the formula:

[0091] PairRatio = pairNum / totalPixNum

[0092] The formula describes the pairing of the pixels in the field of the corner point. Wherein, pairRatio is the pixel pair ratio, pairNum is the number of paired pixels in the field, and totalPixNum is the total number of black and white pixels in the field.

[0093] Further, the difference ratio of the black pixels satisfies the formula:

[0094] diffRatio = abs(blackPixNum - 0.5 · totalPixNum) / (0.5 · totalPixNum)

[0095] Wherein, diffRatio is the difference ratio of the black pixels, and blackPixNum is the number of black pixels in the field.

[0096] It should be understood that for a standard normal and undistorted checkerboard calibration board, if a field size of 15 pixels is given, in the 15-pixel square field of the corner point range, the upper left part and the lower right part of the corner point are all white, and the lower left part and the upper right part of the corner point are all black, or the upper left part and the lower right part of the corner point are all black, and the lower left part and the upper right part of the corner point are all white, then the pixel pair ratio in the entire field is 100%, and the error rate of the black pixels is 0%. If the checkerboard calibration board has perspective tilt or distortion, then the pixel pair ratio will be less than 100%, and the error rate of the black pixels will be greater than 0%. The more severe the perspective tilt or distortion, the smaller the pair ratio and the greater the error rate of the black pixels. In order to satisfy that the corner point is on the calibration board, the pixel pair ratio threshold is usually selected to be 0.75, and the error rate of the black pixels is selected to be 0.35. Therefore, the pixel pair ratio and the error rate of the black pixels will be used to eliminate as much as possible the corner points that are not on the calibration board.

[0097] In the embodiment, a binary image is obtained by image segmentation on the checkerboard; feature analysis is performed on each corner point in the first corner point set by using the binary image, the pair rate of pixels in the corner point domain and the difference rate of black pixels are judged; the corner point whose pair rate of pixels and difference rate of black pixels are both within the first preset threshold range is retained to construct a second corner point set. The pair rate of white pixels and the difference rate of black pixels are used to screen the corner points, so as to remove as many corner points on the non-calibration board as possible, and most of the remaining corner points are located on the checkerboard calibration.

[0098] Based on the first embodiment and / or the second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as the above-mentioned first embodiment and second embodiment can be referred to the above description, and the subsequent description will not be repeated. On this basis, please refer to Figure 3 , Figure 3 The flowchart provided for the third embodiment of the present application is shown in the figure.

[0099] In step S30, the checkerboard calibration board corner point screening method comprises:

[0100] Step S301: The image region of the checkerboard calibration board is morphologically dilated by a rectangular structure element with a first preset size to obtain a first dilated region.

[0101] It should be noted that image dilation can expand the highlight region or white part of the image, so that the highlight region of the image after image dilation processing is larger than that before processing. This can be achieved by scanning each pixel of the image with a defined structure element of the first preset size. The first preset size can be set according to the actual image condition, which is not limited in the embodiment. The region is morphologically dilated by a rectangular structure element with a first preset size s to obtain a region dilateRe.

[0102] Step S302: The first dilated region is analyzed by connected component analysis, and the largest white connected region is screened out.

[0103] Referring to Figure 4 and Figure 5 , Figure 4 The checkerboard diagram provided for the third embodiment of the present application is shown in the figure. Figure 5 The checkerboard diagram provided for the third embodiment of the present application is shown in the figure. Figure 4 The first region 100, the second region 200 and the third region 300 in the figure are all white regions at the boundary of the calibration board, i.e. regions on the non-checkerboard calibration board. The dilated region dilateRe is analyzed by connected component analysis, and the white region is connected into a whole, and the largest region selRe is screened out.

[0104] It should be understood that the white connected region with the largest area of the circumscribed rectangle can also be screened out, and generally the white connected region with the largest area can meet the screening requirement.

[0105] Step S303: hole filling is performed on the white connected region to obtain a hole filling region inside the white connected region.

[0106] Step S304: difference set operation is performed on the hole filling region and the white connected region to obtain a difference region.

[0107] Step S305: morphological dilation processing is performed on the difference region by using a rectangular structure element with a second preset size to obtain a second dilation region.

[0108] Step S306: connected domain analysis is performed on the second dilation region, and a black connected region with the largest area is screened out to obtain a calibration target region of the black square.

[0109] Referring to Figure 6 , Figure 6 A calibration target region schematic diagram provided for the third embodiment of the chessboard grid calibration plate corner point screening method.

[0110] It should be noted that the region fullupRe is obtained by performing hole filling on selRe, difference set operation is performed on fullupRe and selRe to obtain a difference region diffRe, that is, diffRe = fullupRe-selRe. The difference region is a black square region on the calibration plate. A second dilation region dilateRe2 is obtained by using a rectangular structure element with a second preset size on the difference region diffRe. Connected domain analysis can also be performed on the region dilateRe2 and a calibration target region selRe2 that meets certain characteristics (for example, the largest area) is screened out. The black squares on the calibration plate are connected into a whole region.

[0111] Further, referring to Figure 7 , Figure 7 A flowchart of an inscribed polygon construction provided for the third embodiment of the chessboard grid calibration plate corner point screening method. Taking an inscribed quadrilateral as an example, in step S40, the chessboard grid calibration plate corner point screening method comprises:

[0112] Step S701: calculating the horizontal circumscribed rectangle coordinates of the calibration target region.

[0113] It should be noted that the upper and lower y coordinates (y top , y bottom ) and the left and right x coordinates (x left , x rightcoordinates).

[0114] Step S702: filtering out the boundary point set whose coordinate corresponding values are respectively equal to the horizontal circumscribed rectangle coordinates from the point set represented by the second dilated region, and calculating the four-side barycenter points of the boundary point set.

[0115] It should be noted that the point set whose coordinate corresponding values are respectively equal to y top , y bottom , x left , x right are filtered out from the point set represented by the second dilated region dilateRe2 in the above step, and then the barycenter points of the point set are respectively calculated, which are defined as topPt, bottomPt, leftPt and rightPt points.

[0116] Step S703: constructing the coordinate system of the calibration target region.

[0117] It should be noted that the barycenter of the second corner point set pts1={x i , y i} can be calculated, which is recorded as gxy={x ave , y ave}, and the four coordinate system corner points closest to the barycenter point coordinates are taken from the second corner point set; three corner points are taken from the four coordinate system corner points as the origin originPt, x-axis point axisxPt and y-axis point axisyPt of the coordinate system of the calibration target region, which can constitute 12 different coordinate systems in total. One coordinate system is selected, in which the difference between the included angle of the coordinate axes and 90 degrees satisfies a certain threshold value, and the sum of the distances between the two axis points and the origin is the smallest. The x-axis line is obtained as lx=a1·x+b1·y+c1, and the y-axis line is obtained as ly=a2·x+b2·y+c2.

[0118] Step S704: generating four straight lines surrounding the calibration target region according to the coordinate system and the four-side barycenter points.

[0119] It should be noted that the points located on the left and right sides of the x-axis and y-axis of the coordinate axes among the four-side barycenter points can be calculated, the x-axis left point xleftPt located on the left side of the x-axis and farthest from the x-axis, the x-axis right point xrightPt located on the right side of the x-axis and farthest from the x-axis, the y-axis left point yleftPt located on the left side of the y-axis and farthest from the y-axis, and the y-axis right point yrightPt located on the right side of the y-axis and farthest from the y-axis are obtained.

[0120] It should be understood that the four edges of the top point (topPt, bottomPt, leftPt, rightPt) are substituted into the above straight line lx and straight line ly formula, where a·xi+b·yi+c>0 is the left point of the straight line, a·xi+b·yi+c<0 is the right point of the straight line.

[0121] Further, the coordinate axis vector can be calculated according to the coordinate system corner points (originPt, axisxPt and axisyPt); wherein the X-axis vector axisxVec satisfies the formula:

[0122] axisxVec=[axisxPt.x-originPt.x, axisyPt.y-originPt.y]

[0123] The Y-axis vector axisxVec satisfies the formula:

[0124] axisyVec=[axisyPt.x-originPt.x, axisyPt.y-orighinPt.y]

[0125] Further, the straight lines passing through the left edge point of the x-axis, the right edge point of the x-axis, the left edge point of the y-axis and the right edge point of the y-axis and parallel to the coordinate axis can be calculated according to the coordinate axis vector, respectively, to construct four straight lines surrounding the calibration target area. The straight line passing through the xleftPt and xrightPt points is parallel to the vector axisxVec, the straight line passing through the xleftPt is the upper line topLine, the straight line passing through the xrightPt is the lower line bottomLine, the straight line passing through the yleftPt and yrightPt points is parallel to the axisyVec, the straight line passing through the yleftPt is the left line leftLine, and the straight line passing through the yrightPt is the right line rightLine.

[0126] Step S705: Calculate the intersection points of the four straight lines surrounding the calibration target area as the four edges, and expand the four edges according to the direction of the coordinate system by a predetermined distance to construct the circumscribed polygon.

[0127] It should be noted that the intersection point p1 of topLine and leftLine can be calculated; the intersection point p2 of topLine and rightLine; the intersection point p3 of bottomLine and leftLine; the intersection point p4 of bottomLine and rightLine. p1, p2, p3, p4 are expanded a certain distance according to the direction of the coordinate system to fully surround the black square region. The distance of expansion is a certain percentage of the distance between the coordinate axis point and the origin of the coordinate system, for example, it can be 10%.

[0128] It should be understood that whether the midpoint in pts1 = {x i ,y i} is in the polygon can be determined according to the circumscribed quadrilateral composed of p1, p2, p3, and p4, and if so, the valid calibration point set pts2 = {x i ,y i} is retained.

[0129] In this embodiment, the horizontal circumscribed rectangle coordinates of the calibration target region are calculated; the boundary point set whose coordinate corresponding values are equal to the horizontal circumscribed rectangle coordinates is filtered out from the point set represented by the second inflation region, the four-edge barycenter point of the boundary point set is calculated; the coordinate system of the calibration target region is constructed; the four straight lines surrounding the calibration target region are generated according to the coordinate system and the four-edge barycenter point; the intersection point of the four straight lines surrounding the calibration target region is calculated as a four-edge point, and the four-edge point is expanded by a preset distance according to the direction of the coordinate system, thereby constructing the circumscribed polygon. By positioning the effective region of the calibration board, the effective calibration points are limited to only the chessboard grid, thereby avoiding the corner points on the non-chessboard grid calibration board in a complex environment. The effective corner points can be well extracted for the chessboard grid calibration board that is positive, perspective inclined, distorted, or partially outside the field of view, thereby improving the ease of use and robustness of the chessboard grid calibration.

[0130] It should be noted that the above examples are only used for understanding the present application and do not constitute a limitation on the method for screening corner points of a chessboard grid calibration board. More forms of simple transformation based on this technical concept are within the protection scope of the present application.

[0131] The present application also provides a device for screening corner points of a chessboard grid calibration board, which is described in detail with reference to Figure 8 The device for screening corner points of a chessboard grid calibration board comprises:

[0132] A corner point acquisition module 10 is configured to acquire all corner points of a calibration board on a to-be-detected chessboard grid using a corner point detection algorithm and construct a first corner point set.

[0133] A primary optimization module 20 is configured to perform feature analysis on each corner point in the first corner point set, compare the feature value of each corner point with a first preset threshold value, and retain the corner points within the first preset threshold value to construct a second corner point set.

[0134] A region screening module 30 is configured to screen a calibration target region of a black square on a chessboard grid calibration board.

[0135] A region construction module 40 is configured to construct a circumscribed polygon surrounding the calibration target region.

[0136] The secondary optimization module 50 is configured to determine whether the corner points in the second corner point set are inside the circumscribed polygon, and to retain the corner points inside the circumscribed polygon to construct an effective calibration point set.

[0137] Optionally, the primary optimization module 20 is further configured to perform image segmentation on the checkerboard to obtain a binary image, perform feature analysis on each corner point in the first corner point set by using the binary image, determine the pair rate of pixels and the difference rate of black pixels in the corner point region, and retain the corner points with the pair rate of pixels and the difference rate of black pixels both within the first preset threshold range to construct a second corner point set.

[0138] Optionally, the primary optimization module 20 is further configured to perform image segmentation on the checkerboard by using Otsu automatic threshold to obtain a binary image, define the points with a pixel value of 255 in the binary image as foreground target points, convert all the foreground target points in the binary image into a foreground target region, and store the foreground target region in the form of the row coordinates of adjacent target points, the starting coordinates of adjacent target points, and the ending coordinates of adjacent target points.

[0139] Optionally, the region screening module 30 is further configured to perform morphological dilation on the image region of the checkerboard calibration board by using a rectangular structure element with a first preset size to obtain a first dilated region, perform connected domain analysis on the first dilated region to screen out a largest white connected region in area, perform hole filling on the white connected region to obtain a hole filling region inside the white connected region, perform difference set operation on the hole filling region and the white connected region to obtain a difference region, perform morphological dilation on the difference region by using a rectangular structure element with a second preset size to obtain a second dilated region, and perform connected domain analysis on the second dilated region to screen out a largest black connected region in area to obtain a calibration target region of black squares.

[0140] Optionally, the region construction module 40 is further configured to calculate the horizontal circumscribed rectangle coordinates of the calibration target region, screen out a boundary point set with coordinates corresponding values equal to the horizontal circumscribed rectangle coordinates from a point set represented by the second dilated region, calculate the four-side barycentric points of the boundary point set, construct a coordinate system of the calibration target region, generate four straight lines surrounding the calibration target region according to the coordinate system and the four-side barycentric points, calculate the intersection points of the four straight lines surrounding the calibration target region as four-side points, and expand the four-side points according to the direction of the coordinate system by a preset distance to construct the circumscribed polygon.

[0141] Optionally, the region construction module 40 is further configured to calculate a barycentric point coordinate of the second set of corner points; select four coordinate system corner points closest to the barycentric point coordinate from the second set of corner points; select three corner points from the four coordinate system corner points as an origin, an x-axis point and a y-axis point of a coordinate system of the calibration target region, so that a coordinate axis included angle of the coordinate system meets a preset angle threshold and a sum of distances between the two axis points and the origin is minimum.

[0142] Optionally, the region construction module 40 is further configured to calculate points on the left and right sides of the x-axis and the y-axis of the coordinate axis from the four barycentric points, obtain an x-axis left side point farthest from the x-axis on the left side of the x-axis, an x-axis right side point farthest from the x-axis on the right side of the x-axis, obtain a y-axis left side point farthest from the y-axis on the left side of the y-axis, and a y-axis right side point farthest from the y-axis on the right side of the y-axis; calculate a coordinate axis vector according to the coordinate system corner points; calculate straight lines passing through the x-axis left side point, the x-axis right side point, the y-axis left side point and the y-axis right side point and parallel to the coordinate axis according to the coordinate axis vector, and construct four straight lines surrounding the calibration target region.

[0143] The chessboard calibration plate corner point screening device provided in the application adopts the chessboard calibration plate corner point screening method in the above embodiments, and can solve the technical problem that non-chessboard calibration plate corner points are easily extracted when extracting chessboard corner points in a complex environment. Compared with the prior art, the chessboard calibration plate corner point screening device provided in the application has the same beneficial effects as the chessboard calibration plate corner point screening method provided in the above embodiments, and other technical features in the chessboard calibration plate corner point screening device are the same as the features disclosed in the above embodiments, and will not be repeated here.

[0144] The application provides a chessboard calibration plate corner point screening device, which comprises at least one processor and a memory in communication connection with the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the chessboard calibration plate corner point screening method in the above embodiment one.

[0145] Reference will be made to the following description Figure 9The diagram illustrates a structural schematic suitable for implementing a checkerboard corner point filtering device according to embodiments of this application. The checkerboard corner point filtering device in embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 9 The checkerboard calibration board corner point screening device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0146] like Figure 9 As shown, the checkerboard calibration board corner point screening device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the checkerboard calibration board corner point screening device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the checkerboard corner point screening device to communicate wirelessly or wiredly with other devices to exchange data. Although checkerboard corner point screening devices with various systems are shown in the figures, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.

[0147] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for executing the method shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network through a communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiments disclosed in the present application are executed.

[0148] The chessboard calibration board corner point screening device provided by the present application adopts the chessboard calibration board corner point screening method in the above-mentioned embodiments, and can solve the technical problem that non-chessboard calibration board corner points are easily extracted when extracting chessboard corner points in a complex environment. Compared with the prior art, the beneficial effects of the chessboard calibration board corner point screening device provided by the present application are the same as those of the chessboard calibration board corner point screening method provided by the above-mentioned embodiments, and other technical features in the chessboard calibration board corner point screening device are the same as those disclosed in the previous embodiment method, which will not be repeated here.

[0149] It should be understood that various parts of the present application can be realized by hardware, software, firmware or a combination thereof. In the description of the above-mentioned embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0150] The above is merely specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

[0151] The present application provides a computer readable storage medium having stored thereon computer readable program instructions (i.e. computer program) for executing the chessboard calibration board corner point screening method in the above-mentioned embodiments.

[0152] The computer readable storage medium provided in the present application may, for example, be a U disk, but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer readable storage medium can be transmitted in any suitable medium, including but not limited to electrical wires, optical cables, RF (Radio Frequency), and the like, or any suitable combination of the above.

[0153] The above computer readable storage medium can be included in the chessboard grid calibration board corner point screening device, or can exist separately without being assembled into the chessboard grid calibration board corner point screening device.

[0154] Computer program code for carrying out operations of the present application can be written in one or more programming languages or combinations of languages including object oriented programming languages such as Java, Smalltalk, C++ or conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, through the Internet using an Internet service provider).

[0155] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0156] The modules involved in the embodiments of the present application can be implemented in the form of software or hardware. In some cases, the name of the module does not constitute a limitation on the module itself.

[0157] The computer readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e. computer program) for executing the chessboard calibration board corner point screening method, and can solve the technical problem that the corner points on the non-chessboard calibration board are easily extracted when the chessboard corner points are extracted in a complex environment. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the chessboard calibration board corner point screening method provided by the above-mentioned embodiments, and will not be described here.

[0158] The above only describes some embodiments of the present application, and does not limit the patent scope of the present application. Any equivalent structural transformation made by referring to the content of the present application and the drawings, or direct / indirect application in other related technical fields is included in the patent protection scope of the present application.

Claims

1. A method for selecting corner points on a chessboard calibration board, characterized in that, The method for selecting corner points of the chessboard calibration board includes: The corner detection algorithm is used to obtain all the corner points of the calibration board on the chessboard to be detected, and the first set of corner points is constructed. For each corner point in the first set of corner points, perform feature analysis, compare the feature value of each corner point with a first preset threshold, and retain the corner points within the range of the first preset threshold to construct a second set of corner points; Select the target area of ​​the black squares on the chessboard calibration board; Construct a bounding polygon that encloses the calibration target region; Determine whether the corner points in the second set of corner points are located inside the circumscribed polygon, and retain the corner points located inside the circumscribed polygon to construct a valid set of calibration points; The step of selecting the target area of ​​the black squares on the checkerboard calibration board includes: The first dilated region is obtained by performing morphological dilation processing on the image region of the checkerboard calibration board using a rectangular structural element of the first preset size; Perform connectivity analysis on the first expanded region and filter out the white connected region with the largest area; The white connecting area is filled with holes to obtain a hole-filled area inside the white connecting area; The difference region is obtained by performing a difference operation between the hole-filled area and the white connected area; A second expanded region is obtained by morphologically expanding the difference region using a rectangular structural element of a second preset size. Perform connected component analysis on the second expanded region, and select the black connected region with the largest area to obtain the target region of the black square.

2. The method for selecting corner points of a chessboard calibration board as described in claim 1, characterized in that, The step of performing feature analysis on each corner point in the first corner point set, and comparing the feature value of each corner point with a first preset threshold to retain corner points within the range of the first preset threshold to construct a second corner point set, includes: Image segmentation of the chessboard grid yields a binary image; The binary image is used to perform feature analysis on each corner point in the first corner point set to determine the pairing rate of pixels and the difference rate of black pixels in the neighborhood of the corner point. A second set of corner points is constructed from corner points whose pairing rate of retained pixels and the difference rate of black pixels are both within the first preset threshold range.

3. The method for selecting corner points of a chessboard calibration board as described in claim 2, characterized in that, After the step of segmenting the chessboard grid to obtain a binary image, the method further includes: The Otsu automatic thresholding method was used to segment the chessboard grid to obtain a binary image. The point with a pixel value of 255 in the binary image is defined as the foreground target point; Transform all the foreground target points in the binary image into foreground target regions; The foreground target region is stored in the form of row coordinates of adjacent target point pixels, start coordinates of adjacent target point pixels, and end coordinates of adjacent target point pixels.

4. The method for selecting corner points of a chessboard calibration board as described in claim 1, characterized in that, The step of constructing the circumscribed polygon surrounding the calibration target region includes: Calculate the coordinates of the horizontal circumscribed rectangle of the calibration target area; From the point set represented by the second expansion region, select the boundary point set whose coordinate values ​​are equal to the coordinates of the horizontal circumscribed rectangle, and calculate the centroid of the four sides of the boundary point set. Construct a coordinate system for the calibrated target area; Four straight lines are generated to enclose the calibration target area based on the coordinate system and the centroids of the four sides. The intersection of the four straight lines that enclose the target area is calculated as the four sides. The four sides are then extended outwards by a preset distance according to the direction of the coordinate system to construct the circumscribed polygon.

5. The method for selecting corner points of a chessboard calibration board as described in claim 4, characterized in that, The step of constructing the coordinate system of the calibration target area includes: Calculate the coordinates of the centroid of the second set of corner points; Select the four coordinate system corner points from the second set of corner points that are closest to the coordinates of the centroid point; Three corner points are selected from the four corner points of the coordinate system to serve as the origin, x-axis point, and y-axis point of the coordinate system of the calibration target area. The difference between the included angle of the coordinate axes of the coordinate system and 90 degrees satisfies the preset angle threshold and the sum of the distances between the two axis points and the origin is minimized.

6. The method for selecting corner points of a chessboard calibration board as described in claim 5, characterized in that, The step of generating four straight lines enclosing the calibration target area based on the coordinate system and the centroids of the four sides includes: Calculate the points on the left and right sides of the x-axis and y-axis of the coordinate axes among the centroids of the four sides, and obtain the left x-axis point that is farthest from the x-axis and the right x-axis point that is farthest from the x-axis. Also obtain the left y-axis point that is farthest from the y-axis and the right y-axis point that is farthest from the y-axis. Calculate the coordinate axis vectors based on the corner points of the coordinate system; Based on the coordinate axis vectors, calculate the straight lines that pass through the left point of the x-axis, the right point of the x-axis, the left point of the y-axis, and the right point of the y-axis and are parallel to the coordinate axes, and construct four straight lines that surround the calibration target area.

7. A corner point screening device for a checkerboard calibration board, characterized in that, The device includes: The corner acquisition module is used to acquire all corners of the calibration board on the chessboard to be detected using a corner detection algorithm, and to construct the first corner set. The primary optimization module is used to perform feature analysis on each corner point in the first corner point set, and to construct a second corner point set by comparing the feature value of each corner point with a first preset threshold and retaining the corner points within the range of the first preset threshold. The region filtering module is used to filter out the target calibration region of the black squares on the chessboard calibration board; A region construction module is used to construct the bounding polygon that surrounds the calibration target region; The secondary optimization module is used to determine whether the corner points in the second set of corner points are located inside the circumscribed polygon, and retain the corner points located inside the circumscribed polygon to construct a valid set of calibration points; The region filtering module is further configured to perform morphological dilation processing on the image region of the checkerboard calibration board using a rectangular structuring element of a first preset size to obtain a first dilated region; perform connected component analysis on the first dilated region to filter out the white connected region with the largest area; fill holes in the white connected region to obtain a hole-filled region inside the white connected region; perform a difference operation on the hole-filled region and the white connected region to obtain a difference region; perform morphological dilation processing on the difference region using a rectangular structuring element of a second preset size to obtain a second dilated region; and perform connected component analysis on the second dilated region to filter out the black connected region with the largest area to obtain the calibration target region of the black squares.

8. A corner point screening device for a checkerboard calibration board, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the checkerboard calibration board corner point screening method as described in any one of claims 1 to 6.

9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the checkerboard calibration board corner point screening method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Picture book corner positioning method and device, computer device and readable storage medium

    CN111401266A

  • Low-dependence chessboard corner detection method and device in complex environment

    CN112669365A