Screen mark-based laser spot calibration tracking method, device, equipment and medium

By displaying the AprilTag pattern on the screen and performing point-to-point matching and coordinate mapping, the accuracy and stability issues of existing laser spot tracking calibration methods under different screen conditions are solved, achieving high-precision laser spot tracking and positioning.

CN123181579APending Publication Date: 2026-11-27JIHUA LAB
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611685084.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-29
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing laser spot tracking calibration methods suffer from low feature point extraction accuracy and matching stability under conditions of insufficient screen resolution, tilted shooting angle, or ambient light interference, failing to meet the high-precision calibration requirements of curved screens and spliced ​​screens. Furthermore, traditional methods rely on physical calibration boards, resulting in coplanarity errors.

Method used

The AprilTag pattern is displayed on the screen. By obtaining the coordinates of the AprilTag pattern in the screen and image coordinate systems, point-to-point matching is performed using unique IDs to construct a set of point correspondences. Based on the screen display surface type, a coordinate mapping model is selected to solve the parameters, thereby achieving a high-precision mapping from the light spot image coordinates to the screen coordinates.

Benefits of technology

It achieves high-precision laser spot tracking and positioning under various screen conditions, reduces system errors, adapts to flat and curved screens, and improves the stability and accuracy of feature point extraction and matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123181579A_ABST
    Figure CN123181579A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of visual calibration and laser point tracking, and particularly relates to a screen-marked laser point calibration and tracking method, device, equipment and medium, the method first acquires a screen corner point coordinate set based on each AprilTag pattern displayed on the screen, performs AprilTag detection processing on the acquired screen image to obtain an image corner point coordinate set, performs point pair matching processing on the screen corner point coordinate set and the image corner point coordinate set according to the unique ID of each AprilTag pattern to construct a point correspondence set, determines a coordinate mapping model based on the screen display type of the screen, performs parameter solving processing on the point correspondence set based on the coordinate mapping model to obtain calibration parameters, extracts a light point image coordinate based on a to-be-tracked image, and performs coordinate mapping processing on the light point image coordinate based on the calibration parameters to obtain a light point tracking coordinate, aiming to realize high-precision laser point tracking and positioning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of visual calibration and laser spot tracking technology, and in particular to a method, apparatus, device and medium for laser spot calibration and tracking based on screen marking. Background Technology

[0002] The laser spot tracking system projects infrared laser light onto the screen surface to form spot images. A camera captures these spot images, and coordinate mapping is used to convert the spot positions within the image into screen coordinates. Establishing a precise mapping between the camera image coordinate system and the screen coordinate system is the core prerequisite for this calibration process. Existing calibration methods mainly include physical calibration board calibration and simple pattern display calibration. The physical calibration board method uses a checkerboard, dot array, or similar calibration board placed in front of the screen for calibration. This requires additional fabrication and arrangement of calibration objects, making it difficult to ensure that the calibration board plane is strictly coplanar with the screen plane, easily introducing systematic errors. The simple pattern display method directly displays solid color blocks, crosshairs, or basic geometric shapes on the screen as calibration features. This approach relies heavily on the uniqueness of the calibration features and the robustness of detection. In scenarios with insufficient screen resolution, tilted shooting angles, or ambient light interference, the accuracy of feature point extraction and matching stability will significantly decrease. AprilTag is a visual reference marking system. Each marker has a unique ID and four high-precision corner points, offering strong detection robustness and high corner point localization accuracy. However, most existing solutions use AprilTag as a spatial physical marker in scenarios such as camera intrinsic and extrinsic parameter calibration and robot localization. Coplanarity errors still exist when aligning the physical calibration board with the screen. Meanwhile, traditional laser spot tracking calibration only utilizes the four corners of the screen or a small number of manually calibrated points. The number of calibration points is limited, their spatial distribution is uneven, and the calibration features lack independent identification. Automatic corner point matching is prone to errors in multi-feature scenarios and cannot meet the high-precision calibration requirements of non-planar screens such as curved screens and spliced ​​screens with localized deformation. Summary of the Invention

[0003] In order to overcome the shortcomings of the prior art, the present invention aims to provide a method, device, equipment and medium for laser spot calibration and tracking based on screen markers, which aims to establish a mapping based on the AprilTag displayed on the screen to achieve high-precision tracking and positioning of laser spots.

[0004] The first aspect of this invention provides a method for laser spot calibration and tracking based on screen markers, comprising: displaying at least one AprilTag pattern with a unique ID on a screen, and obtaining the coordinates of each AprilTag pattern in a preset screen coordinate system to obtain a set of coordinates of each AprilTag corner point on the screen, referred to as the screen corner point coordinate set; acquiring a screen image, performing AprilTag detection processing on the screen image to obtain a set of coordinates of each AprilTag corner point on the image, referred to as the image corner point coordinate set; performing point-to-point matching processing on the screen corner point coordinate set and the image corner point coordinate set according to the unique ID of each AprilTag pattern to construct a point correspondence relationship set; determining the screen display surface type of the screen, determining a coordinate mapping model based on the screen display surface type, performing parameter solving processing on the point correspondence relationship set based on the coordinate mapping model to obtain calibration parameters; acquiring an image to be tracked, extracting the spot image coordinates based on the image to be tracked, and performing coordinate mapping processing on the spot image coordinates based on the calibration parameters and the coordinate mapping model to obtain the spot tracking coordinates in the screen coordinate system.

[0005] Optionally, in a first implementation of the first aspect of the present invention, obtaining the coordinates of each AprilTag pattern in a preset screen coordinate system to obtain a set of coordinates of each AprilTag corner point on the screen, referred to as the screen corner point coordinate set, includes: obtaining the top-left pixel coordinates, pixel side length, and preset fixed corner point numbering order of each AprilTag pattern; calculating the top-right, bottom-right, and bottom-left pixel coordinates of the corresponding AprilTag pattern based on the fixed corner point numbering order, the top-left pixel coordinates, and the pixel side length; associating the unique ID of each AprilTag pattern with the fixed corner point numbering order, and aggregating the corresponding top-left, top-right, bottom-right, and bottom-left pixel coordinates according to the fixed corner point numbering order to form the screen corner point coordinate set.

[0006] Optionally, in a second implementation of the first aspect of the present invention, the step of performing AprilTag detection processing on the screen image to obtain a set of coordinates of each AprilTag corner point on the image, referred to as the image corner point coordinate set, includes: using an AprilTag detection algorithm to identify each AprilTag pattern in the screen image, obtaining a unique ID corresponding to each AprilTag pattern and the coordinates of four corner points in a preset image coordinate system; performing sub-pixel thinning processing on the coordinates of all corner points of each AprilTag pattern to obtain four updated corner point coordinates of each AprilTag pattern; associating the unique ID of each AprilTag pattern with the four updated corner point coordinates according to a preset fixed corner point numbering order to form the image corner point coordinate set.

[0007] Optionally, in a third implementation of the first aspect of the present invention, determining the screen display surface type of the screen, determining a coordinate mapping model based on the screen display surface type, and performing parameter solving processing on the point correspondence set based on the coordinate mapping model to obtain calibration parameters includes: determining the screen display surface type of the screen; when the screen display surface type is planar, determining a pre-constructed homography matrix model as the coordinate mapping model, performing homography matrix solving processing on the point correspondence set based on the coordinate mapping model to obtain the calibration parameters; when the screen display surface type is non-planar, determining a pre-constructed polynomial mapping model as the coordinate mapping model, performing polynomial fitting solving processing on the point correspondence set based on the coordinate mapping model to obtain the calibration parameters.

