Chessboard corner point automatic extraction method, system, device and medium

By using binarization and contour filtering techniques, corner points of the chessboard are automatically extracted, solving the problem of recognition errors when the chessboard image fills the camera's field of view, and achieving efficient and accurate corner point localization.

CN114445499BActive Publication Date: 2025-11-04SHENZHEN GUANGJIAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011116627.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-19
Publication Date
2025-11-04
Estimated Expiration
2040-10-19

AI Technical Summary

Technical Problem

In existing technologies, when a checkerboard image fills the camera's field of view, the error rate for identifying checkerboard corner points is high, making it difficult to automatically extract the corner points of each grid area.

Method used

The checkerboard image is obtained through binarization, multiple contours are extracted, grid contours are filtered out, the center point of each grid contour is determined, the coarse corner point is determined based on the center points of four adjacent grid contours, and the target corner point is precisely located through sub-pixel positioning.

Benefits of technology

It enables automatic extraction of chessboard corner points, improving the accuracy and efficiency of corner point recognition, without needing to know the specific number of chessboard squares.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114445499B_ABST
    Figure CN114445499B_ABST
Patent Text Reader

Abstract

The application provides a chessboard corner point automatic extraction method, system, device and medium, comprising the following steps: acquiring a chessboard image, performing binaryzation processing on the chessboard image to generate a chessboard binaryzation image, and extracting a plurality of contours in the chessboard binaryzation image; screening a grid contour from the plurality of contours, and then determining a center point of each grid contour; determining a coarse corner point of each grid region according to the center points of four adjacent grid contours; extracting a sub-pixel of each coarse corner point, and determining a target corner point of each grid region according to the sub-pixel of the coarse corner point. In the application, a plurality of contours are extracted in the chessboard binaryzation image, a grid contour is screened from the plurality of contours, and then the center point of each grid contour is determined, so that the coarse corner point of each grid region can be determined, and then the target corner point is determined, thereby realizing automatic extraction of the corner point of the chessboard, and the number of the chessboard in the chessboard does not need to be known.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to camera calibration, in particular to a chessboard corner point automatic extraction method, system, device and medium. BACKGROUND

[0002] In the image measurement process and machine vision application, in order to determine the mutual relationship between the three-dimensional geometric position of a point on the surface of a space object and the corresponding point in the image, the geometric model of camera imaging must be established, and these geometric model parameters are camera parameters. Under most conditions, these parameters must be obtained through experiments and calculations, and this process of solving parameters is called camera calibration.

[0003] When calibrating the camera, a calibration board is usually used for calibration. Through the camera shooting of the flat plate with fixed pitch pattern array, the calculation of the calibration algorithm can obtain the geometric model of the camera, so as to obtain high-precision measurement and reconstruction results.

[0004] Common calibration boards include chessboard calibration board, circular marker point calibration board, two-dimensional code calibration board and coded marker point calibration board. When using the chessboard calibration board to calibrate the camera, the corners of the collected chessboard image need to be marked, and in the prior art, the corners are generally marked manually or when the number of grids of the chessboard image is small, only part of the camera field of view, the corners can be detected by image recognition to identify the corners of the chessboard image. However, when the chessboard image fills the entire camera field of view, the identification of the corners often fails to label each grid region in the chessboard image. SUMMARY

[0005] In view of the defects in the prior art, the purpose of the present application is to provide a chessboard corner point automatic extraction method, system, device and medium.

[0006] The chessboard corner point automatic extraction method provided by the present application comprises the following steps:

[0007] Step S1: acquiring a chessboard image, performing binaryzation processing on the chessboard image to generate a chessboard binaryzation image, and extracting a plurality of contours from the chessboard binaryzation image;

[0008] Step S2: screening a grid contour from the plurality of contours, and determining the center point of each grid contour;

[0009] Step S3: determining a coarse corner point of each grid region according to the center points of the four adjacent grid contours;

[0010] Step S4: extracting a sub-pixel of each coarse corner point, and determining a target corner point of each grid region according to the sub-pixel of the coarse corner point.

[0011] Preferably, the step S1 comprises the following steps:

