Checkerboard corner detection method and device, computer equipment and storage medium
By acquiring the physical and target image coordinates of the checkerboard image, and using homography transformation and pixel response value correction, the homography transformation relationship is iteratively updated, solving the problem of low accuracy in checkerboard corner detection and achieving high-precision corner detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN SMARTMORE TECH CO LTD
- Filing Date
- 2026-01-21
- Publication Date
- 2026-05-15
AI Technical Summary
Traditional checkerboard corner detection methods suffer from low accuracy of checkerboard corner coordinates in large target scenes or multi-camera collaborative scenes, and are easily affected by factors such as dirt, damage, or partial occlusion.
By obtaining the physical coordinates of the first region and the target image coordinates in the checkerboard image, the initial image coordinates of the second region are calculated using the homography transformation relationship, and the pixel response value is used for fitting and correction. The homography transformation relationship is iteratively updated to ensure accurate detection of checkerboard corner points under dirty or occluded conditions.
It improves the accuracy of chessboard corner detection, reduces time resource consumption, ensures that enough effective chessboard corners are detected in complex environments, and solves the problem of low accuracy in traditional methods.
Smart Images

Figure CN122048969A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method, apparatus, computer equipment, and storage medium for detecting corner points of a chessboard grid. Background Technology
[0002] As the primary image sensor, the camera's imaging process involves not only scaling the real world but also introducing lens distortion and perspective distortion. To achieve accurate positioning and measurement, an accurate camera imaging model needs to be established; this process is called camera calibration.
[0003] Among various camera calibration methods, using a checkerboard pattern as the calibration object is a common method due to its simplicity and high accuracy. However, using a checkerboard pattern as a calibration object requires the camera to see the entire checkerboard, which is difficult to achieve in large-target scenes or multi-camera collaborative scenarios. Furthermore, traditional checkerboard corner detection techniques suffer from low accuracy in detecting corner coordinates due to the lack of additional auxiliary information from the checkerboard pattern. This necessitates a lengthy hypothesis verification process and is susceptible to interference from false corners detected by dirt, damage, or partial occlusion, thus affecting the overall accuracy of the camera calibration results.
[0004] Therefore, traditional techniques suffer from low accuracy in detecting chessboard corner coordinates. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for detecting chessboard corner points, which can improve the accuracy of the detected chessboard corner point coordinates, in order to address the above-mentioned technical problems.
[0006] Firstly, this application provides a method for detecting corner points of a chessboard grid, including:
[0007] Obtain the physical coordinates of each corner point of the first chessboard grid contained in the first region of the chessboard grid image, as well as the coordinates of the target image.
[0008] Based on the physical coordinates of each corner point of the first chessboard grid, calculate the physical coordinates of each corner point of the second chessboard grid contained in the second region, and determine the initial image coordinates of each corner point of the second chessboard grid based on the physical coordinates of each corner point of the second chessboard grid and the homography transformation relationship; the second region is the region in the chessboard grid image that contains the first region and its surrounding area.
[0009] Obtain the corner response value corresponding to each pixel in the chessboard image, and determine the target image coordinates of each second chessboard corner point based on the corner response value and the initial image coordinates of each second chessboard corner point;
[0010] Based on the physical coordinates of each second chessboard corner point and the target image coordinates, as well as the physical coordinates of each first chessboard corner point and the target image coordinates, the updated homography transformation relationship is determined.
[0011] The second region is used as the new first region, and the process returns to the step of calculating the physical coordinates of each second chessboard corner point contained in the second region based on the physical coordinates of each first chessboard corner point, until the first region is the complete image region of the chessboard image.
[0012] Secondly, this application provides a chessboard corner detection device, comprising:
[0013] The acquisition module is used to acquire the physical coordinates of each corner point of the first chessboard grid contained in the first region of the chessboard grid image and the coordinates of the target image.
[0014] The coordinate acquisition module is used to calculate the physical coordinates of each corner point of the second chessboard grid contained in the second region based on the physical coordinates of each corner point of the first chessboard grid, and to determine the initial image coordinates of each corner point of the second chessboard grid based on the physical coordinates of each corner point of the second chessboard grid and the homography transformation relationship; the second region is the region of the chessboard grid that contains the first region and its surrounding area.
[0015] The coordinate update module is used to obtain the corner response value corresponding to each pixel in the chessboard image, and determine the target image coordinates of each second chessboard corner based on the corner response value and the initial image coordinates of each second chessboard corner.
[0016] The relationship update module is used to determine the updated homography transformation relationship based on the physical coordinates and target image coordinates of each second chessboard corner point, as well as the physical coordinates and target image coordinates of each first chessboard corner point.
[0017] The loop module is used to treat the second region as the new first region and return to the step of calculating the physical coordinates of each second chessboard corner point contained in the second region based on the physical coordinates of each first chessboard corner point, until the first region is the complete image region of the chessboard image.
[0018] Thirdly, this application also provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described chessboard corner detection method.
[0019] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the chessboard corner detection method described above.
[0020] Fifthly, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps in the chessboard corner detection method described above.
[0021] The aforementioned checkerboard corner detection method, apparatus, computer equipment, computer-readable storage medium, and computer program product acquire the physical coordinates of each first checkerboard corner point contained in a first region of a checkerboard image, as well as the target image coordinates. This allows the use of auxiliary information provided by the first region, eliminating the need for extensive hypothesis verification processes and accurately obtaining the physical coordinates of the first checkerboard corner points and the target image coordinates, thus reducing the time and resource consumption during corner detection. Furthermore, based on the physical coordinates of each first checkerboard corner point, the physical coordinates of each second checkerboard corner point contained in a second region are determined. Then, based on homography transformation, the physical coordinates of each second checkerboard corner point are converted into initially inaccurate image coordinates. Finally, based on the coordinates of each image in the checkerboard image... The corner response values corresponding to the elements are used to fit and correct the initial image coordinates of the second chessboard corner points to determine the accurate target image coordinates of the second chessboard corner points. Then, based on the physical coordinates and target image coordinates of each second chessboard corner point, as well as the physical coordinates and target image coordinates of each first chessboard corner point, the homography transformation relationship is updated. Finally, the second region is used as the new first region. Through continuous extrapolation and iterative updating, it can be ensured that even if the chessboard is dirty, damaged, or partially occluded, enough effective chessboard corner points can still be accurately detected, thereby obtaining high-precision image coordinates of all chessboard corner points. This solves the problem of low accuracy of chessboard corner point coordinates in traditional techniques for chessboard corner point detection. Attached Figure Description
[0022] Figure 1 An application environment diagram of a checkerboard corner detection method provided in this application embodiment;
[0023] Figure 2 A schematic diagram of a checkerboard corner detection process provided in an embodiment of this application;
[0024] Figure 3 A schematic diagram of a chessboard image carrying a QR code provided in an embodiment of this application;
[0025] Figure 4 A schematic diagram of the four corner points of the QR code in the chessboard grid provided in this embodiment of the application;
[0026] Figure 5 A schematic diagram of the checkerboard row and column index provided in an embodiment of this application;
[0027] Figure 6 An extrapolation diagram of the corner points of the chessboard grid in the row above the QR code provided in this application embodiment;
[0028] Figure 7 A schematic diagram of the chessboard corner points reached during the first extrapolation traversal provided in this embodiment of the application;
[0029] Figure 8 A schematic diagram of the chessboard corner points reached during the second extrapolation traversal provided in this application embodiment;
[0030] Figure 9 A schematic diagram of the final chessboard corner detection results provided for an embodiment of this application;
[0031] Figure 10 A schematic diagram of the corner response based on Radon transform provided in an embodiment of this application;
[0032] Figure 11 A schematic diagram of the corner response values within a first preset window centered at the corner point at index 116, provided as an embodiment of this application;
[0033] Figure 12 A structural block diagram of a checkerboard corner detection device provided in an embodiment of this application;
[0034] Figure 13 An internal structural diagram of a computer device provided in an embodiment of this application;
[0035] Figure 14 This is an internal structural diagram of a computer-readable storage medium provided in an embodiment of this application. Detailed Implementation
[0036] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0037] The chessboard corner detection method provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, server 104 can obtain the physical coordinates of each corner point of the first chessboard grid in the first region and the target image coordinates from the chessboard grid image captured by camera 102 to be calibrated; server 104 can calculate the physical coordinates of each corner point of the second chessboard grid in the second region based on the physical coordinates of each corner point of the first chessboard grid, and determine the initial image coordinates of each corner point of the second chessboard grid based on the physical coordinates of each corner point of the second chessboard grid and the homography transformation relationship; server 104 can obtain the corner response value corresponding to each pixel in the chessboard grid image, and determine the initial image coordinates of each corner point of the second chessboard grid based on the corner response value and the homography transformation relationship. The initial image coordinates of the second chessboard corner points are used to determine the target image coordinates of each second chessboard corner point. Server 104 can determine the updated homography transformation relationship based on the physical coordinates and target image coordinates of each second chessboard corner point, as well as the physical coordinates and target image coordinates of each first chessboard corner point. Server 104 can use the second region as the new first region and return to the step of calculating the physical coordinates of each second chessboard corner point contained in the second region based on the physical coordinates of each first chessboard corner point, until the first region is a complete image region of the chessboard image. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. It should be noted that the chessboard image captured by the camera 102 to be calibrated can also be transmitted to a terminal, which can then detect the chessboard corner points in the image. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices.
[0038] like Figure 2 As shown in the illustration, this application provides a method for detecting corner points on a chessboard grid, with an example of applying this method to server 104. It is understood that this method can be applied to a server, or to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. The method includes the following steps:
[0039] Step S202: Obtain the physical coordinates of each corner point of the first chessboard grid contained in the first region of the chessboard grid image and the coordinates of the target image.
[0040] Understandably, a checkerboard image is a two-dimensional imaging image containing a checkerboard pattern, obtained by capturing the image with the camera to be calibrated when using a checkerboard as a calibration object (calibration board) for camera calibration. This image is used to determine the camera's internal parameters (such as focal length, principal point position, pixel size, etc.) and distortion parameters (such as lens distortion and perspective distortion, etc.). For example, the checkerboard image carries at least one special marker (or special marker code), such as a QR code or Aruco code (Hamming code grid). This application embodiment uses a QR code as an example of a special marker; a schematic diagram of the checkerboard image is shown below. Figure 3As shown. It should be noted that the checkerboard grid can be square or dotted; this application does not limit this, as long as the checkerboard grid carries special markings to provide auxiliary information.
[0041] The first region can represent the area containing the specially marked checkerboard pattern in the image. The corner points of the first checkerboard pattern are the corner points corresponding to the specially marked points within the first region. Taking a QR code as an example, the specially marked point... Figure 4 As shown, the area where the QR code is located is taken as the first area, and the four corner points of the QR code ( () is used as the corner point of the first chessboard square.
[0042] Physical coordinates, also known as checkerboard coordinates, are the actual two-dimensional coordinates of each corner point in a checkerboard image. Understandably, the physical coordinates of checkerboard corner points are fixed and accurately representable. The origin and axis directions of the physical coordinate system can be set according to actual needs. The coordinate unit can be a single checkerboard square or the physical dimension of a checkerboard square (in millimeters).
[0043] For example, such as Figure 5 As shown, the origin of the chessboard coordinate system This can be the top-left corner of the entire chessboard image, with the positive X-axis pointing horizontally to the right and the positive Y-axis pointing vertically downwards. Each corner point corresponds to an index and coordinates. The index at is For example: coordinates The index at this location is 0, and the coordinates are... The index at this location is 1, and the coordinates are... The index at this location is 18, and the coordinates are... The index at point 19 is followed by the index at point 19, and so on, with the last coordinate at the bottom right corner being... The corner index is 341.
[0044] Image coordinates can be the pixel coordinates of each corner point in the chessboard image. Understandably, in corner detection, the corner image coordinates obtained directly or indirectly will have a certain degree of error; generally, the error of the initially obtained corner image coordinates is at the pixel level. Therefore, to obtain high-precision corner image coordinates, sub-pixel-level detection and localization are often required to ultimately obtain sub-pixel-precision image coordinates for each corner point.
[0045] Because of the special markers located in fixed positions, additional auxiliary information is provided for the detection of chessboard corner points. Therefore, the accurate physical coordinates and image coordinates (i.e., target image coordinates) of each first chessboard corner point in the first region where the special markers are located can be obtained directly through the code reading algorithm. However, it should be noted that the accuracy (error) of the image coordinates obtained by different code reading algorithms is also different, and there may be pixel-level or sub-pixel-level errors.
[0046] In practical applications, server 104 can use a code-reading algorithm to obtain the physical coordinates and target image coordinates of each corner point of the first chessboard grid contained in the first region of the chessboard image, which contains a special marker code. However, for other chessboard grid corner points outside the first region, only their physical coordinates can be determined. The precise image coordinates of the other chessboard grid corner points outside the first region need to be obtained through corner detection methods.
[0047] Step S204: Calculate the physical coordinates of each corner point of the second chessboard grid in the second region based on the physical coordinates of each corner point of the first chessboard grid, and determine the initial image coordinates of each corner point of the second chessboard grid based on the physical coordinates of each corner point of the second chessboard grid and the homography transformation relationship.
[0048] Understandably, the second region is the area in the checkerboard image that includes the first region and its surrounding area, and is also the region that extends outward from the first region by a preset offset unit.
[0049] Homography, or homography transformation, can represent the mapping relationship from physical coordinate projection to image coordinates while still maintaining the original linear features.
[0050] In a specific implementation, server 104 can estimate the homography transformation relationship representing the local mapping relationship of the first region based on the physical coordinates of each first chessboard corner point and the target image coordinates; based on the physical coordinates of each first chessboard corner point, it can extend the first region to the periphery by a preset unit to obtain the second region, thereby calculating the physical coordinates of each second chessboard corner point contained in the second region, and determining the initial image coordinates of each second chessboard corner point based on the physical coordinates of each second chessboard corner point and the homography transformation relationship.
[0051] In the example where a QR code is specially marked, if the preset unit for expansion is one checkerboard square, taking the corner point of the checkerboard square above the QR code as an example, the second area and the corner point of the second checkerboard square are as follows: Figure 6 As shown. The index of the corner point in the row above the QR code is... The corresponding chessboard coordinates (i.e., physical coordinates) are as follows: Using homography transformation relationship The image coordinates of the corner points in this row can be extrapolated and estimated as follows: .
[0052] It should be noted that since the homography transformation relationship, which only represents the local mapping relationship, has errors and is affected by factors such as image distortion, the initial image coordinates of the extrapolated second region may be inaccurate. Therefore, it is necessary to correct and fit the initial image coordinates using image information to determine the target image coordinates of each second chessboard corner point in the second region.
[0053] Step S206: Obtain the corner response value corresponding to each pixel in the chessboard image, and determine the target image coordinates of each second chessboard corner point based on the corner response value and the initial image coordinates of each second chessboard corner point.
[0054] In practical applications, server 104 can obtain the corner response values corresponding to each pixel in the chessboard image, and based on the corner response values of each pixel and the initial image coordinates of the second region obtained by extrapolation, correct and fit the initial image coordinates of each second chessboard corner point to determine the target image coordinates of each second chessboard corner point.
[0055] Step S208: Determine the updated homography transformation relationship based on the physical coordinates and target image coordinates of each second chessboard corner point, as well as the physical coordinates and target image coordinates of each first chessboard corner point.
[0056] Continue with the top row of corner dots of the QR code (index is...) Taking the corner points as an example, after obtaining their accurate image coordinates (i.e., the target image coordinates of the second checkerboard corner points) through correction fitting, their target image coordinates and the target image coordinates of the four corner points of the QR code (i.e., the target image coordinates of the first checkerboard corner points) are combined and re-estimated using the following formula (1) to estimate the new homography transformation relationship. :
[0057]
[0058] In equation (1), Indicates the first Image coordinates of the corner points of the chessboard. Indicates the first The physical coordinates of the corner points of the chessboard. Similarly, the other three directions (left, right, and down) are extrapolated in the same way, and the new homography transformation relationships are estimated, yielding: Thus, the first extrapolation traversal was completed, and the corner points of the chessboard that were traversed were as follows: Figure 7 As shown.
[0059] Step S210: The second region is used as the new first region, and the process returns to the step of calculating the physical coordinates of each second chessboard corner point contained in the second region based on the physical coordinates of each first chessboard corner point, until the first region is a complete image region of the chessboard image.
[0060] Understandably, in order to obtain the accurate image coordinates of all the corner points of the chessboard in the complete chessboard image, it is necessary to go through a continuous extrapolation iterative process centered on the first region.
[0061] For example, following the aforementioned process, based on the four newly obtained homography transformations Then, extrapolation is performed again in each of the four directions (up, down, left, and right) of the second region to obtain four new sets of corner point image coordinates. The homography transformation H is then re-estimated using the physical coordinates of these corner points and the target image coordinates. The checkerboard corner points after the second extrapolation traversal are shown below. Figure 8 As shown. Repeat this process until all corners of the chessboard have been extrapolated and traversed. The final chessboard corner detection result is as follows. Figure 9 As shown.
[0062] The aforementioned checkerboard corner detection method obtains the physical coordinates of each first checkerboard corner point within a first region of the checkerboard image, along with the target image coordinates. This allows the use of auxiliary information provided by the first region, eliminating the need for extensive hypothesis verification and accurately obtaining the physical coordinates of the first checkerboard corner points and the target image coordinates, thus reducing time consumption during corner detection. Based on the physical coordinates of each first checkerboard corner point, the method determines the physical coordinates of each second checkerboard corner point within a second region. Then, based on homography transformation, the physical coordinates of each second checkerboard corner point are converted into initially inaccurate image coordinates. Finally, based on the corner response values corresponding to each pixel in the checkerboard image, the method can detect the corner points of the second checkerboard grid. The initial image coordinates of the checkerboard corner points are fitted and corrected to determine the accurate target image coordinates of the second checkerboard corner points. Then, based on the physical coordinates and target image coordinates of each second checkerboard corner point, as well as the physical coordinates and target image coordinates of each first checkerboard corner point, the homography transformation relationship is updated. Finally, the second region is used as the new first region. Through continuous extrapolation and iterative updating, it can be ensured that even if the checkerboard is dirty, damaged, or partially occluded, a sufficient number of effective checkerboard corner points can still be accurately detected, thereby obtaining high-precision image coordinates of all checkerboard corner points. This solves the problem of low accuracy of checkerboard corner point coordinates in traditional techniques for checkerboard corner point detection.
[0063] In some embodiments, obtaining the corner response values corresponding to each pixel in the checkerboard image, and determining the target image coordinates of each second checkerboard corner point based on the corner response values and the initial image coordinates of each second checkerboard corner point, includes:
[0064] Perform a Radon transform on the chessboard image to obtain the corner response values corresponding to each pixel in the chessboard image;
[0065] Within a first preset window centered on the current initial image coordinates, the target response corner point within the first preset window is determined based on the corner point response value; and the image coordinates of the target response corner point are determined based on the pixel distance between the target response corner point and the current initial image coordinates.
[0066] Within a second preset window centered on the target response corner point, parabolic fitting is performed on the image coordinates of each target response corner point to obtain the target image coordinates of each second checkerboard corner point.
[0067] Understandably, the current initial image coordinates are any one of the initial image coordinates of each of the second chessboard corner points.
[0068] The second preset window is smaller than the first preset window. For example, the first preset window can be set to 10×10 pixels, and the second preset window can be set to 5×5 pixels.
[0069] In practical applications, server 104 can perform Radon transform on the checkerboard image to calculate the grayscale value of each pixel in the checkerboard image, such as... Figure 10 As shown, a higher grayscale value indicates a stronger response of that pixel, thus obtaining the corner response values corresponding to each pixel in the checkerboard image. Taking the corner point with index 116 as an example, the corner response values within the first preset window (10×10) centered on the corner point at index 116 are as follows: Figure 11 As shown. Understandably, the corner response values corresponding to each pixel in a checkerboard image can also be response values obtained through other types, such as the Harris corner response (a corner response measure proposed by Harris et al.).
[0070] It should be noted that the target response point found at this time may not be consistent with the second checkerboard corner point to be detected, and the initial image coordinates of the second region obtained through local homography transformation are also inaccurate. Therefore, this embodiment uses the image coordinates corresponding to the determined target response corner point as the corrected corner point image coordinates, and uses these corrected target response corner point image coordinates to perform sub-pixel accuracy detection fitting, that is: the image coordinates of the target response corner point are determined based on the pixel distance between the target response corner point and the current initial image coordinates. Within a second preset window centered on the target response corner points, the image coordinates of each target response corner point are displayed. Parabolic fitting was performed to obtain the target image coordinates of each second chessboard corner point. .
[0071] It is understandable that, based on the pixel distance between each corner point within the second preset window and the current initial image coordinates, the corrected image coordinates of each corner point within the second preset window can also be obtained. .
[0072] The technical solution of this embodiment obtains the corner response values corresponding to each pixel in the checkerboard image by performing a Radon transform on the checkerboard image. Within a first preset window centered on the current initial image coordinates, the target response corners within the first preset window are determined based on the corner response values. This allows for the detection of a sufficient number of effective checkerboard corners even when the checkerboard is dirty, damaged, or partially occluded, providing an important basis for subsequent fitting and correction. Then, the image coordinates of the target response corners are determined based on the pixel distance between the target response corners and the current initial image coordinates. Within a second preset window centered on the target response corners, parabolic fitting is performed on the image coordinates of each target response corner to obtain the target image coordinates of each second checkerboard corner. This allows for sub-pixel precision detection and positioning through two-dimensional parabolic fitting, enabling accurate determination of the target image coordinates of each second checkerboard corner, thus ensuring the smooth implementation of the subsequent camera calibration process.
[0073] In corner detection, considering that some detected corners (such as false corners that are mistakenly detected due to dirt, damage or occlusion) may be occluded, resulting in the target response corner determined in the first preset window not being a checkerboard corner, it is necessary to determine the validity of the detected checkerboard corners.
[0074] In some embodiments, determining the target response corner point within a first preset window centered on the current initial image coordinates, based on the corner point response value, includes:
[0075] Based on the corner response values, determine the corner with the strongest response across the entire image and the corner with the strongest local response;
[0076] A preset threshold is determined based on the corner response value corresponding to the corner with the strongest response in the entire image.
[0077] If the corner response value corresponding to the strongest local response corner is greater than a preset threshold, the strongest local response corner will be used as the target response corner within the first preset window.
[0078] Among them, the corner point with the strongest response in the whole image can be the corner point with the largest corner response value in the chessboard image, and the corner point with the strongest local response can be the corner point with the largest corner response value within the first preset window.
[0079] In practical implementation, the corner response value corresponding to the strongest response corner in the entire graph can be used as a basis. Determine the preset threshold ,in It is a threshold parameter, which is usually set to 0.1.
[0080] It should be noted that the corner points of a chessboard, being black and white intersections, often have higher response values than those of fake corner points due to dirt or damage. Therefore, the corner response value corresponding to the strongest local response corner is... Greater than the preset threshold In the case of the strongest corner response value within the first preset window (i.e., the corner response value corresponding to the strongest local response corner), the response value is determined by the corner response value of the strongest local response corner. Satisfying Relationship: If the local strongest response corner is considered a valid chessboard corner, then the local strongest response corner can be used as the target response corner. .
[0081] The technical solution of this embodiment obtains the strongest response corner point in the entire image and the strongest response corner point locally based on the corner point response value. Using the strongest response corner point in the entire image as a benchmark, a preset threshold is determined. The response value of the corner point corresponding to the strongest response corner point in the local image is judged by the threshold. If the response value of the corner point corresponding to the strongest response corner point in the local image is greater than the preset threshold, the strongest response corner point in the local image is taken as the target response corner point. This realizes the validity judgment of the detected chessboard corner points, thereby avoiding the influence of false corner points that are falsely detected due to factors such as dirt, damage or occlusion.
[0082] To obtain high-precision image coordinates of the checkerboard corner points, subpixel-precision localization detection is often required (such as the cornerSubPix function implemented in OpenCV). In this embodiment, at the detected valid checkerboard corner point location, a 2D parabolic surface is fitted within a second preset window, centered on the local strongest response corner point (target response corner point), to achieve subpixel-precision localization.
[0083] In some embodiments, within a second preset window centered on the target response corner point, parabolic fitting is performed on the image coordinates of each target response corner point to obtain the target image coordinates of each second checkerboard corner point, including:
[0084] Based on the preset parabolic fitting model, the maximum point of the parabolic fitting model is calculated within a second preset window centered on the target response corner point.
[0085] Based on the offset of the maximum point relative to the target response corner point, the image coordinates of each target response corner point are updated to obtain the target image coordinates of each second chessboard corner point.
[0086] For example, the preset parabolic fitting model can be as shown in equation (2):
[0087]
[0088] In equation (2), Representing corner points The corner response value, There are 6 parameters to be estimated.
[0089] In practical applications, server 104 can obtain the maximum point of the parabolic fitting model based on the parabolic fitting model shown in equation (2), within a second preset window centered on the target response corner point, for example, within a 5×5 second preset window. According to the maximum point The image coordinates of each target response corner point are determined relative to the offset of the target response corner point using the following formula (3). The update process is performed to obtain the target image coordinates of each corner point of the second chessboard grid. :
[0090]
[0091] The technical solution of this embodiment calculates the maximum point of the parabolic fitting model within a second preset window centered on the target response corner point by using a preset parabolic fitting model. Based on the offset of the maximum point relative to the target response corner point, the image coordinates of each target response corner point are updated. This enables sub-pixel precision positioning and detection using 2D parabolic fitting within the second preset window, thereby fitting and correcting the image coordinates of each target response corner point, providing an important basis for obtaining high-precision image coordinates of the checkerboard corner points.
[0092] In some embodiments, based on a preset parabolic fitting model, the maximum point of the parabolic fitting model is calculated within a second preset window centered on the target response corner point, including:
[0093] Based on the pixel distance between each corner point in the second preset window centered on the target response corner point and the current initial image coordinates, determine the image coordinates of each corner point in the second preset window; input the image coordinates of each corner point in the second preset window and the corner response value into a preset parabolic fitting model with multiple parameters to be estimated, and obtain the overdetermined system of equations in the second preset window.
[0094] Based on the overdetermined equations, the parameters to be estimated in the parabolic fitting model are solved to determine the parameter values of each parameter.
[0095] Based on the parameter values of each parameter to be estimated, determine the maximum point of the parabolic fitting model.
[0096] Taking a second preset window of size 5×5 pixels as an example, there are 25 pixels within the 5×5 window. The server 104 can obtain the image coordinates of each corner point within the second preset window based on the pixel distance between each corner point and the current initial image coordinates. The image coordinates of each corner point within the second preset window. And the corner response values of each corner point within the second preset window. The input is given by equation (2) which contains multiple parameters to be estimated. By fitting the parabolic surface model, we obtain an overdetermined system of equations within the second preset window. Therefore, we can obtain the following 25 overdetermined equations:
[0097]
[0098] In equation (4), .
[0099] The overdetermined system of equations (4) is a standard linear least squares problem. Therefore, the parameters to be estimated in the parabolic fitting model can be solved using SVD (Singular Value Decomposition) to obtain the estimated parameters. The parameter value.
[0100] Furthermore, based on the parameters to be estimated The parameter values can be obtained from the maximum point of the parabolic fitting model using the following equation (5). :
[0101]
[0102] Then, the maximum point is found. Relative to target response corner The offset is:
[0103]
[0104] The technical solution of this embodiment inputs the image coordinates of each corner point in the second preset window and the corner response values of each corner point in the second preset window into a preset parabolic fitting model with multiple parameters to be estimated, and solves the parameters to be estimated in the parabolic fitting model to obtain the maximum point of the parabolic fitting model. Thus, based on the offset of the maximum point relative to the target response corner point, an important reference can be provided for correcting the initial image coordinates of the second region.
[0105] Traditional checkerboard corner detection methods typically use the Harris corner detector to obtain a set of candidate corner points. However, during the corner point sorting and identification process after obtaining the candidate corner point set, due to the lack of additional information provided by QR codes, a large number of hypothesis verifications are required to filter out the true corner point set and determine their order and row / column. This results in a very time-consuming hypothesis verification process, and corner point identification is easily affected by false corner points (corners falsely detected due to dirt or damage), making it difficult to solve the problem of partially occluded checkerboard points. To reduce hypothesis verification during corner point detection and to accurately detect valid corner points, this application uses a checkerboard with special markings (e.g., QR codes or Aruco codes (Hamming code grids)) to provide additional auxiliary information.
[0106] In this embodiment of the application, an example using a QR code as a special marker is given. The checkerboard image carries a QR code image, and the first region is the image region corresponding to the QR code image. Therefore, in some embodiments, obtaining the physical coordinates of each corner point of the first checkerboard grid contained in the first region of the checkerboard image and the coordinates of the target image includes:
[0107] The QR code content of the QR code image is obtained through a preset reading algorithm; the QR code content includes the center coordinates of the QR code.
[0108] Based on the center coordinates of the QR code, determine each corner point of the QR code image, and determine the image area containing each QR code corner point as the first region, as well as the physical coordinates of each first checkerboard corner point in the first region and the target image coordinates.
[0109] Among them, the center coordinates of the QR code can be the physical coordinates of the center of the QR code image within the checkerboard grid.
[0110] For example, such as Figure 5 The checkerboard image with the QR code shown can be read using a code-reading algorithm as follows:
[0111]
[0112] Where (6,10) represents the coordinates of the center of the QR code on the checkerboard (column 6, row 10), P5 represents the physical size of each square on the checkerboard is 5 mm, M3 represents that the QR code square occupies 3*3=9 squares (there is also a black border around the QR code square, the width of which is fixed at 0.5 squares, so each QR code area occupies 4*4=16 squares considering the black border), W20 represents that each row of the checkerboard has 20 squares, and H19 represents that each column of the checkerboard has 19 squares. X24 represents the number of squares between two QR codes in the x-direction (horizontal) is 24, and Y8 represents the number of squares between two QR codes in the y-direction (vertical) is 8.
[0113] Furthermore, server 104 can determine the corner points of the QR code image based on the center coordinates (6,10). The four corner points of the QR code are as follows: Figure 4 As shown, considering that there may be a black border with a width of 0.5 squares around the QR code square, the area containing the QR code square and the black border around the QR code can be regarded as the first region (a total of 16 checkerboard squares). The four corner points of the first region can be determined as the corner points of the first checkerboard square. Then, the physical coordinates of each corner point of the first checkerboard square in the first region and the coordinates of the target image can be obtained directly or indirectly through the code reading algorithm. For example, the physical coordinates of the upper left corner point of each corner point of the first checkerboard square in the first region are (4,8).
[0114] The technical solution of this embodiment obtains the QR code content, including the center coordinates of the QR code, from the QR code image through a code reading algorithm. By utilizing the auxiliary information carried by the QR code, the corner points of the QR code image can be accurately determined, and the region containing each QR code corner point is determined as the first region. The physical coordinates of each first checkerboard corner point in the first region and the target image coordinates are obtained, thereby avoiding the large number of hypothesis verification processes in the traditional checkerboard corner point detection process and reducing the time consumption of checkerboard corner point detection.
[0115] In some embodiments, after determining the image region containing each QR code corner point as a first region, and the physical coordinates of each first checkerboard corner point in the first region and the target image coordinates, the method further includes:
[0116] Based on the physical coordinates of each corner point of the first chessboard grid and the target image coordinates, the homography transformation relationship is obtained; wherein, the homography transformation relationship is used to characterize the mapping relationship of each corner point of the first chessboard grid from the physical coordinate projection transformation to the image coordinates.
[0117] Taking a QR code as an example of a special marker, after determining the image region containing each QR code corner point as the first region, and the physical coordinates of each first checkerboard corner point in the first region and the target image coordinates, the server 104 can obtain the homography transformation relationship based on the physical coordinates of the QR code corner points and the target image coordinates obtained through a preset code reading algorithm. Figure 4 For example, based on the checkerboard coordinates (6,10) of the center of the QR code, the physical coordinates of the four corner points of the QR code can be calculated, thereby estimating the distance from the physical coordinates to the image coordinates of the QR code corner points. Local homography transformation :
[0118]
[0119] In equation (6), Indicates the first The physical coordinates of the corner points of the QR code Indicates the first Image coordinates of the corner points of the QR code The method for estimating homography transformation relationships can use the findHomography function in OpenCV (Open Source Computer Vision Library), which is a function for estimating homography transformations.
[0120] The technical solution of this embodiment obtains the homography transformation relationship reflecting the local mapping relationship of the first region by using the physical coordinates of each first chessboard corner point and the target image coordinates, thereby providing an important basis for extrapolating the image coordinates of the chessboard corner points around the QR code.
[0121] In some embodiments, calculating the physical coordinates of each corner point of the second chessboard grid within the second region based on the physical coordinates of each corner point of the first chessboard grid includes:
[0122] Based on the four directions of the first region, the physical coordinates of each corner point of the first chessboard grid in the corresponding direction are shifted outward by one unit to obtain the physical coordinates of each corner point of the second chessboard grid contained in the second region.
[0123] Understandably, one unit represents a single square in a checkerboard image.
[0124] In practical applications, after determining the first region through a preset code-reading algorithm and accurately obtaining the physical coordinates of each first chessboard corner point and the target image coordinates within the first region, the server 104 can shift the physical coordinates of each first chessboard corner point in the four directions (up, down, left, right) of the first region outward by one square unit and shift them upward by one unit to obtain the vertical coordinate of the physical coordinates. Offset downwards by one unit to the ordinate of the physical coordinates If the horizontal coordinate is shifted one unit to the left, the x-coordinate of the physical coordinate will be... If the x-coordinate of the physical coordinate is shifted one unit to the right... This allows us to obtain the physical coordinates of each corner point of the second chessboard grid within the second region.
[0125] In the example where a QR code is used as a special marker, taking the extrapolation of the corner points of a row of checkerboard grids above the QR code as an example, after determining the first region containing the QR code square and the black border around the QR code, the four corner points of the first region are determined as the corner points of the first checkerboard grid. Figure 4 For example, following the direction from the top left of the first region, the physical coordinates of the top left corner of the first region are: Offset this coordinate by one unit upwards and to the left, i.e. Then the physical coordinates of the upper left corner of the second region are obtained as follows: Its corresponding index is 116; following the direction from the upper right of the first region, the physical coordinates of the upper right corner of the first region are... Offset this coordinate upwards and to the right by one unit, that is Then the physical coordinates of the upper left corner of the second region are obtained as follows: Its corresponding index is 122. Therefore, the diagram showing the row of chessboard corner points above the extended QR code (the chessboard corner points in the upper direction of the second area) is as follows: Figure 6 As shown. Similarly, the diagrams of the extended second region and the corner points of the second chessboard grid are shown below. Figure 7 As shown.
[0126] The technical solution of this embodiment obtains the physical coordinates of the corner points of the second chessboard grids contained in the second region by shifting the physical coordinates of each corner point of the first chessboard grid outward by one unit according to the four directions of the first region. This realizes the coordinate extrapolation process from the first region to the second region.
[0127] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0128] Based on the same inventive concept, this application also provides a chessboard corner detection device. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more chessboard corner detection device embodiments provided below can be found in the limitations of the chessboard corner detection method above, and will not be repeated here.
[0129] like Figure 12 As shown, this application embodiment provides a chessboard corner detection device 1200, including:
[0130] The acquisition module 1210 is used to acquire the physical coordinates of each corner point of the first chessboard grid contained in the first region of the chessboard grid image and the coordinates of the target image.
[0131] The coordinate acquisition module 1220 is used to calculate the physical coordinates of each corner point of the second chessboard grid contained in the second region based on the physical coordinates of each corner point of the first chessboard grid, and to determine the initial image coordinates of each corner point of the second chessboard grid based on the physical coordinates of each corner point of the second chessboard grid and the homography transformation relationship; the second region is the region of the chessboard grid that contains the first region and its surrounding area.
[0132] The coordinate update module 1230 is used to obtain the corner response value corresponding to each pixel in the chessboard image, and determine the target image coordinates of each second chessboard corner based on the corner response value and the initial image coordinates of each second chessboard corner.
[0133] The relationship update module 1240 is used to determine the updated homography transformation relationship based on the physical coordinates and target image coordinates of each second chessboard corner point, as well as the physical coordinates and target image coordinates of each first chessboard corner point.
[0134] The loop module 1250 is used to take the second region as the new first region and return to the step of calculating the physical coordinates of each second chessboard corner point contained in the second region based on the physical coordinates of each first chessboard corner point, until the first region is the complete image region of the chessboard image.
[0135] In some embodiments, in obtaining the corner response values corresponding to each pixel in the checkerboard image, and determining the target image coordinates of each second checkerboard corner based on the corner response values and the initial image coordinates of each second checkerboard corner, the coordinate update module 1230 is specifically used for:
[0136] Perform a Radon transform on the chessboard image to obtain the corner response values corresponding to each pixel in the chessboard image;
[0137] Within a first preset window centered on the current initial image coordinates, the target response corner point within the first preset window is determined based on the corner point response value; and the image coordinates of the target response corner point are determined based on the pixel distance between the target response corner point and the current initial image coordinates; the current initial image coordinates are any one of the initial image coordinates of each second chessboard corner point;
[0138] Within a second preset window centered on the target response corner point, parabolic fitting is performed on the image coordinates of each target response corner point to obtain the target image coordinates of each second checkerboard corner point; the size of the second preset window is smaller than that of the first preset window.
[0139] In some embodiments, regarding determining the target response corner point within a first preset window centered on the current initial image coordinates, the coordinate update module 1230 is specifically used for:
[0140] Based on the corner response values, determine the strongest response corner in the entire image and the strongest response corner in the local area; the strongest response corner in the entire image is the corner with the largest corner response value in the chessboard image, and the strongest response corner in the local area is the corner with the largest corner response value within the first preset window;
[0141] A preset threshold is determined based on the corner response value corresponding to the corner with the strongest response in the entire image.
[0142] If the corner response value corresponding to the strongest local response corner is greater than a preset threshold, the strongest local response corner will be used as the target response corner within the first preset window.
[0143] In some embodiments, within a second preset window centered on the target response corner point, parabolic fitting is performed on the image coordinates of each target response corner point to obtain the target image coordinates of each second checkerboard corner point. Specifically, the coordinate update module 1230 is used for:
[0144] Based on the preset parabolic fitting model, the maximum point of the parabolic fitting model is calculated within a second preset window centered on the target response corner point.
[0145] Based on the offset of the maximum point relative to the target response corner point, the image coordinates of each target response corner point are updated to obtain the target image coordinates of each second chessboard corner point.
[0146] In some embodiments, regarding the calculation of the maximum point of the parabolic fitting model within a second preset window centered on the target response corner point, based on a preset parabolic fitting model, the coordinate update module 1230 is specifically used for:
[0147] Based on the pixel distance between each corner point in the second preset window centered on the target response corner point and the current initial image coordinates, determine the image coordinates of each corner point in the second preset window; input the image coordinates of each corner point in the second preset window and the corner response value into a preset parabolic fitting model with multiple parameters to be estimated, and obtain the overdetermined system of equations in the second preset window.
[0148] Based on the overdetermined equations, the parameters to be estimated in the parabolic fitting model are solved to determine the parameter values of each parameter.
[0149] Based on the parameter values of each parameter to be estimated, determine the maximum point of the parabolic fitting model.
[0150] In some embodiments, the checkerboard image carries a QR code image, and the first region is the image region corresponding to the QR code image; in obtaining the physical coordinates of each corner point of the first checkerboard grid contained in the first region of the checkerboard image and the target image coordinates, the acquisition module 1210 is specifically used for:
[0151] The QR code content of the QR code image is obtained through a preset reading algorithm; the QR code content includes the center coordinates of the QR code, which are the physical coordinates of the center of the QR code image in the checkerboard grid.
[0152] Based on the center coordinates of the QR code, determine each corner point of the QR code image, and determine the image area containing each QR code corner point as the first region, as well as the physical coordinates of each first checkerboard corner point in the first region and the target image coordinates.
[0153] In some embodiments, the acquisition module 1210 is further configured to: obtain a homography transformation relationship based on the physical coordinates of each first chessboard corner point and the target image coordinates; the homography transformation relationship is used to characterize the mapping relationship of each first chessboard corner point from physical coordinate projection transformation to image coordinates.
[0154] In some embodiments, in calculating the physical coordinates of each second chessboard corner point contained in the second region based on the physical coordinates of each first chessboard corner point, the coordinate acquisition module 1220 is specifically used for:
[0155] Based on the four directions of the first region, the physical coordinates of each corner point of the first chessboard grid in the corresponding direction are shifted outward by one unit to obtain the physical coordinates of each corner point of the second chessboard grid contained in the second region; one unit represents one square of the chessboard grid in the chessboard grid image.
[0156] Each module in the aforementioned chessboard corner detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0157] In some embodiments, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 13As shown, the computer device includes a processor, memory, input / output interfaces (I / O), a communication interface, a display unit, and input devices. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface, display unit, and input devices are also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores data related to the chessboard corner detection method. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements the steps in the chessboard corner detection method described above. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen; the input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs or touchpads set on the casing of the computer device, or external keyboards, touchpads or mice, etc.
[0158] Those skilled in the art will understand that Figure 13 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0159] In some embodiments, a computer device is provided, the computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps in the various embodiments of the chessboard corner detection method described above.
[0160] In some embodiments, such as Figure 14 The diagram shows the internal structure of a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the various embodiments of the chessboard corner detection method described above.
[0161] In some embodiments, a computer program product is provided, which includes a computer program that, when executed by a processor, implements the steps in the various embodiments of the chessboard corner detection method described above.
[0162] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0163] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic resistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence processors, etc., and are not limited to these.
[0164] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0165] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for detecting corner points of a chessboard grid, characterized in that, include: Obtain the physical coordinates of each corner point of the first chessboard grid contained in the first region of the chessboard grid image, as well as the coordinates of the target image. Based on the physical coordinates of each of the first chessboard corner points, the physical coordinates of each of the second chessboard corner points contained in the second region are calculated, and the initial image coordinates of each of the second chessboard corner points are determined based on the physical coordinates of each of the second chessboard corner points and the homography transformation relationship; the second region is the region in the chessboard image that contains the first region and its surrounding area. Obtain the corner response value corresponding to each pixel in the chessboard image, and determine the target image coordinates of each second chessboard corner based on the corner response value and the initial image coordinates of each second chessboard corner. Based on the physical coordinates and target image coordinates of each second chessboard corner point, and the physical coordinates and target image coordinates of each first chessboard corner point, the updated homography transformation relationship is determined. The second region is used as the new first region, and the process returns to the step of calculating the physical coordinates of each second chessboard corner point contained in the second region based on the physical coordinates of each first chessboard corner point, until the first region is the complete image region of the chessboard image.
2. The method according to claim 1, characterized in that, The step of obtaining the corner response values corresponding to each pixel in the chessboard image, and determining the target image coordinates of each second chessboard corner based on the corner response values and the initial image coordinates of each second chessboard corner, includes: Perform a Radon transform on the chessboard image to obtain the corner response values corresponding to each pixel in the chessboard image; Within a first preset window centered on the current initial image coordinates, a target response corner point is determined within the first preset window based on the corner point response value; and the image coordinates of the target response corner point are determined based on the pixel distance between the target response corner point and the current initial image coordinates; the current initial image coordinates are any one of the initial image coordinates of each of the second chessboard corner points; Within a second preset window centered on the target response corner point, parabolic fitting is performed on the image coordinates of each target response corner point to obtain the target image coordinates of each second checkerboard corner point; the size of the second preset window is smaller than the first preset window.
3. The method according to claim 2, characterized in that, The step of determining the target response corner point within a first preset window centered on the current initial image coordinates, based on the corner point response value, includes: Based on the corner response values, the strongest response corner in the entire image and the strongest response corner in a local area are determined; the strongest response corner in the entire image is the corner with the largest corner response value in the chessboard image, and the strongest response corner in a local area is the corner with the largest corner response value within the first preset window; Based on the corner response value corresponding to the strongest response corner in the entire image, a preset threshold is determined; If the corner response value corresponding to the strongest local response corner is greater than the preset threshold, the strongest local response corner will be used as the target response corner within the first preset window.
4. The method according to claim 2, characterized in that, The step of performing parabolic fitting on the image coordinates of each target response corner point within a second preset window centered on the target response corner point to obtain the target image coordinates of each second checkerboard corner point includes: Based on a preset parabolic fitting model, the maximum point of the parabolic fitting model is calculated within a second preset window centered on the target response corner point. Based on the offset of the maximum point relative to the target response corner point, the image coordinates of each target response corner point are updated to obtain the target image coordinates of each second chessboard corner point.
5. The method according to claim 4, characterized in that, The parabolic fitting model based on a preset method calculates the maximum point of the parabolic fitting model within a second preset window centered on the target response corner point, including: Based on the pixel distance between each corner point in the second preset window centered on the target response corner point and the current initial image coordinates, the image coordinates of each corner point in the second preset window are determined; the image coordinates of each corner point in the second preset window and the corner point response value are input into a preset parabolic fitting model with multiple parameters to be estimated, and an overdetermined set of equations in the second preset window is obtained. Based on the overdetermined set of equations, the parameters to be estimated in the parabolic fitting model are solved to determine the parameter values of each parameter to be estimated. Based on the parameter values of each of the parameters to be estimated, the maximum point of the parabolic fitting model is determined.
6. The method according to claim 1, characterized in that, The chessboard image carries a QR code image, and the first region is the image region corresponding to the QR code image; obtaining the physical coordinates of each corner point of the first chessboard grid and the target image coordinates contained in the first region of the chessboard image includes: The QR code content of the QR code image is obtained through a preset reading algorithm; the QR code content includes the center coordinates of the QR code, which are the physical coordinates of the center of the QR code image in the chessboard grid. Based on the center coordinates of the QR code, each corner point of the QR code image is determined, and the image region containing each corner point of the QR code is determined as the first region, as well as the physical coordinates of each first checkerboard corner point of the first region and the target image coordinates.
7. The method according to claim 6, characterized in that, After determining the image region containing each of the QR code corner points as the first region, and the physical coordinates of each first checkerboard corner point of the first region and the target image coordinates, the method further includes: The homography transformation relationship is obtained based on the physical coordinates of each of the first chessboard corner points and the target image coordinates; the homography transformation relationship is used to characterize the mapping relationship of each of the first chessboard corner points from physical coordinate projection to image coordinates.
8. The method according to claim 1, characterized in that, The step of calculating the physical coordinates of each corner point of the second chessboard grid within the second region based on the physical coordinates of each corner point of the first chessboard grid includes: Based on the four directions of the first region, the physical coordinates of each corner point of the first chessboard grid in the corresponding direction are shifted outward by one unit to obtain the physical coordinates of each corner point of the second chessboard grid contained in the second region; the one unit represents a chessboard grid square in the chessboard grid image.
9. A chessboard corner detection device, characterized in that, include: The acquisition module is used to acquire the physical coordinates of each corner point of the first chessboard grid contained in the first region of the chessboard grid image and the coordinates of the target image. The coordinate acquisition module is used to calculate the physical coordinates of each corner point of the second chessboard grid contained in the second region based on the physical coordinates of each corner point of the first chessboard grid, and to determine the initial image coordinates of each corner point of the second chessboard grid based on the physical coordinates of each corner point of the second chessboard grid and the homography transformation relationship; the second region is the region of the chessboard grid that includes the first region and its surrounding area. The coordinate update module is used to obtain the corner response value corresponding to each pixel in the chessboard image, and determine the target image coordinates of each second chessboard corner based on the corner response value and the initial image coordinates of each second chessboard corner. The relationship update module is used to determine the updated homography transformation relationship based on the physical coordinates and target image coordinates of each corner point of the second chessboard grid, as well as the physical coordinates and target image coordinates of each corner point of the first chessboard grid. The loop module is used to take the second region as the new first region and return to the step of calculating the physical coordinates of each second chessboard corner point contained in the second region based on the physical coordinates of each first chessboard corner point, until the first region is the complete image region of the chessboard image.
10. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.