[0008] Optionally, in the fourth implementation of the first aspect of the present invention, the step of solving the homography matrix of the point correspondence set based on the coordinate mapping model to obtain the calibration parameters includes: obtaining matching point pairs of image coordinates and screen coordinates in the point correspondence set based on the homogeneous transformation relationship between screen coordinates and image coordinates corresponding to the coordinate mapping model, and obtaining multiple sets of matching point pairs; inputting the multiple sets of matching point pairs into the coordinate mapping model to construct a coefficient matrix; performing singular value decomposition on the coefficient matrix to obtain the right singular vector corresponding to the minimum singular value of the coefficient matrix; using the right singular vector as a nine-dimensional vector and rearranging the nine-dimensional vector into a 3×3 homography matrix; performing reprojection error verification processing on the homography matrix, and when the verification passes, using the homography matrix as the calibration parameters.

[0009] Optionally, in a fifth implementation of the first aspect of the present invention, the reprojection error verification process for the homography matrix includes: inputting each image coordinate in the point correspondence set into the coordinate mapping model, and calculating the corresponding predicted screen coordinates using the homography matrix; calculating the residual between the predicted screen coordinates and the screen coordinates of each matching point pair, and calculating the average reprojection error; comparing the average reprojection error with a preset error threshold; if the average reprojection error is less than or equal to the error threshold, the verification passes; if the average reprojection error is greater than the error threshold, the verification fails.

[0010] Optionally, in a sixth implementation of the first aspect of the present invention, the step of performing polynomial fitting and solving on the point correspondence set based on the coordinate mapping model to obtain the calibration parameters includes: obtaining matching point pairs of image coordinates and screen coordinates within the point correspondence set based on the polynomial mapping relationship corresponding to the coordinate mapping model, thereby obtaining multiple sets of matching point pairs; inputting the multiple sets of matching point pairs into the coordinate mapping model to construct an overdetermined system of equations; solving the overdetermined system of equations using the least squares method to obtain a polynomial coefficient matrix; and using the polynomial coefficient matrix as the calibration parameters.

[0011] A second aspect of the present invention provides a screen-marked laser spot calibration and tracking device, comprising: a screen corner coordinate acquisition module: used to display at least one AprilTag pattern with a unique ID on the screen, and acquire the coordinates of each AprilTag pattern in a preset screen coordinate system, thereby obtaining a set of coordinates of each AprilTag corner point on the screen, referred to as the screen corner coordinate set; an image corner coordinate acquisition module: used to acquire a screen image, perform AprilTag detection processing on the screen image, and obtain a set of coordinates of each AprilTag corner point on the image, referred to as the image corner coordinate set; and a point-to-point matching module: used for... Based on the unique ID of each AprilTag pattern, point-to-point matching is performed on the set of screen corner coordinates and the set of image corner coordinates to construct a set of point correspondences; Parameter solving module: used to determine the screen display surface type, determine the coordinate mapping model based on the screen display surface type, and perform parameter solving on the set of point correspondences based on the coordinate mapping model to obtain calibration parameters; Tracking module: used to acquire the image to be tracked, extract the light spot image coordinates based on the image to be tracked, and perform coordinate mapping on the light spot image coordinates based on the calibration parameters and the coordinate mapping model to obtain the light spot tracking coordinates in the screen coordinate system.

[0012] A third aspect of the present invention provides a screen-marked laser spot calibration and tracking device, the screen-marked laser spot calibration and tracking device comprising: a memory and at least one processor, the memory storing instructions; at least one processor calling the instructions in the memory to cause the screen-marked laser spot calibration and tracking device to execute each step of the screen-marked laser spot calibration and tracking method described above.

[0013] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the steps of the screen-marked laser spot calibration and tracking method described in any of the preceding claims.

[0014] In the technical solution of this invention, at least one AprilTag pattern with a unique ID is first displayed on the screen, and the coordinates of each AprilTag pattern in a preset screen coordinate system are obtained, resulting in a set of coordinates of each AprilTag corner point on the screen, called the screen corner point coordinate set. A screen image is then acquired, and AprilTag detection processing is performed on the screen image to obtain a set of coordinates of each AprilTag corner point on the image, called the image corner point coordinate set. Based on the unique ID of each AprilTag pattern, point-to-point matching processing is performed on the screen corner point coordinate set and the image corner point coordinate set to construct a set of point correspondences. The screen display surface type is determined, and a coordinate mapping model is determined based on the screen display surface type. Based on the coordinate mapping model, parameter solving processing is performed on the set of point correspondences to obtain calibration parameters. An image to be tracked is acquired, and the coordinates of the light spot image are extracted from the image to be tracked. Based on the calibration parameters, coordinate mapping processing is performed on the light spot image coordinates to obtain the light spot tracking coordinates in the screen coordinate system. The aim is to establish a mapping based on the AprilTag displayed on the screen to achieve high-precision tracking and positioning of laser light spots. Attached Figure Description

[0015] Figure 1 A logic flowchart of the screen-marked laser spot calibration and tracking method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of point pair matching between the screen coordinate system and the image coordinate system of the AprilTag tag provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the calibration and laser spot tracking system provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of the screen-marked laser spot calibration and tracking device provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of a screen-marked laser spot calibration and tracking device provided in an embodiment of the present invention. Detailed Implementation

[0016] This invention provides a method, apparatus, device, and medium for screen-marked laser spot calibration and tracking. In this invention, the terms "first," "second," "third," "fourth," etc. (if present)," in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0017] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 One embodiment of the screen-marked laser spot calibration and tracking method of the present invention includes: 101. Display at least one AprilTag pattern with a unique ID on the screen, and obtain the coordinates of each AprilTag pattern in a preset screen coordinate system to obtain the set of coordinates of each AprilTag corner point on the screen, which is called the screen corner point coordinate set. In this embodiment, when displaying at least one AprilTag pattern with a unique ID on the screen, the display position and size of the AprilTag are adjusted according to the camera's field of view and the minimum detectable size requirement of the AprilTag. This ensures that the pattern can be fully imaged in the camera image with sufficient pixels, while avoiding screen edge occlusion areas and ensuring that the pattern is evenly distributed within the calibrated area. The AprilTag pattern is a visual reference mark with four corner points, and the unique ID is an encoding identifier inherent to the AprilTag, used to distinguish different marks. The preset screen coordinate system uses the upper left corner of the screen display area as the origin, with the horizontal axis to the right and the vertical axis downwards. The coordinate system is set based on the screen resolution and pixel physical size. When the screen is planar, the screen coordinate system adopts a conventional two-dimensional planar coordinate system, with coordinates containing only horizontal and vertical dimensions. When the screen is a curved screen or a non-planar screen with deformation, the screen coordinate system still adopts a two-dimensional pixel coordinate system. The geometric distortion caused by the screen curvature and local deformation is compensated and corrected through nonlinear fitting of a polynomial mapping model. In obtaining the coordinates of AprilTag in a preset screen coordinate system, the top-left pixel coordinates, pixel side length, and preset fixed corner point numbering order of each AprilTag pattern are first obtained. The top-right, bottom-right, and bottom-left pixel coordinates are then calculated using these parameters. These corner point coordinates are then associated with the unique ID corresponding to the AprilTag. All corner point coordinates are collected according to the fixed corner point numbering order, resulting in the set of screen corner point coordinates for each AprilTag. This set contains all screen corner point information for AprilTag tags. This method directly generates calibration marks using the screen. The marks are naturally coplanar with the screen, and the unique IDs ensure reliable differentiation between marks. The corner point coordinates are accurately calculated based on the screen display layout, and calibration points can be evenly distributed within the calibration area, reducing systematic errors in the calibration process and providing sufficient and reliable reference corner point data for subsequent point-to-point matching and coordinate mapping model solving.