[0012] Step S101: binarizing the checkerboard image by a pre-set first gray value threshold to generate a first checkerboard binarization image, in which the contour of the white checkerboard region is isolated by the contour of the black checkerboard, and the black checkerboard is connected to form a whole region;

[0013] Step S102: binarizing the checkerboard image by a pre-set second gray value threshold to generate a second checkerboard binarization image, in which the contour of the black checkerboard region is isolated by the contour of the white checkerboard, and the white checkerboard is connected to form a whole region;

[0014] Step S103: extracting the grid contour of each white checkerboard region in the first checkerboard binarization image, and extracting the grid contour of each black checkerboard region in the second checkerboard binarization image.

[0015] Preferably, the step S2 comprises the following steps:

[0016] Step S201: extracting a plurality of contours in the checkerboard binarization image, and calculating the area A of each contour;

[0017] Step S202: extracting the contour whose area A is in the interval [0.2A median , A median ], and A median is the median of the area of all contours;

[0018] Step S203: screening the extracted contour according to a pre-set area screening formula to determine the grid contour, and the area screening formula is:

[0019] A median -2σ<A<A median +2σ,σ x <0.02×L 3 ,σ y <0.02×L 3 ;

[0020] Wherein, σ x is the variance of a contour in the X direction, σ y is the variance of a contour in the Y direction, and σ is the variance of the area of all contours.

[0021] Preferably, the method further comprises the following steps:

[0022] Step M1: determining a center checkerboard region of the checkerboard binarization image, the center checkerboard region having a pre-set marker;

[0023] Step M2: labeling a plurality of the grid regions with the center checkerboard region as the center, determining spatial distance and pixel distance according to the label and target corner points, and further determining internal and external parameters of the camera.

[0024] Preferably, the step M1 comprises the following steps:

[0025] Step M101: obtaining a center point of each of the contours and gray scale values of four points above, below, left and right of the center point with a Manhattan distance of P, wherein the center checkerboard is black and the marker located at the center of the center checkerboard is pre-set to be white;

[0026] Step M102: judging whether the ratio of the gray scale values of the four points above, below, left and right to the gray scale value of the center point is greater than a pre-set proportion threshold value, and when greater than a pre-set distance threshold value, determining that the contour is a center checkerboard region;

[0027] Step M103: repeatedly executing the steps M101 to M102 until the center checkerboard region is determined.

[0028] Preferably, the step S1 comprises the following steps:

[0029] Step S101: inversely coloring the region of the marker to black to generate a target checkerboard image;

[0030] Step S102: performing binarization processing on the target checkerboard image by a pre-set first gray scale value threshold to generate a first checkerboard binarization image, wherein the contours of white checkerboard regions in the first checkerboard binarization image are isolated by the contours of black checkerboards, and the black checkerboards are connected to form an integral region;

[0031] Step S103: performing binarization processing on the target checkerboard image by a pre-set second gray scale value threshold to generate a second checkerboard binarization image, wherein the contours of black checkerboard regions in the second checkerboard binarization image are isolated by the contours of white checkerboards, and the white checkerboards are connected to form an integral region;

[0032] Step S104: extracting a grid contour of each white checkerboard region in the first checkerboard binarization image and extracting a grid contour of each black checkerboard region in the second checkerboard binarization image.

[0033] Preferably, the step M2 comprises the following steps:

[0034] Step M201: finding white checkboard regions adjacent to the center checkboard region with the center checkboard region as the center region, and labeling the adjacent white checkboard regions, wherein the number of adjacent white checkboard regions is less than four, and the distance between the center of the adjacent white checkboard region and the center of the center checkboard region is less than W, wherein area is the area of the center region;

[0035] Step M202: finding black checkboard regions adjacent to each of the found adjacent white checkboard regions with each of the found adjacent white checkboard regions as the center region, and labeling the adjacent black checkboard regions, and further finding white checkboard regions adjacent to each of the found adjacent black checkboard regions with each of the found adjacent black checkboard regions as the center region, and labeling the adjacent white checkboard regions;

[0036] Step M203: repeating Step M202 until no white checkboard region or black checkboard region can be found to grow.

[0037] According to the present application, a system for automatically extracting checkboard corner points is provided, comprising the following modules:

[0038] a contour extraction module, configured to acquire a checkboard image, perform binaryzation processing on the checkboard image to generate a checkboard binaryzation image, and extract a plurality of contours from the checkboard binaryzation image;