[0018] 102. Acquire a screen image, perform AprilTag detection processing on the screen image, and obtain the coordinate set of each AprilTag corner point on the image, which is called the image corner point coordinate set; In this embodiment, the screen image is an image captured by the camera of the screen displaying AprilTag patterns. The acquisition is completed by the camera directly capturing the screen. After the screen image is acquired, AprilTag detection processing is performed. The detection processing first calls the AprilTag detection algorithm to identify each AprilTag pattern in the screen image, extracts the unique ID corresponding to each AprilTag pattern and the coordinates of the four corner points in a preset image coordinate system, and then performs sub-pixel thinning processing on all detected corner point coordinates to obtain four updated corner point coordinates. The corner point coordinates are associated with the unique ID corresponding to the AprilTag pattern, and all updated corner point coordinates are collected according to the preset fixed corner point numbering order to obtain the set of coordinates of each AprilTag corner point on the image, which is called the image corner point coordinate set. This set uniformly stores the high-precision corner point information of all AprilTag tags in the image coordinate system. This process relies on the camera to directly capture the screen image. The sub-pixel refinement operation can break through the pixel-level positioning limitations, improve the extraction accuracy of corner points, and use unique IDs to mark the corner point affiliation. The coordinates are collected according to a unified numbering order, reducing the order disorder that occurs during the corner point matching process, and providing accurate and reliable image-side reference data for the subsequent construction of the point correspondence set.

[0019] 103. Based on the unique ID of each AprilTag pattern, perform point-to-point matching processing on the set of screen corner coordinates and the set of image corner coordinates to construct a set of point correspondence relationships; In this embodiment, as Figure 2As shown, AprilTag patterns are pre-drawn on the screen. Each AprilTag pattern has a unique identifier ID. The pattern has four corner points in a fixed order. The coordinates of the four corner points in the screen coordinate system are directly determined by the screen display layout and are known true values. The camera captures the screen image and recognizes the AprilTag pattern, detecting the corresponding image coordinates of the four corner points in the image coordinate system. As shown in the figure, the left side is the screen coordinate system, and the four corners of the marker have known screen coordinates. The right side is the image coordinate system captured by the camera. AprilTag markers with the same ID are deformed by perspective projection, and the image coordinates of the four corners are detected. A one-to-one mapping relationship between the two sets of coordinates is established according to the marker ID plus the corner point order. Based on the unique ID of each AprilTag pattern, tags belonging to the same identifier within the screen corner coordinate set and the image corner coordinate set are retrieved. Combining this with a unified corner numbering order, image corners and screen corners with consistent order under the same AprilTag are paired. A single AprilTag can generate four pairs of points. After pairing all tags, the RANSAC robust estimation method is used to eliminate mismatched point pairs. During RANSAC execution, a small number of point pairs are randomly selected from the point correspondence set as initial samples. The mapping model is a planar transformation relationship from the image coordinate system to the screen coordinate system. For planar screens, a homography matrix is ​​used as the mapping model; for non-planar screens, a polynomial mapping model can be used. Solving the image coordinate to screen coordinate mapping model based on this sample involves using the extracted image corners and screen corners from the sample and substituting them into the planar transformation... The equations are changed, and the coefficients of the homography matrix are obtained through least squares calculation. The predicted coordinates of all remaining point pairs are calculated using the obtained model. This involves substituting the actual image coordinates of the remaining point pairs into the mapping model and using matrix operations to deduce the corresponding screen coordinates. The deduced screen coordinates are the predicted coordinates. The actual coordinates refer to the real screen coordinates of the AprilTag pattern recorded in the screen corner coordinate set. The residual represents the positional deviation between the predicted coordinates calculated by the model and the actual screen coordinates. All point pairs are traversed, and the residuals are calculated one by one and compared with a preset threshold. The number of point pairs whose residuals between the predicted coordinates and the actual coordinates are less than the preset threshold is counted. The preset threshold is the upper limit of the allowable coordinate deviation, which is set based on camera imaging noise, corner sub-pixel positioning accuracy, and image resolution. If the threshold value is too high, erroneous points will be retained; if the value is too low, valid points that are slightly disturbed by noise will be mistakenly removed. Points with residuals below a threshold are identified as inliers, while those with residuals exceeding the threshold are identified as outliers. This random sampling and model fitting process is repeated multiple times to select the mapping model with the most inliers. The set of inliers corresponding to this model is the reliable matching point pair. All other outliers are eliminated. After filtering, valid pairing data is retained. All valid point pairs are summarized to form a point correspondence set, which contains one-to-one matching samples between corner points of the image coordinate system and corner points of the screen coordinate system.This matching method relies on unique IDs to classify tags and then uses the corner order to complete single-point pairing, avoiding cross-tag erroneous matching in multi-tag scenarios. The RANSAC algorithm can distinguish between valid samples and erroneous matching point pairs in a point set containing noise and erroneous matching, eliminate erroneous matching caused by noise and detected anomalies, ensure the reliability of point pair data, reduce the interference of abnormal point pairs on the solution of the mapping model, and provide high-quality matching samples for the subsequent parameter solution of the coordinate mapping model.

[0020] 104. Determine the screen display surface type of the screen, determine the coordinate mapping model based on the screen display surface type, and perform parameter solving on the point correspondence set based on the coordinate mapping model to obtain calibration parameters; In this embodiment, the screen display surface type is used to characterize the geometric shape of the screen display surface, and is divided into planar type and non-planar type. This can be determined based on the screen hardware structure and surface deformation characteristics. A planar type indicates that the screen display surface is an ideal plane, while a non-planar type indicates that the screen display surface has curves or local deformations. After determining the screen display surface type, a corresponding coordinate mapping model is selected based on the screen display surface type. The coordinate mapping model is used to establish the mathematical transformation relationship between image coordinates and screen coordinates. When the screen display surface type is planar, the homography matrix model is used as the coordinate mapping model; when the screen display surface type is non-planar, a polynomial mapping model is used as the coordinate mapping model. Based on the coordinate mapping model, parameter solving is performed on the point correspondence set. When the screen is planar, all matching point pairs in the point correspondence set are extracted based on the homogeneous transformation relationship. Multiple sets of matching point pairs are input into the coordinate mapping model to construct a coefficient matrix. Singular value decomposition is performed on the coefficient matrix to extract the right singular vector corresponding to the minimum singular value. This vector is rearranged to obtain a 3×3 homography matrix. Then, reprojection error verification is performed. The image coordinates in the set are substituted into the homography matrix to calculate the predicted screen coordinates. The residual between the predicted coordinates and the real screen coordinates is calculated, and the average reprojection error is calculated. The average reprojection error is compared with a preset error threshold. If the average reprojection error is less than or equal to the threshold, the verification is qualified, and the homography matrix is ​​the calibration parameter. When the screen is non-planar, matching point pairs in the point correspondence set are extracted based on the polynomial mapping relationship. The matching point pairs are substituted into the polynomial mapping model to construct an overdetermined system of equations. The least squares method is used to solve the system of equations to obtain the polynomial coefficient matrix, which is the calibration parameter. The calibration parameters contain all the model coefficients required for transforming image coordinates to screen coordinates. After calibration, any image coordinates can be input to calculate the corresponding screen coordinates. This solution is adaptable to both planar and curved screen shapes, selecting appropriate transformation models for different screen geometric features. For planar scenes, homography matrix is ​​used to achieve fast and accurate planar coordinate transformation, while for curved scenes, polynomial fitting is used to compensate for nonlinear deviations caused by screen deformation. The reprojection error verification step can evaluate the model calibration quality, eliminate unqualified calibration results, and ensure the stability and accuracy of subsequent laser spot coordinate transformation.

[0021] 105. Obtain the image to be tracked, extract the coordinates of the light spot image based on the image to be tracked, and perform coordinate mapping processing on the coordinates of the light spot image based on the calibration parameters and the coordinate mapping model to obtain the light spot tracking coordinates in the screen coordinate system.

[0022] In this embodiment, the image to be tracked is acquired in real time by the camera. The image to be tracked is an image containing laser light spots captured by the camera on the screen area. In the stage of extracting the coordinates of the light spot image, laser light spot extraction is performed on the image to be tracked. Threshold segmentation combined with centroid method or Gaussian surface fitting can be used. Threshold segmentation combined with centroid method first performs grayscale preprocessing on the image to be tracked. Based on the grayscale distribution of the image, a grayscale threshold is selected, and the image pixels are divided into background area and light spot foreground area. Background noise is filtered out, and the connected region corresponding to the laser light spot is separated to complete the coarse localization of the light spot. Then, the grayscale centroid of all foreground pixels in the connected region is calculated. The weighted average of the coordinates is obtained by using grayscale as pixel weight to obtain the sub-pixel level image coordinates of the light spot. Gaussian surface fitting assumes that the grayscale distribution of the laser spot conforms to a two-dimensional Gaussian distribution. First, the region where the spot is located is roughly located. Then, pixel grayscale samples are selected within the spot's neighborhood to construct a two-dimensional Gaussian function model. The center position of the Gaussian distribution is solved through nonlinear fitting; this center is the sub-pixel image coordinate of the spot. After obtaining the spot image coordinates, coordinate mapping is performed based on pre-solved calibration parameters. If the screen is planar, the calibration parameter is a homography matrix. The spot image coordinates are expanded to homogeneous coordinates, and matrix multiplication is performed with the homography matrix to obtain a homogeneous mapping result. Then, the scaling factor is eliminated to complete normalization, resulting in the corresponding coordinates in the screen coordinate system. If the screen is non-planar, the calibration parameter is a polynomial coefficient matrix. The spot image coordinates are substituted into the polynomial mapping expression, and the screen coordinates are directly calculated using the polynomial coefficients. Both methods achieve the transformation of the spot position from the image coordinate system to the screen coordinate system, ultimately obtaining the spot tracking coordinates in the screen coordinate system. The spot tracking coordinates in the screen coordinate system represent the position coordinates of the laser spot on the screen plane. This process relies on the mapping relationship obtained from the previous calibration to continuously extract laser points from the camera's captured images and transform their coordinates, enabling real-time tracking of the laser points. The calibration and verification process pre-checks the model mapping accuracy, and the tracking process is only started after the calibration error meets the threshold requirements, reducing coordinate transformation deviation. Multiple light point extraction methods are adapted to different imaging noise scenarios, ensuring sub-pixel accuracy of light point positioning, thereby improving the stability and accuracy of light point tracking coordinate output.

[0023] like Figure 3 As shown, the camera is fixed to one side of the screen. During the calibration phase, the screen surface displays an AprilTag mark with an independent identifier. The camera acquires the mark image to complete the calibration parameter solution. During the tracking phase, the laser emitter emits a laser to the screen and forms a laser spot on the screen surface. The camera continuously acquires the screen image containing the laser spot as the image to be tracked. Through spot extraction and coordinate mapping, the position of the spot in the image is converted into the position of the spot in the screen coordinate system, thus completing the tracking of the laser spot.

[0024] In this embodiment of the invention, obtaining the coordinates of each AprilTag pattern in a preset screen coordinate system to obtain a set of coordinates of each AprilTag corner point on the screen, referred to as the screen corner point coordinate set, includes: obtaining the top-left pixel coordinates, pixel side length, and preset fixed corner point numbering order of each AprilTag pattern; calculating the top-right, bottom-right, and bottom-left pixel coordinates of the corresponding AprilTag pattern based on the fixed corner point numbering order, the top-left pixel coordinates, and the pixel side length; associating the unique ID of each AprilTag pattern with the fixed corner point numbering order, and aggregating the corresponding top-left, top-right, bottom-right, and bottom-left pixel coordinates according to the fixed corner point numbering order to form the screen corner point coordinate set.

[0025] In this embodiment, the acquisition of the top-left corner pixel coordinates, pixel side length, and preset fixed corner point numbering order of each AprilTag pattern is completed based on the screen display layout information. The top-left corner pixel coordinates represent the pixel coordinates corresponding to the top-left corner position of the AprilTag pattern in the screen coordinate system. The pixel side length represents the number of pixels occupied by one side when the AprilTag pattern is displayed. The preset fixed corner point numbering order is set according to the corner point encoding rules of AprilTag itself, which is used to unify the arrangement order of the four corner points of each marker and ensure that the corner points detected by the image side can match the corner points pre-calculated by the screen side one by one. The calculation of the top-right, bottom-right, and bottom-left pixel coordinates of the corresponding AprilTag pattern, based on the fixed corner point numbering order, the top-left corner pixel coordinates, and the pixel side length, is performed within a screen coordinate system with the top-left corner of the screen display area as the origin, the x-axis pointing horizontally to the right, and the y-axis pointing vertically downwards. The positions of the other three corner points are obtained by superimposing the top-left corner pixel coordinates with the pixel side length. The horizontal component of the top-left corner coordinate is then superimposed with the pixel side length to obtain the top-right horizontal coordinate, while the vertical component remains unchanged. The top-right corner coordinate is further superimposed with the pixel side length to obtain the bottom-right coordinate. The bottom-right corner coordinate is then obtained by subtracting the pixel side length from the horizontal component of the bottom-right coordinate, thus obtaining the complete four corner pixel positions of the AprilTag. Essentially, this calculation operation derives the positions of the remaining three corner points in the screen coordinate system based on the rectangular display shape of the AprilTag and the known top-left corner reference position and side length parameters. Each AprilTag pattern is associated with a unique ID. The corresponding top-left, top-right, bottom-right, and bottom-left corner pixel coordinates are collected according to a fixed corner numbering order to form a screen corner coordinate set. The unique ID is used to distinguish AprilTag markers placed in different positions on the screen. The aggregation operation packages and integrates the four corner coordinates of the same marker in a unified order, summarizing the corner data of all markers to construct a complete screen corner coordinate set. This method directly generates calibration markers based on screen rendering. The marker plane naturally coincides with the screen plane. The unique ID is used to identify and distinguish different AprilTags. The corner coordinates are directly calculated through screen resolution and display parameters, eliminating the need for additional manual measurement. The markers can be evenly distributed in the calibration area, effectively reducing the system bias introduced by calibration. This provides an ordered and accurate benchmark dataset for subsequent image detection corner point and screen corner point matching, ensuring the stability and accuracy of the coordinate mapping model solution.