[0039] a contour screening module, configured to screen a grid contour from the plurality of contours, and further determine a center point of each grid contour;

[0040] a coarse corner point determination module, configured to determine a coarse corner point of each grid region according to the center points of four adjacent grid contours;

[0041] a corner point generation module, configured to extract a sub-pixel of each coarse corner point, and determine a target corner point of each grid region according to the sub-pixel of the coarse corner point.

[0042] According to the present application, a device for automatically extracting checkboard corner points is provided, comprising:

[0043] a processor;

[0044] a memory, wherein executable instructions of the processor are stored in the memory;

[0045] wherein the processor is configured to execute the steps of the method for automatically extracting checkboard corner points by executing the executable instructions.

[0046] According to the present application, a computer readable storage medium is provided for storing a program, which is executed to implement the steps of the method for automatically extracting checkboard corner points.

[0047] Compared with the prior art, the present application has the following beneficial effects:

[0048] In the present application, a plurality of contours are extracted in the checkerboard binarization image, a grid contour is screened out from the plurality of contours, and the center point of each grid contour is determined, so that the coarse corner point of each grid region can be determined, and the target corner point is determined, thereby realizing automatic extraction of the corner point of the checkerboard, and without knowing the number of the checkerboard in the checkerboard.

[0049] In the present application, the camera to be calibrated can be carried on the guide rail controlled automatically, the image of the checkerboard is automatically photographed to obtain the internal and external parameters of the camera, the reference distance of the checkerboard from the camera can be obtained according to the internal and external parameters, the reference distance can be used as the real distance of the calibration board from the camera, and can be used as the reference distance for calibration of the depth camera, thereby solving the problem that the real distance cannot be obtained in general camera evaluation. BRIEF DESCRIPTION OF DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of the provided drawings. Other features, objects and advantages of the present application will become more apparent through reading the following detailed description of the non-limiting embodiments with reference to the following drawings:

[0051] Figure 1 The step flow chart of the method for automatically extracting the corner point of the checkerboard in the embodiments of the present application is shown in the figure.

[0052] Figure 2 The step flow chart of extracting a plurality of contours in the checkerboard binarization image in the embodiments of the present application is shown in the figure.

[0053] Figure 3 The step flow chart of screening out a grid contour from the plurality of contours in the embodiments of the present application is shown in the figure.

[0054] Figure 4 The step flow chart of determining the center checkerboard region of the checkerboard binarization image in the embodiments of the present application is shown in the figure.

[0055] Figure 5 The step flow chart of extracting a plurality of contours in the checkerboard binarization image in the embodiments of the present application is shown in the figure.

[0056] Figure 6 The step flow chart of labeling the plurality of grid regions in the embodiments of the present application is shown in the figure.

[0057] Figure 7 A module schematic diagram of the chessboard corner point automatic extraction system in the embodiment of the present application is shown in Figure 1.

[0058] Figure 8 A structure schematic diagram of the chessboard corner point automatic extraction device in the embodiment of the present application is shown in Figure 2.

[0059] Figure 9 A structure schematic diagram of the computer readable storage medium in the embodiment of the present application is shown in Figure 3. DETAILED DESCRIPTION

[0060] The present application will be described in detail below with specific embodiments. The following embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any form. It should be pointed out that, for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made. These all belong to the protection scope of the present application.

[0061] The terms "first", "second", "third", "fourth" and the like (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein, for example, can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily limit to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0062] The technical solutions of the present application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0063] The chessboard corner point automatic extraction method provided by the present application aims to solve the problems existing in the prior art.

[0064] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present application will be described below with reference to the drawings.

[0065] Figure 1 A step flow chart of the chessboard corner point automatic extraction method in the embodiment of the present application is shown in Figure 4. Figure 1As shown, the chessboard corner point automatic extraction method provided by the present application comprises the following steps:

[0066] Step S1: acquiring a chessboard image, performing binaryzation processing on the chessboard image to generate a chessboard binaryzation image, and extracting a plurality of contours from the chessboard binaryzation image;

[0067] Step S2: screening a grid contour from the plurality of contours, and further determining a center point of each grid contour;

[0068] Step S3: determining a coarse corner point of each grid region according to the center points of four adjacent grid contours;

[0069] Step S4: extracting a sub-pixel of each coarse corner point, and determining a target corner point of each grid region according to the sub-pixel of the coarse corner point.

[0070] In the embodiment of the present application, a plurality of contours are extracted from the chessboard binaryzation image, a grid contour is screened from the plurality of contours, and a center point of each grid contour is further determined, so that the coarse corner point of each grid region can be determined, and the target corner point is further determined, thereby realizing automatic extraction of the corner point of the chessboard, and without knowing the number of the chessboards in the chessboard.

[0071] In the embodiment of the present application, the coarse corner point is determined according to the gravity center of the region formed by the center points of the four adjacent grid contours.

[0072] Figure 2 The step flow chart of extracting a plurality of contours from the chessboard binaryzation image in the embodiment of the present application is shown as follows, Figure 2 As shown, the step S1 comprises the following steps:

[0073] Step S101: performing binaryzation processing on the chessboard image by a pre-set first gray value threshold to generate a first chessboard binaryzation image, and the contour of the white chessboard region in the first chessboard binaryzation image is isolated by the contour of the black chessboard, and the black chessboard is connected to form an integral region;

[0074] Step S102: performing binaryzation processing on the chessboard image by a pre-set second gray value threshold to generate a second chessboard binaryzation image, and the contour of the black chessboard region in the second chessboard binaryzation image is isolated by the contour of the white chessboard, and the white chessboard is connected to form an integral region;

[0075] Step S103: extracting a grid contour of each white chessboard region from the first chessboard binaryzation image, and extracting a grid contour of each black chessboard region from the second chessboard binaryzation image.

[0076] In the embodiment of the present application, the first gray value threshold can be set as 200, and the second gray value threshold can be set as 50.

[0077] Figure 3 The flow chart of the step of screening the lattice profile from the plurality of profiles in the embodiment of the present application is shown in FIG. 2, wherein the step S2 comprises the following steps: Figure 3

[0078] Step S201: extracting a plurality of profiles from the checkerboard binarization image, and calculating the area A of each profile;

[0079] Step S202: extracting the profile whose area A is in the interval [0.2A median , A median ], and A median is the median of the area of all profiles;

[0080] Step S203: screening the extracted profile to determine the lattice profile according to a pre-set area screening formula, wherein the area screening formula is:

[0081] A median -2σ<A<A median +2σ, σ x <0.02×L 3 , σ y <0.02×L 3 ;

[0082] wherein σ x is the variance of the profile in the X direction, σ y is the variance of the profile in the Y direction, and σ is the variance of the area of all profiles.

[0083] In the embodiment of the present application, the formula A median -2σ<A<A median +2σ is used for area screening of the profile, and the formula σ x <0.02×L 3 , σ y <0.02×L 3 is used for determining whether the profile is a rectangle.

[0084] In the embodiment of the present application, the checkerboard corner point automatic extraction method provided by the present application further comprises the following steps:

[0085] Step M1: determining the central checkerboard region of the checkerboard binarization image, wherein the central checkerboard region has a pre-set marker;

[0086] ​Step M2: label multiple grid regions centered on the central checkerboard region, determine spatial distance and pixel distance according to the label and target corner point, and then determine the internal and external parameters of the camera.

[0087] Figure 4 A flow chart for determining the central checkerboard region of the checkerboard binary image in the embodiment of the present application is shown in Figure 4 The step M1 includes the following steps:

[0088] Step M101: obtain the gray value of the center point of each contour and the four points above, below, left and right of the center point with Manhattan distance P, wherein the central checkerboard is black, and the marker located at the center of the central checkerboard is pre-set to white;

[0089] Step M102: determine whether the ratio of the gray value of the four points above, below, left and right to the gray value of the center point is greater than a pre-set proportion threshold value, and when it is greater than the pre-set distance threshold value, it is determined that the contour is a central checkerboard region;

[0090] Step M103: repeat steps M101 to M102 until the central checkerboard region is determined.