[0026] In this embodiment of the invention, the step of performing AprilTag detection processing on the screen image to obtain the coordinate set of each AprilTag corner point on the image, referred to as the image corner point coordinate set, includes: using an AprilTag detection algorithm to identify each AprilTag pattern in the screen image, obtaining the unique ID corresponding to each AprilTag pattern and the coordinates of four corner points in a preset image coordinate system; performing sub-pixel thinning processing on the coordinates of all corner points of each AprilTag pattern to obtain the four updated corner point coordinates of each AprilTag pattern; associating the unique ID of each AprilTag pattern with the four updated corner point coordinates according to a preset fixed corner point numbering order to form the image corner point coordinate set.

[0027] In this embodiment, the AprilTag detection algorithm is a visual detection algorithm specifically designed for two-dimensional planar marker recognition. It can extract the contours of QR code-like markers from grayscale images, identify marker codes, and locate marker corner points. When using the AprilTag detection algorithm to identify various AprilTag patterns within a screen image, the screen image captured by the camera is first preprocessed in grayscale. Quadrilateral contours are extracted from the image through edge detection, and candidate marker regions that match the geometric features of AprilTags are selected. Then, the coded patterns within the candidate regions are decoded to complete the recognition of the AprilTag patterns. The unique ID corresponding to each AprilTag pattern is the decoded marker code number. The coordinates of the four corner points in the preset image coordinate system represent the initial positions of the four corner points of the marker in the image pixel coordinate system obtained by the algorithm. Sub-pixel refinement processing is performed on the coordinates of all corner points of each AprilTag pattern. Based on the pixel-level coarse positioning results, interpolation or surface fitting is performed using grayscale gradient information within the neighborhood of the corner points to further solve for the precise position of the corner points within a single pixel, thereby overcoming the positioning limitations imposed by the discrete pixel grid. The four updated corner coordinates of each AprilTag pattern are the four corner coordinates with higher positioning accuracy after sub-pixel refinement correction. Associating each AprilTag pattern with a unique ID binds the set of sub-pixel refined corner coordinates with the encoded number of the same AprilTag obtained from decoding, determining the tag to which the corner belongs. The four updated corner coordinates are collected according to a preset fixed corner number order, using the same corner sorting rules as when calculating screen corners. This process sequentially includes the four high-precision corners under the same AprilTag tag, summarizing all the corner data to form an image corner coordinate set. This process uses the AprilTag detection algorithm to complete tag recognition and coarse corner extraction. Sub-pixel refinement improves the positioning accuracy of corners on the image. Binding the corner to its tag with a unique ID and using a unified fixed corner number order to collect coordinates ensures that image-side corners and screen-side corners can be matched in an orderly manner, avoiding corner order confusion. This provides high-precision, ordered image reference data for subsequently establishing a point-to-point mapping relationship between image coordinates and screen coordinates.

[0028] In this embodiment of the invention, determining the screen display surface type, determining a coordinate mapping model based on the screen display surface type, and performing parameter solving processing on the point correspondence set based on the coordinate mapping model to obtain calibration parameters includes: determining the screen display surface type; when the screen display surface type is planar, determining a pre-constructed homography matrix model as the coordinate mapping model, performing homography matrix solving processing on the point correspondence set based on the coordinate mapping model to obtain the calibration parameters; when the screen display surface type is non-planar, determining a pre-constructed polynomial mapping model as the coordinate mapping model, performing polynomial fitting solving processing on the point correspondence set based on the coordinate mapping model to obtain the calibration parameters.

[0029] In this embodiment, the screen display surface type is determined by judging the screen hardware structure and surface deformation characteristics, combined with the screen's physical shape to identify whether the display surface satisfies the ideal planar geometry assumption, thus classifying it into planar and non-planar types. When the screen display surface type is planar, it means that there is no surface curvature or local deformation in the screen imaging area; the planar type refers to the screen display surface being an ideal two-dimensional plane. The pre-constructed homography matrix model is a 3×3 matrix model characterizing the homogeneous projection transformation between the image plane and the screen plane. This model is constructed based on the homogeneous transformation relationship between image coordinates and screen coordinates in a planar scene. The projection mapping between the two sets of planes can be completely described by homography transformation; therefore, the pre-constructed homography matrix model is determined as a coordinate mapping model. The homography matrix calculation based on the coordinate mapping model for the point correspondence set involves first extracting matching point pairs between image coordinates and screen coordinates within the set. Multiple sets of these matching point pairs are then input into the coordinate mapping model to construct a coefficient matrix. Singular value decomposition is performed on the coefficient matrix, and the right singular vector corresponding to the smallest singular value is extracted as a nine-dimensional vector. This nine-dimensional vector is then reassembled into a 3×3 homography matrix. Subsequently, reprojection error verification is performed. All image coordinates within the point correspondence set are substituted into the homography matrix model to predict the screen coordinates. The Euclidean residual between the predicted and actual screen coordinates is calculated, and the average reprojection error is statistically analyzed and compared with a preset threshold. When the average reprojection error meets the threshold condition, the homography matrix is ​​the calibration parameter. When the screen display surface type is non-planar, it indicates that the screen display surface has curved surfaces or local geometric distortions caused by splicing, no longer satisfying the ideal planar assumption. Non-planar type refers to nonlinear deformation of the screen imaging surface. The pre-constructed polynomial mapping model is a polynomial function model with image coordinates as the independent variable and screen coordinates as the dependent variable. The total order of the polynomial is selected based on the complexity of the screen deformation, generally prioritizing quadratic or cubic polynomials. The model expression is constructed using polynomial basis functions to fit the nonlinear mapping relationship between image coordinates and screen coordinates. Polynomial fitting and solving of the point correspondence set based on the coordinate mapping model involves extracting matching point pairs between image and screen coordinates within the set. Multiple sets of matching point pairs are substituted into the polynomial mapping model to construct an overdetermined system of equations. This overdetermined system of equations is solved using the least squares method to obtain the polynomial coefficient matrix, which serves as the calibration parameters.This method can adaptively select the coordinate mapping model based on the screen surface geometry. For planar scenes, a homography matrix model is used, and the solution is completed by relying on the direct linear transformation algorithm, which has high computational efficiency and excellent accuracy of planar projection transformation. The accompanying reprojection error verification mechanism quantitatively evaluates the calibration effect. When the error exceeds the standard, point pairs with excessive residuals are removed and the solution is resolved, reducing the interference caused by incorrect corner point matching. For non-planar scenes, a polynomial mapping model is used to compensate for the nonlinear geometric deviations introduced by surface and splicing deformation. The polynomial order can be flexibly adjusted, and a regularization term can be introduced to suppress overfitting. The entire calibration process is compatible with both planar and non-planar screens, expanding the applicability of the calibration scheme and ensuring the accuracy of image coordinate to screen coordinate transformation under different screen shapes. This provides a reliable coordinate transformation model for subsequent laser point positioning and tracking.

[0030] In this embodiment of the invention, the step of solving the homography matrix of the point correspondence set based on the coordinate mapping model to obtain the calibration parameters includes: obtaining matching point pairs of image coordinates and screen coordinates within the point correspondence set based on the homogeneous transformation relationship between screen coordinates and image coordinates corresponding to the coordinate mapping model, thereby obtaining multiple sets of matching point pairs; inputting the multiple sets of matching point pairs into the coordinate mapping model to construct a coefficient matrix; performing singular value decomposition on the coefficient matrix to obtain the right singular vector corresponding to the minimum singular value of the coefficient matrix; using the right singular vector as a nine-dimensional vector and rearranging the nine-dimensional vector into a 3×3 homography matrix; performing reprojection error verification on the homography matrix, and when the verification passes, using the homography matrix as the calibration parameters.