[0091] In the embodiment of the present application, the proportion threshold value is 2. The marker is pre-set to white and pasted on the black checkerboard. The area of the marker is smaller than the black checkerboard and is contained in the black checkerboard. In order to ensure that the gray values of the four points above, below, left and right of the center point are also relatively large, it is prevented that the center point is a salt noise point. It is ensured that the gray value I of the center point is greater than 100, and the sum of the intensities of the four surrounding points is greater than 2I. When all the center points satisfying this condition are obtained, a centroid is finally obtained, which is the center point position.

[0092] Figure 5 A flow chart for extracting multiple contours in the checkerboard binary image in the deformation example of the present application is shown in Figure 5 The step S1 includes the following steps:

[0093] Step S101: generate a target checkerboard image by inverting the color of the marker region to black;

[0094] Step S102: perform binaryzation processing on the target checkerboard image by a pre-set first gray value threshold to generate a first checkerboard binary image, wherein the contours of the white checkerboard regions in the first checkerboard binary image are isolated by the contours of the black checkerboard, and the black checkerboards are connected to form a whole region;

[0095] Step S103: the target checkerboard image is binarized by a pre-set second gray value threshold to generate a second checkerboard binarization image, in which the contour of the black checkerboard region is isolated by the contour of the white checkerboard, and the white checkerboard is connected to form an integral region;

[0096] Step S104: the grid contour of each white checkerboard region is extracted from the first checkerboard binarization image, and the grid contour of each black checkerboard region is extracted from the second checkerboard binarization image.

[0097] In the embodiment of the present application, the marker region can be reversely colored to black, or the marker region can be painted to black, a target checkerboard image is generated, and then the target checkerboard image is binarized to generate a first checkerboard binarization image and a second checkerboard binarization image.

[0098] Figure 6 For the step flow chart of labeling a plurality of grid regions in the embodiment of the present application, as shown in Figure 6 The step M2 includes the following steps:

[0099] Step M201: taking the center checkerboard region as a center region, a white checkerboard region adjacent to the center checkerboard region is searched, and the adjacent white checkerboard region is labeled, wherein the number of the adjacent white checkerboard region is less than four, and the distance between the center of the adjacent white checkerboard region and the center of the center checkerboard region is less than W, Wherein, area is the area of the center region;

[0100] Step M202: taking each of the searched adjacent white checkerboard region as a center region, an adjacent black checkerboard region is searched and labeled, and then taking each of the searched adjacent black checkerboard region as a center region, an adjacent white checkerboard region is searched and labeled;

[0101] Step M203: step M202 is repeatedly executed until no white checkerboard region or black checkerboard region can be found.

[0102] In the embodiment of the present application, the size of the checkerboard is 31*31, and the number of the adjacent black checkerboard region and the adjacent white checkerboard region is less than or equal to four. When labeling, for the checkerboard region with coordinates (m, n), key = 31*m+n, and key is the label of the checkerboard region.

[0103] Figure 7 For the module schematic diagram of the checkerboard corner point automatic extraction system in the embodiment of the present application, as shown inFigure 7 As shown, the chessboard corner point automatic extraction system provided by the present application comprises the following modules:

[0104] The contour extraction module is configured to acquire a chessboard image, perform binaryzation processing on the chessboard image, generate a chessboard binaryzation image, and extract a plurality of contours from the chessboard binaryzation image.

[0105] The contour screening module is configured to screen a grid contour from the plurality of contours, and further determine a center point of each grid contour.

[0106] The coarse corner point determination module is configured to determine a coarse corner point of each grid region according to the center points of the four adjacent grid contours.

[0107] The corner point generation module is configured to extract a sub-pixel of each coarse corner point, and determine a target corner point of each grid region according to the sub-pixel of the coarse corner point.

[0108] In the embodiment of the present application, a chessboard corner point automatic extraction device is also provided, comprising a processor and a memory having executable instructions of the processor stored therein. The processor is configured to perform the steps of the chessboard corner point automatic extraction method by executing the executable instructions.

[0109] As described above, in the embodiment of the present application, a plurality of contours are extracted from the chessboard binaryzation image, a grid contour is screened from the plurality of contours, and a center point of each grid contour is determined, so as to determine a coarse corner point of each grid region, and further determine a target corner point, thereby realizing automatic extraction of the corner points of the chessboard without knowing the number of the chessboards in the chessboard.