[0031] In this embodiment, matching point pairs of image coordinates and screen coordinates within the point correspondence set are obtained based on the homogeneous transformation relationship between screen coordinates and image coordinates corresponding to the coordinate mapping model. This is achieved by using AprilTag markers to extract the image coordinates of the marker corner points on the camera imaging plane, and simultaneously calculating the screen coordinates of the corresponding corner points based on the marker's placement and geometric dimensions on the screen. A one-to-one correspondence is established between the two sets of coordinates using the unique identifier of the marker, thus obtaining matching point pairs. Matching point pairs of image coordinates and screen coordinates are combinations of the coordinates of the same marker corner point on the camera imaging plane and the screen plane, respectively. Multiple matching point pairs are all the one-to-one corresponding combinations of image coordinates and screen coordinates acquired. The coordinate mapping model is a homography matrix model, which is constructed based on the homogeneous projection transformation relationship between image coordinates and screen coordinates. The coordinate transformation between the two sets of planes satisfies the homogeneous transformation expression: , in, and Represents screen coordinates, and Represents image coordinates, It is a 3×3 homography matrix, with the symbol... This represents a homogeneous equivalence relation, with both sides of the equation differing by a non-zero scaling factor. The process of inputting multiple sets of matching point pairs into the coordinate mapping model to construct the coefficient matrix involves cross-multiplying each matching point pair according to the homogeneous transformation relation to eliminate the scaling factor, deriving two linear equations concerning the nine unknown elements of the homography matrix: , , in, , , , , , , , , Homography matrix The nine unknown parameters of the homography matrix are arranged into a nine-dimensional vector. , This represents the matrix transpose operation, used to convert a horizontally arranged parameter sequence into a vertical column vector, adapting to the dimensional requirements of matrix operations. Each set of matching points corresponds to two rows of constraint parameters in the generated coefficient matrix, specifically expressed as follows: , , All N sets of matching point pairs are assembled to obtain a coefficient matrix of dimension 2N×9. This forms a homogeneous system of equations: , Because homography exhibits scale uncertainty, this system of equations has infinitely many non-zero solutions that constitute a proportion. Multiplying any non-zero constant by an effective solution vector still satisfies the equations, making it impossible to directly find a unique solution. Therefore, constraints are added during the solution process. ,in The Euclidean L2 norm of a nine-dimensional vector is calculated using the following formula: , This constraint limits the overall magnitude of the nine-dimensional solution vector to 1, eliminating the scaling degrees of freedom of the solution and ensuring that the system of equations outputs a uniquely determined optimal solution. Singular value decomposition is performed on the coefficient matrix, with the following formula: , in, It is a left singular vector matrix. This is a singular value diagonal matrix, where the singular values ​​are arranged in descending order of their numerical values. It is a right singular vector matrix. This represents the matrix transpose operation. The singular value with the smallest value among all singular values ​​is selected; the right singular vector corresponding to this singular value is the one that satisfies the constraints. The optimal solution vector, which is the nine-dimensional vector obtained by solving, is then found within the vector. to All values ​​have been determined and are no longer considered unknown parameters. The nine-dimensional vector is then rearranged and filled sequentially according to row-matrix order to obtain a 3×3 homography matrix. The reconstruction formula is as follows: .

[0032] After solving the homography matrix, a reprojection error verification process is performed. All image coordinates within the point correspondence set are substituted into the coordinate mapping model. The corresponding predicted screen coordinates are calculated using the obtained homography matrix. The residual between the predicted and actual screen coordinates for each matching point pair is calculated, and the average reprojection error of all point pairs is statistically analyzed. This average reprojection error is compared with a preset error threshold. If the average reprojection error is less than or equal to the threshold, the verification is considered successful, the current homography matrix is ​​valid, and it is used as a calibration parameter. Otherwise, the verification is considered unsuccessful, and abnormal matching point pairs are removed before resolving. This entire solution process is based on the direct linear transformation algorithm. It constructs overdetermined equations using multiple sets of matching point pairs and relies on singular value decomposition to find the global optimal solution. This effectively suppresses parameter deviations caused by single-point noise and mismatches. Combined with the reprojection error verification mechanism, it ensures the mapping accuracy of the homography matrix, providing reliable calibration parameters for the subsequent accurate conversion between image coordinates and screen coordinates.

[0033] In this embodiment of the invention, the reprojection error verification process for the homography matrix includes: inputting each image coordinate in the point correspondence set into the coordinate mapping model, and calculating the corresponding predicted screen coordinates using the homography matrix; calculating the residual between the predicted screen coordinates and the screen coordinates of each matching point pair, and calculating the average reprojection error; comparing the average reprojection error with a preset error threshold; if the average reprojection error is less than or equal to the error threshold, the verification passes; if the average reprojection error is greater than the error threshold, the verification fails.

[0034] In this embodiment, after solving the homography matrix, reprojection error verification is performed. Each image coordinate within the point correspondence set is input into the coordinate mapping model, and the corresponding predicted screen coordinates are calculated using the homography matrix. This calculation process constructs the image coordinates into homogeneous coordinate vectors, which are then substituted into the homogeneous transformation relation. In the formula , The coordinates of the image to be input. To solve for the completed homography matrix, , , The homogeneous coordinate components output by matrix multiplication are indicated by superscript. This represents the transpose of a vector. The predicted screen coordinates are estimated values ​​obtained through homography. The homogeneous components of the output need to be normalized. The normalization formula is as follows: , In the formula , This refers to the predicted screen coordinates. After obtaining the predicted screen coordinates, the residual between the predicted screen coordinates and the actual screen coordinates for each matching point pair is calculated. The residual is calculated using the Euclidean distance formula. In the formula , The screen coordinates corresponding to the matching point. The residuals for a single pair of points are expressed in screen pixels. The average reprojection error is obtained by statistically analyzing the residuals of all calibration point pairs. The formula for calculating the average reprojection error is as follows: In the formula To determine the total number of point pairs used for calibration, The average reprojection error represents the overall mapping deviation level of all calibration points, calculated by summing the residuals of all point pairs. The preset error threshold is a pre-defined accuracy judgment standard, set based on the actual application scenario's requirements for coordinate mapping accuracy, with an optimal value range of 0.5 to 1 screen pixel. If the average reprojection error is less than or equal to the error threshold, it means the overall mapping deviation of the homography matrix obtained from the current solution meets the accuracy requirements, the calibration result is qualified, and the homography matrix can be used as a calibration parameter for subsequent coordinate transformations. If the average reprojection error is greater than the error threshold, it means the overall mapping deviation of the current homography matrix exceeds the allowable range, the calibration result is unqualified, and it is necessary to remove the outlier point pairs with the largest residuals and re-execute the homography matrix solution, while simultaneously checking for errors in the correspondence between corner detection and coordinate matching. The entire calibration process relies on the mapping deviation of calibration points to quantitatively evaluate the calibration quality. The average reprojection error is used as a quantitative evaluation index, which can intuitively reflect the coordinate mapping accuracy of the homography matrix. The iterative recalibration mechanism under unqualified conditions reduces the negative impact of noise points and mismatched points, ensuring that the final calibration parameters have stable and reliable coordinate transformation capabilities, and supporting high-precision mapping calculations from image coordinates to screen coordinates.