[0110] Those skilled in the art can understand that each aspect of the present application can be implemented as a system, a method or a program product. Therefore, each aspect of the present application can be specifically implemented as a complete hardware embodiment, a complete software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software, which can be collectively referred to as "circuitry", "module" or "platform".

[0111] Figure 8 is a structural schematic diagram of the chessboard corner point automatic extraction device of the present application. The electronic device 600 according to this embodiment of the present application will be described below with reference to Figure 8 . Figure 8 The electronic device 600 shown is merely an example, and should not impose any limitation on the functions and use range of the embodiments of the present application.

[0112] As Figure 8As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 can include, but are not limited to, at least one processing unit 610, at least one storage unit 620, a bus 630 that connects the various platform components, including the storage unit 620 and the processing unit 610, a display unit 640, etc.

[0113] The storage unit stores program code that can be executed by the processing unit 610 to cause the processing unit 610 to perform the steps described above in the chessboard corner point automatic extraction method section of the specification in accordance with various exemplary embodiments of the present application. For example, the processing unit 610 can perform the steps shown in FIG. 6. Figure 1

[0114] The storage unit 620 can include a readable medium in the form of volatile storage such as a random access memory (RAM) 6201 and / or cache memory 6202, and can further include a non-volatile storage such as read only memory (ROM) 6203.

[0115] The storage unit 620 can also include program / utility 6204 having a set of programs / modules 6205, each of which performs one or more of the steps of the various exemplary embodiments of the present application as described herein. The programs / utility 6204 can include, for example, an operating system, one or more applications, other program modules, and program data, and can include an implementation of a network environment as part of each or some combination of these examples.

[0116] The bus 630 can represent one or more of several types of bus structures, including a storage bus or bus controller, a peripheral bus, a graphics bus (e.g., an Accelerated Graphics Port, or AGP bus) and a local bus using any of a variety of bus architectures.

[0117] The electronic device 600 can also communicate with one or more external devices 700 such as a keyboard or pointing device, a Bluetooth device, etc.; other devices that enable a user to interact with the electronic device 600; and / or one or more devices that enable the electronic device 600 to communicate with one or more other computing devices. Such communication can be facilitated by an Input / Output (I / O) interface 650. The electronic device 600 can also communicate with one or more networks, such as a local area network (LAN), a wide area network (WAN), and / or the public network, such as the Internet, through a network adapter 660. The network adapter 660 can communicate with the other components of the electronic device 600 through the bus 630. It will be appreciated that although the network adapter 660 is shown as a single component, the network adapter 660 can comprise a plurality of components that work in cooperation to provide the functionality described herein. Figure 8 ​Other hardware and / or software modules that can be incorporated with the electronic device 600, which are not shown, include but are not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms, etc.

[0118] The embodiment of the present application also provides a computer readable storage medium for storing a program, which, when executed, implements the steps of the automatic chessboard corner point extraction method. In some possible implementation manners, various aspects of the present application can also be implemented in the form of a program product, which includes program codes for causing a terminal device to perform the steps of various exemplary embodiments of the present application described in the foregoing automatic chessboard corner point extraction method part of the specification when the program product is run on the terminal device.

[0119] As shown above, when the program of the computer readable storage medium of the embodiment is executed, the present application extracts a plurality of contours in the chessboard binarization image, screens a grid contour from the plurality of contours, and further determines the center point of each grid contour, so as to determine the coarse corner point of each grid region, and further determine the target corner point, thereby realizing the automatic extraction of the chessboard corner point, and without the need to know the number of chessboards in the chessboard.

[0120] Figure 9 is a structural schematic diagram of the computer readable storage medium of the present application. Referring to Figure 9 As shown in the foregoing, the program product 800 for implementing the foregoing method according to the embodiment of the present application can be in the form of a portable compact disc read-only memory (CD-ROM) and includes program codes, and can be run on a terminal device, such as a personal computer. However, the program product of the present application is not limited to this, and in the present document, the readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, device or apparatus.

[0121] The program product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disc, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0122] The computer readable storage medium can include a computer-readable medium in baseband or propagated as a carrier wave in a propagated signal, wherein the propagated signal can take any of a variety of forms, including but not limited to electro-magnetic, optical, or any suitable combination thereof. Computer readable storage medium can be any medium that can be read by a machine, including any medium that can store or transfer a program for use by or in connection with an instruction execution system, apparatus, or device. Program code contained on a computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination thereof.