[0035] In this embodiment of the invention, the step of performing polynomial fitting and solving on the point correspondence set based on the coordinate mapping model to obtain the calibration parameters includes: obtaining matching point pairs of image coordinates and screen coordinates within the point correspondence set based on the polynomial mapping relationship corresponding to the coordinate mapping model, thereby obtaining multiple sets of matching point pairs; inputting the multiple sets of matching point pairs into the coordinate mapping model to construct an overdetermined system of equations; solving the overdetermined system of equations using the least squares method to obtain a polynomial coefficient matrix; and using the polynomial coefficient matrix as the calibration parameters.

[0036] In this embodiment, based on the polynomial mapping relationship corresponding to the coordinate mapping model, matching point pairs of image coordinates and screen coordinates are obtained within the point correspondence set, resulting in multiple sets of matching point pairs. This is achieved by uniformly arranging an AprilTag marker array on the non-planar screen surface, covering the complete calibration area including the four corners and edges of the screen. The image coordinates and screen coordinates corresponding to the marker corner points are extracted, and a one-to-one matching relationship between the two sets of coordinates is established based on the unique identifier of the marker, thus obtaining all matching point pairs. The polynomial mapping relationship is a polynomial function mapping relationship with image coordinates as the independent variable and screen coordinates as the dependent variable. It can fit the nonlinear deformation of the transformation from image coordinates to screen coordinates. The general expression is: , , In the formula and Represents image coordinates, and Represents screen coordinates. Let be the total order of the polynomial. and These represent the powers of the image coordinate components, respectively. The summation operation iterates through all satisfying these powers. Integer combinations, , Let be the coefficients of the polynomial to be solved. Taking a quadratic polynomial with a total order of 2 as an example, the mapping relationship expands as follows: , , Where, in the formula , , , , , The polynomial coefficients are used to solve for the horizontal coordinate of the screen. , , , , , The polynomial coefficients used to solve for the screen's ordinate are defined by the first subscript of the coefficient representing the power of the image's abscissa and the second subscript representing the power of the image's ordinate. For the constant term of the polynomial, , These correspond to the coefficients of the first-order term in the image coordinates, , , These correspond to the coefficients of the quadratic term on the horizontal axis, the cross product term on the horizontal axis, and the quadratic term on the vertical axis, respectively. The correspondence rules of the coefficients at the beginning and The initial coefficients are kept consistent. Before calibration, all the above coefficients are unknown parameters. After least squares solution, all coefficients are determined, and their values ​​can be substituted into the polynomial expression to calculate the corresponding screen coordinates from the image coordinates. Multiple sets of matched point pairs are input into the coordinate mapping model to construct an overdetermined system of equations. This involves substituting the image coordinates of each matched point pair into the polynomial mapping expression, resulting in linear equations containing unknown polynomial coefficients. All equations generated from matched point pairs are assembled to form the system of equations. An overdetermined system of equations is a linear system of equations where the number of equations exceeds the number of unknown coefficients. This system of equations is formed when the number of collected matched point pairs exceeds the total number of polynomial coefficients to be solved, thus adapting to polynomial fitting scenarios. The least squares method is a numerical method for solving unknown parameters by minimizing the sum of the squares of the fitting residuals of all sample points. This method finds a set of polynomial coefficients that minimizes the sum of the squares of the residuals between the fitted screen coordinates and the true screen coordinates corresponding to all matched points. Solving overdetermined equation systems using the least squares method involves combining polynomial basis functions into a design matrix, constructing a residual sum of squares objective function, finding the extrema of the objective function, deriving the normal equations, performing matrix operations, and calculating all polynomial coefficients. The polynomial coefficient matrix is ​​the result of the solution process. , The coefficients are arranged in a preset order to form a matrix. Each element in the matrix corresponds to a coefficient in the polynomial mapping expression. The polynomial coefficient matrix is ​​used as a calibration parameter, representing that the coefficient matrix completely preserves the polynomial mapping relationship. Subsequently, any image coordinates are input, substituted into the polynomial expression, and combined with the coefficient matrix to calculate the corresponding screen coordinates. This solution method can adapt to nonlinear geometric distortions caused by curved surfaces and spliced ​​structures on non-planar screens. The total order of the polynomial can be flexibly selected according to the complexity of the screen deformation. For scenarios with slight deformation, a quadratic polynomial is used, while for scenarios with complex deformation, a cubic polynomial is used. Regularization terms can also be introduced during the solution process to suppress overfitting caused by higher-order polynomials. The least squares method is used to fully utilize multiple sets of matching point information to reduce the interference of single-point noise on the calibration results. The resulting polynomial mapping model can accurately compensate for nonlinear coordinate deviations, expand the applicable scenarios of the calibration method, ensure the mapping accuracy from image coordinates to screen coordinates in non-planar screen scenarios, and provide a stable coordinate transformation basis for laser spot positioning and tracking.

[0037] The above describes the screen-marked laser spot calibration and tracking method in the embodiments of the present invention. The following describes the screen-marked laser spot calibration and tracking device in the embodiments of the present invention. Please refer to [link / reference]. Figure 4 One embodiment of the screen-marked laser spot calibration and tracking device of the present invention includes: Screen corner coordinate acquisition module 401: used to display at least one AprilTag pattern with a unique ID on the screen, and acquire the coordinates of each AprilTag pattern in a preset screen coordinate system to obtain the set of coordinates of each AprilTag corner point on the screen, which is called the screen corner coordinate set. Image corner coordinate acquisition module 402: used to acquire screen image, perform AprilTag detection processing on the screen image, and obtain the coordinate set of each AprilTag corner point on the image, which is called the image corner coordinate set; Point-to-point matching module 403: used to perform point-to-point matching processing on the set of screen corner coordinates and the set of image corner coordinates based on the unique ID of each AprilTag pattern, so as to construct a set of point correspondence relationships; Parameter solving module 404: used to determine the screen display surface type of the screen, determine the coordinate mapping model based on the screen display surface type, and perform parameter solving processing on the point correspondence set based on the coordinate mapping model to obtain calibration parameters; Tracking module 405: used to acquire the image to be tracked, extract the coordinates of the light spot image based on the image to be tracked, and perform coordinate mapping processing on the coordinates of the light spot image based on the calibration parameters and the coordinate mapping model to obtain the light spot tracking coordinates in the screen coordinate system.

[0038] Based on the same ideas as the methods in the above embodiments, the apparatus provided in this application can implement the methods in the above embodiments.

[0039] above Figure 4 The screen-marked laser spot calibration and tracking device in this embodiment of the invention will be described in detail from the perspective of modular functional entities. The screen-marked laser spot calibration and tracking device in this embodiment of the invention will be described in detail from the perspective of hardware processing.

[0040] Figure 5 This is a schematic diagram of a screen-marked laser spot calibration and tracking device 500 provided in an embodiment of the present invention. The screen-marked laser spot calibration and tracking device 500 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 510 (e.g., one or more processors) and a memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) for storing application programs 533 or data 532. The memory 520 and storage media 530 can be temporary or persistent storage. The program stored in the storage media 530 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the screen-marked laser spot calibration and tracking device 500. Furthermore, the processor 510 may be configured to communicate with the storage media 530 and execute the series of instruction operations in the storage media 530 on the screen-marked laser spot calibration and tracking device 500 to implement the steps of the screen-marked laser spot calibration and tracking method provided in the above-described method embodiments.

[0041] The screen-marked laser spot calibration and tracking device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input / output interfaces 560, and / or one or more operating systems 531, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 5 The illustrated structure of the screen-marked laser spot calibration and tracking device does not constitute a limitation on the screen-marked laser spot calibration and tracking device. It may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.

[0042] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of the screen-marked laser spot calibration and tracking method.

[0043] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system, device, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0044] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0045] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for calibration and tracking using laser light spots marked on a screen, characterized in that, include: Display at least one AprilTag pattern with a unique ID on the screen, and obtain the coordinates of each AprilTag pattern in a preset screen coordinate system to obtain the set of coordinates of each AprilTag corner point on the screen, which is called the screen corner point coordinate set. Acquire a screen image, perform AprilTag detection processing on the screen image, and obtain the coordinate set of each AprilTag corner point on the image, which is called the image corner point coordinate set; Based on the unique ID of each AprilTag pattern, point-to-point matching is performed on the set of screen corner coordinates and the set of image corner coordinates to construct a set of point correspondence relationships; The screen display surface type of the screen is determined, a coordinate mapping model is determined based on the screen display surface type, and the point correspondence set is processed by parameter solving based on the coordinate mapping model to obtain calibration parameters; The image to be tracked is acquired, the coordinates of the light spot image are extracted based on the image to be tracked, and the coordinate mapping processing of the light spot image coordinates is performed based on the calibration parameters and the coordinate mapping model to obtain the light spot tracking coordinates in the screen coordinate system.

2. The screen-marked laser spot calibration and tracking method according to claim 1, characterized in that, The step of obtaining the coordinates of each AprilTag pattern in a preset screen coordinate system yields a set of coordinates for each AprilTag corner point on the screen, referred to as the screen corner point coordinate set, which includes: Obtain the top-left corner pixel coordinates, pixel side length, and preset fixed corner point numbering order for each AprilTag pattern; The top right, bottom right, and bottom left pixel coordinates of the corresponding AprilTag pattern are calculated based on the fixed corner point numbering order, the top left corner pixel coordinates, and the pixel side length. Associate each AprilTag pattern with a unique ID, and collect the corresponding top-left, top-right, bottom-right, and bottom-left pixel coordinates according to the fixed corner point numbering order to form the screen corner point coordinate set.

3. The screen-marked laser spot calibration and tracking method according to claim 1, characterized in that, The process of performing AprilTag detection on the screen image yields a set of coordinates for each AprilTag corner point on the image, referred to as the image corner point coordinate set, which includes: The AprilTag detection algorithm is used to identify each AprilTag pattern in the screen image, and obtain the unique ID corresponding to each AprilTag pattern and the coordinates of the four corner points in the preset image coordinate system; Subpixel thinning is performed on the coordinates of all corner points of each AprilTag pattern to obtain the coordinates of the four updated corner points of each AprilTag pattern; Each AprilTag pattern is associated with a unique ID, and the coordinates of the four corresponding updated corner points are collected according to a preset fixed corner point numbering order to form the image corner point coordinate set.

4. The screen-marked laser spot calibration and tracking method according to claim 1, characterized in that, The process of determining the screen display surface type, determining a coordinate mapping model based on the screen display surface type, and performing parameter solving on the point correspondence set based on the coordinate mapping model to obtain calibration parameters includes: Determine the screen display surface type of the screen; When the screen display surface type is planar, the pre-constructed homography matrix model is determined as the coordinate mapping model, and the homography matrix is ​​solved based on the coordinate mapping model to obtain the calibration parameters. When the screen display surface type is non-planar, the pre-constructed polynomial mapping model is determined as the coordinate mapping model, and the point correspondence set is subjected to polynomial fitting and solution processing based on the coordinate mapping model to obtain the calibration parameters.

5. The screen-marked laser spot calibration and tracking method according to claim 4, characterized in that, The calibration parameters are obtained by solving the homography matrix of the point correspondence set based on the coordinate mapping model, including: Based on the homogeneous transformation relationship between screen coordinates and image coordinates corresponding to the coordinate mapping model, the matching point pairs of image coordinates and screen coordinates in the point correspondence set are obtained, resulting in multiple sets of matching point pairs. Multiple sets of the matching point pairs are input into the coordinate mapping model to construct a coefficient matrix; Perform singular value decomposition on the coefficient matrix to obtain the right singular vector corresponding to the minimum singular value of the coefficient matrix; The right singular vector is taken as a nine-dimensional vector, and the nine-dimensional vector is rearranged into a 3×3 homography matrix; The homography matrix is ​​subjected to reprojection error verification. When the verification passes, the homography matrix is ​​used as the calibration parameter.

6. The screen-marked laser spot calibration and tracking method according to claim 5, characterized in that, The reprojection error verification process for the homography matrix includes: Each image coordinate in the point correspondence set is input into the coordinate mapping model, and the corresponding predicted screen coordinates are calculated using the homography matrix; Calculate the residual between the predicted screen coordinates and the screen coordinates for each matching point pair, and calculate the average reprojection error. The average reprojection error is compared with a preset error threshold; If the average reprojection error is less than or equal to the error threshold, the verification passes; if the average reprojection error is greater than the error threshold, the verification fails.

7. The screen-marked laser spot calibration and tracking method according to claim 4, characterized in that, The calibration parameters are obtained by performing a polynomial fitting solution on the set of point correspondences based on the coordinate mapping model, including: Based on the polynomial mapping relationship corresponding to the coordinate mapping model, the matching point pairs of image coordinates and screen coordinates in the point correspondence relationship set are obtained, resulting in multiple sets of matching point pairs; Multiple sets of the matching point pairs are input into the coordinate mapping model to construct an overdetermined system of equations; The overdetermined system of equations was solved using the least squares method to obtain the polynomial coefficient matrix; The polynomial coefficient matrix is ​​used as the calibration parameter.

8. A screen-marked laser spot calibration and tracking device, characterized in that, include: Screen corner coordinate acquisition module: used to display at least one AprilTag pattern with a unique ID on the screen, and to acquire the coordinates of each AprilTag pattern in a preset screen coordinate system, so as to obtain the set of coordinates of each AprilTag corner point on the screen, which is called the screen corner coordinate set. Image corner coordinate acquisition module: used to acquire screen image, perform AprilTag detection processing on the screen image, and obtain the coordinate set of each AprilTag corner point on the image, called the image corner coordinate set; Point-to-point matching module: used to perform point-to-point matching processing on the set of screen corner coordinates and the set of image corner coordinates based on the unique ID of each AprilTag pattern, so as to construct a set of point correspondence relationships; Parameter solving module: used to determine the screen display surface type of the screen, determine the coordinate mapping model based on the screen display surface type, and perform parameter solving processing on the point correspondence set based on the coordinate mapping model to obtain calibration parameters; Tracking module: used to acquire the image to be tracked, extract the coordinates of the light spot image based on the image to be tracked, and perform coordinate mapping processing on the coordinates of the light spot image based on the calibration parameters and the coordinate mapping model to obtain the light spot tracking coordinates in the screen coordinate system.

9. A screen-marked laser spot calibration and tracking device, characterized in that, The screen-marked laser spot calibration and tracking device includes: a memory and at least one processor, wherein the memory stores instructions; At least one of the processors invokes the instructions in the memory to cause the screen-marked laser spot calibration and tracking device to perform the steps of the screen-marked laser spot calibration and tracking method as described in any one of claims 1-7.

10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the various steps of the screen-marked laser spot calibration and tracking method as described in any one of claims 1-7.