[0123] Program code used by or in connection with the described embodiments can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's computing device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider (ISP).

[0124] In the embodiment of the present application, a plurality of contours are extracted in the checkerboard binarization image, a grid contour is selected from the plurality of contours, and a center point of each grid contour is determined, so that a coarse corner point of each grid region can be determined, and a target corner point is determined, so that the corner points of the checkerboard can be automatically extracted, and the number of the checkerboard in the checkerboard does not need to be known. In the present application, the camera that needs to be calibrated can be carried on the guide rail controlled automatically, the image of the checkerboard is automatically shot to obtain the internal and external parameters of the camera, the reference distance of the checkerboard from the camera can be obtained according to the internal and external parameters, the reference distance can be used as the real distance of the calibration board from the camera, and can be used as the reference distance for calibration of the depth camera, so that the problem that the real distance cannot be obtained in general camera evaluation is solved.

[0125] The various embodiments described in this specification are presented in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0126] The specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various modifications or variations within the scope of the claims, which do not affect the essence of the present invention.

Claims

1. A method for automatically extracting corner points of a chessboard grid, characterized in that, Includes the following steps: Step S1: Obtain a checkerboard image, perform binarization processing on the checkerboard image to generate a checkerboard binarized image, and extract multiple contours from the checkerboard binarized image. Step S2: Select grid contours from the multiple contours, and then determine the center point of each grid contour; Step S3: Determine the coarse corner point of each grid area based on the center points of the four adjacent grid outlines; Step S4: Extract the sub-pixels of each coarse corner point, and determine the target corner point of each grid area based on the sub-pixels of the coarse corner points; Step S1 includes the following steps: Step S101: The checkerboard image is binarized using a preset first grayscale threshold to generate a first checkerboard binarized image. In the first checkerboard binarized image, the outline of the white checkerboard area is isolated by the outline of the black checkerboard, while the black checkerboards are connected to form a whole area. Step S102: The checkerboard image is binarized using a preset second grayscale threshold to generate a second checkerboard binarized image. In the second checkerboard binarized image, the outline of the black checkerboard area is isolated by the outline of the white checkerboard area, while the white checkerboard areas are connected to form a whole area. Step S103: Extract the grid outline of each white grid region in the first checkerboard binarized image, and extract the grid outline of each black grid region in the second checkerboard binarized image. Step S2 includes the following steps: Step S201: Extract multiple contours from the checkerboard binarized image and calculate the area A of each contour; Step S202: Measure area A within the interval [0.2A]. median A median Extract the contour within ], A median This is the median area of ​​all contours; Step S203: Filter the extracted contours according to a preset area filtering formula to determine the grid contours. The area filtering formula is: A median -2σ<A<A median +2σ,σ x <0.02×L 3 ,s y <0.02×L 3 ; Where, σ x Let σ be the variance of a profile in the X direction. y Let σ be the variance of a profile in the Y direction, and σ be the variance of the area of ​​all profiles.

2. The method for automatically extracting corner points of a chessboard grid according to claim 1, characterized in that, It also includes the following steps: Step M1: Determine the central checkerboard region of the checkerboard binarized image, wherein the central checkerboard region has a preset marker; Step M2: Number the multiple grid areas centered on the central checkerboard area, determine the spatial distance and pixel distance based on the numbers and target corner points, and then determine the camera's intrinsic and extrinsic parameters.

3. The method for automatically extracting corner points of a chessboard grid according to claim 2, characterized in that, Step M1 includes the following steps: Step M101: Obtain the grayscale values ​​of the center point of each contour and the four points (up, down, left, right) that are a Manhattan distance P from the center point, wherein the central checkerboard is black and the marker located at the center of the central checkerboard is preset to white. Step M102: Determine whether the ratio of the gray values ​​of the four points (up, down, left, and right) to the gray value of the center point is greater than a preset ratio threshold. If it is greater than a preset distance threshold, the outline is identified as the central checkerboard area. Step M103: Repeat steps M101 to M102 until the central checkerboard area is determined.

4. The method for automatically extracting corner points of a chessboard according to claim 2, characterized in that, Step S1 includes the following steps: Step S101: Invert the area of ​​the marker to black to generate a target checkerboard image; Step S102: The target checkerboard image is binarized using a preset first grayscale threshold to generate a first checkerboard binarized image. In the first checkerboard binarized image, the outline of the white checkerboard area is isolated by the outline of the black checkerboard, while the black checkerboards are connected to form a whole area. Step S103: The target checkerboard image is binarized using a preset second grayscale threshold to generate a second checkerboard binarized image. In the second checkerboard binarized image, the outline of the black checkerboard area is isolated by the outline of the white checkerboard area, while the white checkerboard areas are connected to form a whole area. Step S104: Extract the grid outline of each white grid region in the first checkerboard binarized image, and extract the grid outline of each black grid region in the second checkerboard binarized image.

5. The method for automatically extracting corner points of a chessboard grid according to claim 4, characterized in that, Step M2 includes the following steps: Step M201: Using the central checkerboard area as the central region, find the nearest white checkerboard areas to the central checkerboard area, and label the nearest white checkerboard areas. The number of nearest white checkerboard areas is less than four, and the distance between the center of each nearest white checkerboard area and the center of the central checkerboard area is less than W. Where area is the area of ​​the central region; Step M202: Using each of the searched nearest white checkerboard areas as the center area, search for the nearest black checkerboard areas and label the nearest black checkerboard areas. Then, using each of the searched nearest black checkerboard areas as the center area, search for the nearest white checkerboard areas and label the nearest white checkerboard areas. Step M203: Repeat step M202 until no more white or black checkerboard areas can be found that can grow.

6. An automatic corner point extraction system for a chessboard grid, characterized in that, Includes the following modules: The contour extraction module is used to acquire a checkerboard image, perform binarization processing on the checkerboard image to generate a checkerboard binarized image, and extract multiple contours from the checkerboard binarized image. The contour filtering module is used to filter out grid contours from multiple contours, and then determine the center point of each grid contour. The coarse corner point determination module is used to determine the coarse corner point of each grid region based on the center points of the outlines of four adjacent grids. The corner point generation module is used to extract the sub-pixels of each coarse corner point and determine the target corner point of each grid area based on the sub-pixels of the coarse corner points. The contour extraction module includes the following steps during processing: Step S101: The checkerboard image is binarized using a preset first grayscale threshold to generate a first checkerboard binarized image. In the first checkerboard binarized image, the outline of the white checkerboard area is isolated by the outline of the black checkerboard, while the black checkerboards are connected to form a whole area. Step S102: The checkerboard image is binarized using a preset second grayscale threshold to generate a second checkerboard binarized image. In the second checkerboard binarized image, the outline of the black checkerboard area is isolated by the outline of the white checkerboard area, while the white checkerboard areas are connected to form a whole area. Step S103: Extract the grid outline of each white grid region in the first checkerboard binarized image, and extract the grid outline of each black grid region in the second checkerboard binarized image. The contour filtering module includes the following steps during processing: Step S201: Extract multiple contours from the checkerboard binarized image and calculate the area A of each contour; Step S202: Measure area A within the interval [0.2A]. median A median Extract the contour within ], A median The median of the areas of all contours; Step S203: Filter the extracted contours according to a preset area filtering formula to determine the grid contours. The area filtering formula is: A median -2σ<A<A median +2σ,σ x <0.02×L 3 ,s y <0.02×L 3 ; Where, σ x Let σ be the variance of a profile in the X direction. y Let σ be the variance of a profile in the Y direction, and σ be the variance of the area of ​​all profiles.

7. An automatic corner point extraction device for a chessboard grid, characterized in that, include: processor; A memory in which executable instructions of the processor are stored; The processor is configured to perform the steps of the automatic corner point extraction method of any one of claims 1 to 5 by executing the executable instructions.

8. A computer-readable storage medium for storing a program, characterized in that, When the program is executed, it implements the steps of the automatic corner point extraction method for chessboard grids as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Chessboard grid corner detection method and device based on contour extraction, and computer-readable storage medium

    CN109509200A

  • Checkerboard corner full-automatic detection method

    CN111243032A