A green surface topography sensing and laser point position self-adaptive correction method and system
By performing three-dimensional scanning and closed-loop feedback correction on the green surface, the problem that laser projection control cannot adapt to the three-dimensional terrain of the green in the existing technology has been solved, achieving high-precision laser landing point guidance and improving the stability and adaptability of the system.
Patent Information
- Application Number
- CN202611244544.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-17
- Publication Date
- 2026-11-27
AI Technical Summary
In existing golf simulation training systems, the laser landing point marking scheme based on two-dimensional coordinates cannot accurately map the three-dimensional terrain of the real green, resulting in systematic errors, control deviations caused by mechanical nonlinearity, and accuracy degradation caused by environmental disturbances or parameter drift. In addition, software modification is costly and time-consuming.
Point cloud data is obtained by 3D scanning of the green surface, a surface model is established, the 2D coordinates output by the simulator are mapped to 3D coordinates, mechanical backlash and laser intensity compensation mechanisms are introduced, and the projection control parameters are adjusted through a closed-loop feedback correction mechanism until the deviation converges to the preset threshold.
It improves the accuracy and stability of laser point guidance, reduces the frequency of manual recalibration, enhances the system's adaptability to complex green terrain, and maintains compatibility with the existing simulator's two-dimensional coordinate output interface.
Smart Images

Figure CN123181754A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer graphics and image processing, specifically to a method and system for green surface terrain perception and adaptive correction of laser points. Background Technology
[0002] The golf simulation training system recreates the real golf course scene through an indoor simulation environment. The landing point guidance function requires the system to accurately mark the landing point of the ball calculated by the simulator on the curved surface of the green model in the form of a laser spot after the player hits the ball, providing the player with an intuitive landing point reference.
[0003] In existing golf simulation training systems, the mainstream laser landing mark scheme adopts a projection control method based on two-dimensional plane coordinates. In these systems, the simulator outputs two-dimensional coordinates based on the assumption of a planar green, and the laser projector directly calculates the projection angle and emits the laser based on these two-dimensional coordinates. Although some systems have introduced three-dimensional green models into the fairway simulation or display stages within the simulator, the coordinates output by the simulator are still treated as two-dimensional plane coordinates in the laser projection control process, without adapting the projection parameters to the three-dimensional terrain features of the real green surface.
[0004] When a real indoor putting green model has complex three-dimensional curved surface features, the above-mentioned projection control method based on two-dimensional coordinates will produce the following technical problems: First, the two-dimensional coordinates output by the simulator do not establish an accurate mapping relationship with the three-dimensional spatial position of the actual putting green surface, and there is a lack of a mechanism for obtaining the true height information of the target point, which will produce significant systematic errors in areas with large curvature; Second, the calculation of laser projection control parameters is usually based on ideal geometric assumptions, without considering the hysteresis compensation of the projector deflection mechanism and the problem of uneven spot brightness caused by changes in projection distance; Third, the existing solution lacks an effective closed-loop feedback correction mechanism, and cannot adaptively correct the residual deviation between the actual laser landing point and the target point, requiring frequent manual recalibration when there are environmental disturbances or parameter drift.
[0005] If the simulator is required to directly embed a 3D surface model optimized for laser projection and output 3D coordinates, it would require extensive modifications to the existing simulator software, involving software upgrades for a large number of deployed devices, which would be costly and time-consuming. Summary of the Invention
[0006] In view of the aforementioned problems, this application is proposed to provide a method and system for green surface terrain sensing and laser point adaptive correction that overcomes or at least partially solves the aforementioned problems, comprising:
[0007] The above-mentioned objective of this application is achieved through the following technical solution:
[0008] A method for green surface topography perception and adaptive laser point correction, applied to a golf landing guidance system including a simulator and a laser projector, includes the following steps:
[0009] The green surface is scanned to obtain three-dimensional point cloud data, and the three-dimensional point cloud data is fitted to the surface to obtain the surface model of the green surface.
[0010] Obtain the two-dimensional coordinates of the ball's landing point output by the simulator, and query the height value corresponding to the two-dimensional coordinates of the ball's landing point based on the surface model to form the three-dimensional coordinates of the ball's landing point;
[0011] The initial projection control parameters are calculated based on the installation coordinates of the laser projector and the three-dimensional coordinates of the ball's landing point, and the laser projector is controlled to emit laser beams according to the initial projection control parameters.
[0012] Obtain the actual landing point coordinates of the laser beam on the green surface, and correct the projection control parameters based on the deviation between the actual landing point coordinates and the three-dimensional coordinates of the ball landing point until the deviation converges to within the preset threshold.
[0013] The second objective of this invention is achieved through the following technical solution:
[0014] A green surface terrain sensing and laser point adaptive correction system includes:
[0015] The model fitting module is used to scan the green surface, obtain three-dimensional point cloud data, and perform surface fitting on the three-dimensional point cloud data to obtain the surface model of the green surface.
[0016] The coordinate determination module is used to obtain the two-dimensional coordinates of the ball's landing point output by the simulator, and to query the height value corresponding to the two-dimensional coordinates of the ball's landing point based on the surface model to form the three-dimensional coordinates of the ball's landing point.
[0017] The laser control module is used to calculate the initial projection control parameters based on the installation coordinates of the laser projector and the three-dimensional coordinates of the ball's landing point, and to control the laser projector to emit laser beams according to the initial projection control parameters.
[0018] The parameter correction module is used to obtain the actual landing point coordinates of the laser beam on the green surface, and correct the projection control parameters based on the deviation between the actual landing point coordinates and the three-dimensional coordinates of the ball landing point until the deviation converges to within the preset threshold.
[0019] This application also relates to a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method for green surface terrain perception and laser point adaptive correction.
[0020] This application has the following advantages:
[0021] This application provides a method and system for green surface topography perception and adaptive laser point correction. Addressing the problem in existing technologies where the laser projection control mechanism lacks the ability to perceive and adapt to the real three-dimensional surface features of the green, this application uses an external surface perception module to perform a three-dimensional scan of the green surface and establish a surface model. The two-dimensional coordinates output by the simulator are mapped to the three-dimensional coordinate system of the surface model to obtain the three-dimensional coordinates of the ball landing point, which includes the actual height information. Mechanical backlash compensation and laser intensity compensation mechanisms are introduced into the laser projection control parameter calculation to improve the physical accuracy of the projection control. A local sensitivity matrix is constructed through visual feedback to achieve closed-loop adaptive correction, automatically converging the deviation between the actual laser landing point and the target point to within a preset threshold. Based on the above technical solution, this application, while retaining the existing simulator's two-dimensional coordinate output interface, effectively overcomes the systematic errors caused by complex surface topography, control deviations caused by mechanical nonlinearity, and long-term accuracy degradation caused by environmental disturbances or parameter drift. It improves the accuracy and stability of laser landing point guidance, reduces the frequency of manual recalibration, and enhances the system's adaptability to complex green topography. Attached Figure Description
[0022] Figure 1 This is a flowchart of an embodiment of a method for sensing the curved surface of a green and adaptively correcting laser points according to this application;
[0023] Figure 2 This is a schematic diagram of the light spot shape distortion provided in the embodiments of this application. Detailed Implementation
[0024] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0025] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention 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 of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0026] All terms used in this application, including technical or scientific terms, have the same meaning as understood by one of ordinary skill in the art to which this application pertains, unless otherwise specifically defined. It should also be understood that terms defined in general dictionaries, such as those in common dictionaries, should be interpreted as having a meaning consistent with their meaning in the context of the relevant art, and not as having an idealized or highly formalized meaning, unless expressly defined herein.
[0027] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment shall be considered part of the specification.
[0028] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:
[0029] Golf landing guidance systems are typically used in indoor golf simulation training environments. Their main function is to accurately mark the ball's landing point on the curved surface of a green model using a laser projector, based on the simulator's calculations, after the player has struck the ball, providing the player with an intuitive visual reference. This golf landing guidance system aims to enhance the realism and accuracy of training.
[0030] The green surface refers to a specific area around the hole on a golf course. Its surface usually has complex undulations and slopes, rather than a simple flat surface. Accurate perception of the green surface is the foundation for accurate landing guidance.
[0031] Three-dimensional point cloud data refers to a collection of data points with three-dimensional coordinates obtained by sampling the surface of an object using a three-dimensional scanning device. It can discretely represent the geometric shape and surface features of the object.
[0032] Surface fitting is a mathematical modeling technique that aims to construct a continuous mathematical surface model based on discrete 3D point cloud data. The constructed surface model can smoothly approximate or precisely pass through these points, thereby reconstructing the geometry of the green surface in a computer.
[0033] A surface model is a mathematical representation of a green surface obtained through surface fitting. It contains the geometric information of the green surface in three-dimensional space and can be used to query the surface height corresponding to any planar coordinate or to perform other geometric calculations.
[0034] A simulator is the core equipment in a golf simulation training system. It is responsible for simulating the physical characteristics of a golf ball, such as its flight trajectory, speed, and spin, and calculating the coordinates of the ball's landing point on the virtual green based on the simulation results.
[0035] The two-dimensional coordinates of the ball's landing point are the expected landing point of the ball on the green, calculated by the simulator based on the ball's flight trajectory, and are usually given in the form of two-dimensional planar coordinates.
[0036] The three-dimensional coordinates of the ball's landing point refer to the precise three-dimensional position on the green surface model that corresponds to the two-dimensional coordinates of the ball's landing point output by the simulator. It includes not only planar position information but also the actual height information of that position on the green surface.
[0037] A laser projector is an actuator in a golf landing guidance system. It emits laser beams based on received control parameters and forms visible laser spots on the green surface to mark the target landing point.
[0038] Installation coordinates refer to the fixed installation position of the laser projector in the entire golf landing guidance system. They are usually represented in three-dimensional coordinates and serve as the reference for calculating the laser projection direction and angle.
[0039] Initial projection control parameters refer to the parameters used to control the first laser beam emitted by the laser projector, which are obtained through geometric calculations based on the installation coordinates of the laser projector and the three-dimensional coordinates of the ball's landing point. These parameters include the horizontal deflection angle, vertical deflection angle, and laser intensity.
[0040] A laser beam is a beam of light with a specific direction and intensity emitted by a laser projector. The point where the laser beam intersects on the curved surface of the green is the actual landing point of the laser spot.
[0041] The actual landing point coordinates refer to the actual three-dimensional position of the laser spot formed by the laser beam emitted by the laser projector on the curved surface of the green. These coordinates can be obtained using image acquisition equipment or similar methods.
[0042] Deviation refers to the spatial distance or vector difference between the actual coordinates of the laser beam landing point on the green surface and the expected three-dimensional coordinates of the ball landing point, which serves as the basis for correcting the projection control parameters.
[0043] The preset threshold refers to the maximum acceptable range of deviation between the actual landing point coordinates and the three-dimensional coordinates of the ball landing point when correcting the projection control parameters. The correction process can be stopped when the deviation converges to within the preset threshold.
[0044] In one embodiment, such as Figure 1 As shown, this application discloses a method for green surface terrain perception and laser point adaptive correction, applied to a golf landing guidance system including a simulator and a laser projector, specifically including the following steps:
[0045] S10: Scan the green surface to obtain three-dimensional point cloud data, and perform surface fitting on the three-dimensional point cloud data to obtain the surface model of the green surface.
[0046] In one embodiment of this application, a laser scanner can be used to perform a single global scan of the green surface to obtain initial 3D point cloud data covering the entire green area. Subsequently, a polynomial surface fitting algorithm is used to process the initial 3D point cloud data, thereby generating a surface model that roughly reflects the green's topography. In another implementation, a structured light scanning device can be used to scan the green surface to obtain denser point cloud data. Then, methods such as B-spline surface fitting or NURBS surface fitting can be used to process the acquired point cloud data to obtain a more refined green surface model. All of these methods can transform discrete point cloud data into continuous mathematical surfaces, providing 3D geometry for subsequent landing point calculations.
[0047] S20: Obtain the two-dimensional coordinates of the ball's landing point output by the simulator, query the height value corresponding to the two-dimensional coordinates of the ball's landing point based on the surface model, and form the three-dimensional coordinates of the ball's landing point;
[0048] In the embodiments of this application, specifically, after simulating the ball's flight trajectory, the simulator outputs a two-dimensional planar coordinate as the ball's expected landing point. One implementation is to directly search for the closest grid point's height value within a pre-built two-dimensional meshed surface model using these two-dimensional planar coordinates, and then combine this height value with the two-dimensional planar coordinate to form the three-dimensional coordinates of the ball's landing point. Another implementation utilizes a linear interpolation algorithm to perform interpolation calculations on the surface model based on the two-dimensional planar coordinates output by the simulator, thereby determining the height value of the planar position on the surface. Combining the height value with the two-dimensional planar coordinates output by the simulator yields the precise coordinates of the target point in three-dimensional space.
[0049] It should be noted that because the simulator outputs two-dimensional coordinates based on its internal preset planar coordinate system, while the surface model is based on an independent spatial coordinate system established by the actual scanning, there are differences between the two, such as the origin position and the direction of the coordinate axes. Therefore, before querying the height value, it is usually necessary to first map the two-dimensional coordinates output by the simulator to the coordinate system of the surface model through a coordinate transformation matrix to obtain planar coordinates in a unified coordinate system, and then perform interpolation to obtain the height value.
[0050] S30: Calculate the initial projection control parameters based on the installation coordinates of the laser projector and the three-dimensional coordinates of the ball's landing point, and control the laser projector to emit laser rays according to the initial projection control parameters;
[0051] In one embodiment of this application, the horizontal and vertical angles that the laser projector needs to deflect can be calculated using geometric trigonometric relationships based on the fixed installation position of the laser projector and the determined three-dimensional coordinates of the ball's landing point. These calculated horizontal and vertical angle values can be directly used as initial projection control parameters to drive the deflection mechanism of the laser projector. In another embodiment, in addition to calculating the horizontal and vertical deflection angles, the laser intensity can be initially adjusted based on the projection distance to ensure that the brightness of the laser spot remains relatively consistent at different projection distances. The calculated angle and intensity values are combined to form the initial projection control parameters, which are then sent to the laser projector to emit laser light.
[0052] S40: Obtain the actual landing point coordinates of the laser beam on the green surface, and correct the projection control parameters based on the deviation between the actual landing point coordinates and the three-dimensional coordinates of the ball landing point until the deviation converges to within the preset threshold.
[0053] In one embodiment of this application, a camera can be installed above the green to capture an image of the laser spot. Then, an image processing algorithm identifies the center pixel of the spot and converts it into two-dimensional planar coordinates on the green surface. These coordinates are compared with the two-dimensional planar coordinates of the target point to calculate the planar deviation. Further, based on the planar deviation, a proportional control algorithm is used to fine-tune the horizontal and vertical deflection angles of the laser projector. This correction process can be repeated until the planar deviation is less than a preset two-dimensional threshold. In another implementation, a more advanced image acquisition device can be used, combined with a surface model, to accurately convert the center pixel coordinates of the laser spot into the actual landing point coordinates in three-dimensional space. Then, the three-dimensional deviation between the actual landing point coordinates and the three-dimensional coordinates of the ball's landing point is calculated. Based on this three-dimensional deviation, an iterative optimization algorithm is used to gradually adjust the control parameters of the laser projector, such as the horizontal and vertical deflection angles, until the magnitude of the three-dimensional deviation converges to within a preset three-dimensional threshold.
[0054] For example, as a specific implementation, suppose user A is practicing hitting a ball in a golf simulation training range equipped with the golf landing guidance system described in this embodiment.
[0055] Before user A begins training, the system first scans the entire green surface using a 3D laser scanner to acquire a large amount of discrete 3D point cloud data. Subsequently, using a surface fitting algorithm, such as non-uniform rational B-spline surface fitting, a high-precision green surface model is constructed based on the acquired 3D point cloud data. This surface model can accurately represent every undulation and slope of the green, thereby solving the height error problem caused by simplifying the green to a plane in existing technologies.
[0056] When user A hits the ball, the simulator immediately calculates the expected landing point coordinates, for example, (X1, Y1) on the green plane. Upon receiving these two-dimensional coordinates, the system uses a pre-established green surface model to interpolate (X1, Y1) within the model, thereby determining the precise height Z1 of the plane's position on the green surface. Based on this, a precise three-dimensional coordinate of the ball's landing point (X1, Y1, Z1) can be obtained. This step solves the problem of inaccurate target point height components in existing technologies.
[0057] Based on this, the system calculates the initial projection control parameters according to the installation coordinates of the laser projector and the three-dimensional coordinates of the ball's landing point, which have just been determined. For example, the system calculates the horizontal and vertical angles that the laser projector needs to deflect to ensure that the laser beam is directed towards the target point. Simultaneously, the system calculates an initial laser intensity compensation value based on the distance from the laser projector to the target point to ensure that the brightness of the laser spot on the green is appropriate. Furthermore, these parameters are combined into the initial projection control parameters and sent to the laser projector, thus controlling it to emit the corresponding laser beam.
[0058] However, due to factors such as mechanical backlash, environmental disturbances, or initial calibration errors, the laser beam emitted by the laser projector may not accurately land on the target point. To address this issue, this embodiment introduces an adaptive correction mechanism. Specifically, a high-resolution image acquisition device can be installed above the green to capture real-time images of the laser spot on the green surface. Through image processing algorithms, the system can accurately extract the center pixel coordinates of the laser spot and, combined with the green surface model, convert them into the actual three-dimensional coordinates (X2, Y2, Z2) of the laser beam's landing point on the green surface.
[0059] Finally, the system calculates the three-dimensional deviation vector between the actual landing point coordinates and the three-dimensional coordinates of the ball's landing point. If the magnitude of this deviation vector exceeds a preset threshold, such as 5 millimeters, the system initiates a correction process. Specifically, based on the magnitude and direction of the deviation vector, and the geometric relationship between the laser projector and the green surface, the system calculates the required horizontal and vertical deflection angle corrections for the current projection control parameters. These calculated corrections are then added to the current projection control parameters to form new control parameters, and the laser projector is controlled to emit a laser beam again. This process is iteratively repeated, with each iteration correcting the deviation between the new actual landing point and the target point until the magnitude of the three-dimensional deviation vector converges to within the preset threshold. Through this closed-loop feedback correction, the system ensures that the laser spot will ultimately land precisely at the landing point of user A's ball, thus providing user A with highly accurate landing guidance.
[0060] Based on the above examples, the solution in this embodiment first scans the green surface and constructs an accurate three-dimensional surface model, which effectively overcomes the limitations of simplifying the green surface to a planar processing method in the prior art. For example, in the above example, the system can acquire every undulation and slope of the green, thereby providing accurate height information when determining the three-dimensional coordinates of the ball's landing point, avoiding systematic errors caused by surface simplification, especially in areas with large curvature, where the accuracy improvement is particularly significant.
[0061] Secondly, the solution in this embodiment effectively solves the problem of inaccurate mapping between the simulator coordinate system and the actual green surface by obtaining the two-dimensional coordinates of the ball's landing point output by the simulator and determining the corresponding three-dimensional coordinates of the ball's landing point based on the surface model. In the example above, the two-dimensional coordinates output by the simulator are accurately mapped onto the three-dimensional surface model, thereby obtaining a precise target point containing height information. Compared with existing methods that rely solely on two-dimensional planar coordinates or coarse height estimation, the above solution is more accurate.
[0062] Furthermore, this embodiment achieves adaptive correction of the laser spot position by introducing a closed-loop feedback correction mechanism. In the example above, even if there is an initial projection deviation, the system can obtain the actual landing point coordinates in real time and compare them with the target point, then iteratively correct the projection control parameters until the deviation converges. This contrasts with existing technologies that lack an effective closed-loop feedback correction mechanism and whose system accuracy is highly dependent on the initial calibration quality. Based on this process, the adaptive correction capability of this application can significantly enhance the robustness of the system, enabling it to cope with various uncertainties such as mechanical hysteresis and environmental changes, ensuring that the laser spot can always be accurately marked at the target position.
[0063] In summary, this embodiment, by combining accurate green surface terrain perception with efficient laser point adaptive correction, effectively overcomes systematic errors caused by complex curved terrain, control deviations caused by mechanical nonlinear characteristics, and long-term accuracy degradation caused by environmental disturbances or parameter drift, while retaining the existing simulator's two-dimensional coordinate output interface. It improves the accuracy and stability of laser point guidance, reduces the frequency of manual recalibration, and enhances the system's adaptability to complex green terrain.
[0064] The following will further explain a method for sensing the terrain of a green surface and adaptively correcting laser points in this exemplary embodiment.
[0065] In one embodiment, step S10, "scanning the green surface to obtain three-dimensional point cloud data, and performing surface fitting on the three-dimensional point cloud data to obtain a surface model of the green surface," specifically includes:
[0066] A global scan of the green surface is performed to obtain initial 3D point cloud data, and the initial 3D point cloud data is fitted to the surface to obtain an initial surface model.
[0067] In the embodiments of this application, a global scan of the green surface can be achieved by using a LiDAR system to perform a one-time or regional comprehensive scan of the entire green area, thereby obtaining point cloud data with wide coverage and moderate density; alternatively, a structured light scanner or photogrammetry technology can be used to generate initial 3D point cloud data by capturing images from multiple angles and performing 3D reconstruction. Subsequently, surface fitting can be performed using methods such as least squares method, B-spline surface fitting, NURBS surface fitting, or triangular mesh model to convert the discrete point cloud data into a continuous mathematical surface model.
[0068] Calculate the local curvature of each region in the initial surface model, identify regions with local curvature exceeding a preset curvature threshold as high curvature regions, and perform supplementary scanning on high curvature regions to obtain supplementary point cloud data;
[0069] In the embodiments of this application, the calculation of local curvature can be achieved through differential geometric analysis of the initial surface model, such as calculating Gaussian curvature, mean curvature, or principal curvature. This can be estimated using the finite difference method or by fitting a local quadratic surface based on neighborhood points. A preset curvature threshold can be empirically set based on the complexity of the actual green, the required accuracy, and the performance of the scanning equipment. For example, a value can be set such that when the absolute value of the curvature exceeds this value, the area can be considered a high curvature region. Based on this, supplementary scanning is performed on the high curvature region to obtain supplementary point cloud data. This aims to specifically increase the data density of the high curvature region to capture more details. Specifically, this can be achieved by adjusting the parameters of the scanning equipment, such as scanning resolution and scanning path, to perform a local high-density secondary scan on the identified high curvature region to obtain more refined point cloud data; alternatively, a higher-precision local scanning device, such as a handheld 3D scanner, can be used to perform supplementary measurements on the high curvature region.
[0070] The curvature of a typical green is between 0.01 / m and 0.1 / m. The curvature of flat areas is close to 0, while the curvature of undulating slopes can reach more than 0.05 / m. This curvature threshold can be adjusted according to the point cloud density of the initial scan: the sparser the point cloud, the smaller the curvature threshold should be set to capture more details; when the point cloud is already relatively dense, the curvature threshold can be appropriately increased.
[0071] The supplementary point cloud data is fused with the initial 3D point cloud data, and local surface refitting is performed on the high curvature region to obtain the surface model of the green surface.
[0072] In the embodiments of this application, 3D point cloud data fusion can be achieved by aligning and merging supplementary point cloud data with the initial point cloud data in the same coordinate system based on feature matching, iterative nearest point algorithms, or registration algorithms. Local surface refitting can employ methods similar to the initial fitting, but only for the fused point cloud data in and around high curvature regions to ensure improved fitting accuracy in these areas. For example, methods such as local weighted regression, radial basis function interpolation, or surface subdivision can be used.
[0073] As an example, as a specific implementation method, the following steps can be used to obtain a surface model of the green: First, a LiDAR scanner mounted on a drone is used to perform a flight scan of the entire green area to obtain initial three-dimensional point cloud data covering the entire green.
[0074] Based on this, the initial 3D point cloud data is imported into 3D modeling software, and an initial surface model of the green is generated using a non-uniform rational B-spline surface fitting algorithm. Then, the initial surface model is analyzed, and the average curvature of each point on its surface is calculated. Based on this, assuming an average curvature threshold is set, for example 0.05 (in units of 1 / meter), all regions with an absolute average curvature value greater than this threshold are marked as high curvature regions. These high curvature regions typically correspond to areas on the green with drastic slope changes or undulations. Then, for these marked high curvature regions, a structured light-based scanner can be used for local supplementary scanning to obtain denser supplementary point cloud data.
[0075] Finally, the supplementary point cloud data is registered and fused with the previously acquired initial 3D point cloud data to form a more complete and detailed point cloud dataset. Subsequently, local NURBS surface refitting is performed only on the fused point cloud data of high curvature regions to ensure that the geometric details of these key regions are accurately captured, ultimately resulting in the green surface model used for subsequent calculations.
[0076] Through the above technical solution, this application can effectively solve the problem that performing only one global scan may lead to the loss of details or insufficient fitting accuracy in high curvature areas. Specifically, by introducing local curvature analysis and targeted supplementary scans, and performing local refitting in high curvature areas, the overall accuracy of the green surface model can be improved, especially in areas with complex terrain and large curvature variations. This allows for more accurate determination of the ball's landing point's three-dimensional coordinates based on the surface model, providing more accurate initial projection control parameters for the laser projector. Ultimately, this improves the simulation realism of the golf landing guidance system and the accuracy of laser point correction.
[0077] In one embodiment, step S20, "obtaining the two-dimensional coordinates of the ball's landing point output by the simulator, querying the height value corresponding to the two-dimensional coordinates of the ball's landing point based on the surface model, and forming the three-dimensional coordinates of the ball's landing point," specifically includes:
[0078] Multiple calibration points are set on the green surface. The first coordinate of each calibration point in the simulator coordinate system and the second coordinate in the surface model coordinate system are obtained respectively. The two-dimensional coordinate transformation matrix from the simulator coordinate system to the projection plane of the surface model is calculated based on the first coordinate and the second coordinate.
[0079] In the embodiments of this application, calibration points are reference points used to establish the correspondence between two different coordinate systems. By selecting calibration points at known locations on the green surface and obtaining the first coordinates of these calibration points in the simulator coordinate system and the second coordinates in the surface model coordinate system, a coordinate transformation matrix can be calculated. This matrix accurately transforms two-dimensional points in the simulator coordinate system to a two-dimensional plane in the surface model coordinate system, thereby solving the problem of coordinate inconsistency between different systems. One implementation method is to place physical markers on the green surface as calibration points through manual measurement, and then obtain the first coordinates of these markers in the simulator coordinate system using the simulator's built-in calibration tool or by manual input. Simultaneously, high-precision measuring equipment, such as laser rangefinders or total stations, is used to obtain the three-dimensional coordinates of these physical markers on the actual green surface and project them onto a two-dimensional plane in the surface model coordinate system as the second coordinates. Another implementation method is to use visual recognition technology to preset identifiable patterns or feature points on the green surface as calibration points. These patterns are identified by the simulator's internal image processing module, obtaining their first coordinates in the simulator's image coordinate system. Simultaneously, when constructing the surface model, the second coordinates of these patterns in the surface model's coordinate system are pre-recorded. Furthermore, the coordinate transformation matrix can be calculated using the least squares method to solve for the affine transformation matrix or the perspective transformation matrix, and the optimal transformation parameters are obtained by constructing an overdetermined system of equations.
[0080] Obtain the two-dimensional coordinates of the ball's landing point output by the simulator, and transform the two-dimensional coordinates of the ball's landing point to the coordinate system of the curved surface model according to the coordinate transformation matrix to obtain the planar coordinates of the target point;
[0081] In one embodiment of this application, the two-dimensional coordinates of the ball's landing point output by the simulator are typically two-dimensional planar coordinates defined internally. These two-dimensional planar coordinates are represented as a homogeneous coordinate vector, and then multiplied with a pre-calculated coordinate transformation matrix to obtain the corresponding planar coordinates in the surface model coordinate system. Another implementation involves using a lookup table or non-linear mapping function to transform the coordinates if the coordinate transformation matrix is piecewise or non-linear. For example, for each two-dimensional coordinate of the ball's landing point output by the simulator, its planar coordinates in the surface model coordinate system can be directly obtained by consulting a pre-established mapping table.
[0082] In the curved surface model, the planar coordinates of the target point are interpolated to obtain the corresponding height value. The planar coordinates of the target point are then combined with the height value to obtain the three-dimensional coordinates of the ball's landing point.
[0083] In the embodiments of this application, after the previous step, the two-dimensional planar coordinates of the target point in the coordinate system of the surface model have been obtained. Since the green surface is three-dimensional, it is necessary to obtain the third-dimensional information corresponding to the planar coordinates, i.e., the height value, from the surface model to completely determine the three-dimensional spatial position of the target point. One implementation is that the surface model usually exists in the form of discrete point cloud data or parametric surface. For a given target point planar coordinates, interpolation queries can be performed in the surface model. For example, if the surface model is meshed, methods such as bilinear interpolation, nearest neighbor interpolation, or cubic spline interpolation can be used to estimate the height value of the target point based on the height values of surrounding known points. Another implementation is that if the surface model is a parametric surface, the planar coordinates of the target point or its corresponding parameters can be directly substituted into the surface equation to calculate its three-dimensional coordinates on the surface, thereby obtaining the corresponding height value. After obtaining the planar coordinates and height value, they can be combined to obtain the three-dimensional coordinates of the target point.
[0084] For example, as a specific implementation, firstly, 20 physical calibration points are evenly arranged on the curved surface of the green. These calibration points can be circular markers with specific patterns. A high-precision laser rangefinder or total station is used to measure the three-dimensional coordinates of these calibration points in the actual green space, and these coordinates are projected onto a two-dimensional plane in the coordinate system of the curved surface model, serving as the second coordinates of each calibration point. Simultaneously, the image recognition module built into the golf simulator identifies the positions of these physical calibration points on the simulator's display screen, obtaining their pixel coordinates or logical coordinates in the simulator's coordinate system, which serve as the first coordinates of each calibration point.
[0085] Based on this, using the first and second coordinates, a 2D-to-2D affine transformation matrix is solved using the least squares method. This affine transformation matrix can describe the translation, rotation, scaling, and shearing relationships between the simulator coordinate system and the surface model coordinate system. When the simulator outputs the two-dimensional coordinates of a ball's landing point, it is represented as a homogeneous coordinate vector, and then multiplied with the previously calculated affine transformation matrix to obtain the planar coordinates in the surface model coordinate system.
[0086] Finally, in the constructed green surface model, such as a TIN model composed of triangular meshes, interpolation is performed on this planar coordinate. Specifically, the triangular facet containing the planar coordinate can be found, and then the centroid coordinates are interpolated using the Z values of the three vertices of the triangular facet to calculate the Z-axis height value corresponding to the planar coordinate. Combining the planar coordinate and the height value yields the three-dimensional coordinates of the target point.
[0087] Through the above technical solution, this application can establish a precise mapping relationship between the simulator coordinate system and the green surface model coordinate system. Specifically, by setting calibration points and calculating the coordinate transformation matrix, the problem of coordinate mismatch between the two-dimensional ball landing point coordinates output by the simulator and the actual three-dimensional green surface model can be effectively solved. This allows the ball landing point information obtained from the simulator to be accurately transformed onto the green surface model, thereby precisely determining the three-dimensional coordinates of the ball landing point. This precise coordinate transformation avoids initial target point positioning deviations caused by coordinate system inconsistencies, providing high-precision input for subsequent laser projection control parameter calculations, and improving the initial accuracy and efficiency of laser point correction in the entire golf landing guidance system.
[0088] In one embodiment, the step "setting multiple calibration points on the green surface, obtaining the first coordinates of each calibration point in the simulator coordinate system and the second coordinates in the surface model coordinate system, and calculating the two-dimensional coordinate transformation matrix from the simulator coordinate system to the projection plane of the surface model based on the first and second coordinates" specifically includes:
[0089] Obtain the local curvature of each region in the surface model, and determine the density of calibration points in each region based on the local curvature;
[0090] In the embodiments of this application, local curvature is an important parameter describing the geometric characteristics of a surface, reflecting the degree to which the surface deviates from the plane near a certain point. Its concept can be obtained by calculating the principal curvature, Gaussian curvature, or mean curvature of the surface at a certain point. One implementation is to calculate the curvature value of each discrete point or small region by performing differential geometric analysis on the surface model after its construction. For example, the finite difference method or a grid-based curvature estimation algorithm can be used. Another implementation is to directly calculate the curvature of each point on the surface by performing second-order partial derivative operations on the parameterized equations generated during the surface fitting process. Determining the calibration point density for each region based on local curvature refers to planning the distribution density of calibration points according to the curvature of each region of the green surface. The calibration point density refers to the number of calibration points set per unit area, and its function is to ensure that sufficient data points are obtained in different curvature regions to accurately reflect the terrain features. One approach is to set one or more curvature thresholds, defining regions with curvature above the threshold as high-curvature regions and assigning them a higher density of calibration points, while regions with curvature below the threshold are assigned a lower density. Another approach is to establish a functional relationship between local curvature and calibration point density, such as a linear or nonlinear function, so that the greater the curvature, the greater the corresponding calibration point density, thus achieving adaptive density adjustment.
[0091] Based on the density of calibration points in each region, multiple calibration points are arranged on the green surface, and the first coordinates of each calibration point in the simulator coordinate system and the second coordinates in the surface model coordinate system are obtained respectively.
[0092] In the embodiments of this application, arranging multiple calibration points on the green surface according to the calibration point density of each region refers to physically setting up identifiable and measurable reference points on the green surface according to a predetermined density distribution strategy. These calibration points are used to establish the correspondence between different coordinate systems. One implementation is to use automated equipment to spray or place physical markers on the green surface according to a preset density distribution map. Another implementation is to manually place markers with specific patterns or colors, such as QR codes, reflectors, or targets of specific shapes, uniformly or non-uniformly on the green surface according to the density distribution map. Obtaining the first coordinates of each calibration point in the simulator coordinate system and the second coordinates in the surface model coordinate system means collecting the precise position information of each calibration point in two different coordinate systems. The first coordinate is the two-dimensional or three-dimensional position information recognized by the simulator system, and the second coordinate is the three-dimensional position information based on the green surface model. The first coordinate can be obtained by using the simulator's built-in visual recognition system or sensors, such as infrared sensors or depth cameras, to identify the calibration point and output its position in the simulator's internal coordinate system. The second coordinate can be obtained by projecting the position of the calibration point onto the established green surface model, or by directly measuring the three-dimensional position of the calibration point in the coordinate system of the surface model using high-precision measuring equipment such as laser rangefinders and total stations.
[0093] Based on the first and second coordinates of each calibration point, calculate the two-dimensional coordinate transformation matrix from the simulator coordinate system to the projection plane of the surface model.
[0094] In the embodiments of this application, calculating the two-dimensional coordinate transformation matrix from the simulator coordinate system to the projection plane of the curved model based on the first and second coordinates of each calibration point refers to using collected corresponding point data to mathematically solve for a transformation matrix that can transform points in the simulator coordinate system to the curved model coordinate system. The coordinate transformation matrix is a mathematical tool used to describe the rotation, translation, and scaling relationships from one coordinate system to another. One implementation method is to use mathematical methods such as least squares or singular value decomposition to solve for an optimal rigid body transformation matrix, including rotation matrices and translation vectors, based on multiple pairs of corresponding points. Another implementation method is to use iterative optimization algorithms, such as the Levenberg-Marquardt algorithm, to progressively optimize the parameters of the coordinate transformation matrix by minimizing the transformation error.
[0095] For example, as a specific implementation, the green surface model can first be triangulated. Then, the Gaussian curvature and average curvature of each grid vertex can be calculated, and these curvature values can be used as quantification indicators of local curvature. Subsequently, a curvature threshold can be set. For example, when the absolute value of the Gaussian curvature is greater than a certain preset value, the density of calibration points in that area is set to 5 points per square meter; when it is less than that value, the density is set to 2 points per square meter.
[0096] Furthermore, a mobile robot equipped with a vision recognition system and an inkjet printer can be used to automatically spray markers of specific shapes and colors onto the green surface based on a pre-calculated density distribution map. The simulator can use a camera array on its top to capture the positions of these markers in the simulator's internal 3D coordinate system in real time, serving as the first coordinate. Simultaneously, a high-precision laser scanner is used to locally scan the area with the sprayed markers, and the scan results are matched with the green surface model to obtain the 3D positions of the markers in the surface model's coordinate system, serving as the second coordinate. Once a sufficient number of corresponding coordinate pairs are collected, a rigid body transformation matrix involving rotation and translation can be solved using a quaternion-based least squares method.
[0097] Through the above technical solution, this application can adaptively adjust the density of calibration points according to the complexity of the green's curved terrain, thereby ensuring that denser and more comprehensive data can be collected in areas with drastic curvature changes, effectively avoiding coordinate transformation matrix calculation errors caused by uneven distribution of calibration points or insufficient data. Compared with the basic solution, the solution in this embodiment can improve the accuracy and robustness of the transformation between the simulator coordinate system and the curved model coordinate system, making the subsequent transformation from two-dimensional coordinates of the ball landing point to three-dimensional coordinates of the ball landing point more accurate, ultimately improving the adaptability of the entire golf landing guidance system to complex green terrain and the accuracy of laser point correction.
[0098] In one embodiment, the step of "calculating the two-dimensional coordinate transformation matrix from the simulator coordinate system to the projection plane of the curved surface model based on the first and second coordinates of each calibration point" specifically includes:
[0099] Based on the local curvature of each calibration point at its corresponding position in the surface model, initial fitting weights are determined for each calibration point.
[0100] In the embodiments of this application, local curvature is an indicator of the degree of surface curvature. A larger curvature indicates a more rugged terrain, while a smaller curvature indicates a flatter terrain. During the fitting process, an initial weight value between 0 and 1 can be assigned to each calibration point based on the magnitude of the local curvature, using a preset mapping function or a hierarchical strategy. For example, calibration points in flat areas with smaller curvature can receive higher initial weights, while calibration points in complex areas with larger curvature can receive lower initial weights, reflecting potential uncertainties in the data.
[0101] A system of coordinate equations is constructed using the first and second coordinates of each calibration point, and then solved based on the initial fitting weights to obtain the initial coordinate transformation matrix.
[0102] In the embodiments of this application, the first coordinate is the position of the calibration point in the simulator coordinate system, and the second coordinate is the position of the calibration point in the surface model coordinate system. During the solution process, optimization algorithms such as weighted least squares can be used to introduce the previously determined initial fitting weights into the solution of the equation system. This allows calibration points with higher weights to have a greater impact on the calculation result of the initial coordinate transformation matrix, thereby obtaining an initial coordinate transformation matrix that considers the terrain complexity.
[0103] Based on the initial coordinate transformation matrix, perform a forward mapping on the first coordinates of each calibration point, and calculate the residual between the forward mapping result of each calibration point and the corresponding second coordinate;
[0104] In the embodiments of this application, the first coordinates of each calibration point are forward mapped according to the initial coordinate transformation matrix. The residual between the forward mapping result and the corresponding second coordinate of each calibration point is calculated. This means transforming the first coordinate of the calibration point in the simulator coordinate system to the surface model coordinate system using the initial coordinate transformation matrix obtained earlier, resulting in a predicted second coordinate. Then, this predicted second coordinate is compared with the actual second coordinate of the calibration point in the surface model coordinate system, and the difference between the two is calculated, i.e., the residual. The residual can be expressed as the magnitude of Euclidean distance or vector difference, which quantifies the accuracy of the current initial coordinate transformation matrix.
[0105] The calibration points whose residuals exceed the preset residual threshold are identified as abnormal calibration points, and the initial fitting weights of the abnormal calibration points are reduced.
[0106] In the embodiments of this application, calibration points whose residuals exceed a preset residual threshold are identified as abnormal calibration points, and the initial fitting weights of these abnormal calibration points are reduced. This means setting an acceptable upper limit for residuals. If the residual of a calibration point exceeds this preset threshold, it is considered that the data at that calibration point may have a large measurement error or an anomaly, and it is marked as an abnormal calibration point. Subsequently, the initial fitting weights of these abnormal calibration points are reduced, for example, by significantly decreasing their weight values, such as setting them to a very small positive number or zero, to weaken their influence in subsequent fitting calculations.
[0107] Due to human error or simulator output error in obtaining the coordinates of calibration points, the coordinates of some calibration points may be inaccurate. When the difference between the calculated coordinates and the actual coordinates of a calibration point exceeds a reasonable range after mapping with the initial coordinate transformation matrix, it should be identified as an outlier and its weight reduced. Typically, a preset residual threshold can be set to 5 to 10 millimeters. For indoor simulation training scenarios, the normal measurement error of calibration point coordinates is generally within 3 millimeters; therefore, a residual exceeding 5 millimeters can be considered abnormal. Alternatively, this residual threshold can be automatically determined based on the statistical characteristics of the residuals of all calibration points: calculate the mean and standard deviation of the residuals of all calibration points, and set the residual threshold to the mean plus 2 or 3 times the standard deviation to accommodate differences in accuracy across different sites and equipment.
[0108] Based on the fitting weights of each calibration point after weight reduction, the coordinate transformation matrix is obtained by weighted least squares solution of the corresponding equation system.
[0109] In the embodiments of this application, based on the fitted weights of each calibration point after weight reduction processing, a weighted least squares solution is performed on the coordinate-corresponding equations to obtain the coordinate transformation matrix. This means that after weight reduction processing of outlier calibration points, all calibration points and their updated fitted weights, including weighted outlier points and unweighted normal points, are reused to perform a weighted least squares solution on the coordinate-corresponding equations again. Through this method, the influence of outlier data on the final coordinate transformation matrix is effectively suppressed, thereby obtaining a more accurate coordinate transformation matrix.
[0110] As an example, in one specific implementation, when calculating the two-dimensional coordinate transformation matrix from the simulator coordinate system to the projection plane of the surface model, the local curvature value of each calibration point in the green surface model can be obtained first. For example, for calibration points with curvature values below a certain threshold, an initial fitting weight of 0.9 can be assigned; for calibration points with curvature values above this threshold, an initial fitting weight of 0.6 can be assigned.
[0111] Based on this, an initial coordinate transformation matrix is obtained using the weighted least squares method with initial fitting weights. Then, the first coordinates of each calibration point output by the simulator are transformed using this initial coordinate transformation matrix and compared with the second coordinates in the surface model to calculate the three-dimensional residual of each calibration point.
[0112] Based on this, a residual threshold is set, for example, 2 cm. If the residual of a calibration point exceeds 2 cm, it is identified as an abnormal calibration point, and its fitting weight is reduced from 0.9 or 0.6 to 0.1.
[0113] Finally, the weighted least squares solution is performed again using the updated fitting weights to obtain a more accurate coordinate transformation matrix.
[0114] Through the above technical solution, this application can effectively identify and reduce the impact of abnormal calibration point data on the calculation of the coordinate transformation matrix. Specifically, by introducing initial fitting weights based on local curvature and combining residual analysis for outlier point weight reduction processing, the final coordinate transformation matrix can have higher accuracy. Based on this, the solution in this embodiment can not only improve the accuracy of the transformation between the simulator coordinate system and the green surface model coordinate system, thereby ensuring the accuracy of the mapping from the two-dimensional coordinates of the ball landing point to the three-dimensional coordinates of the ball landing point, laying the foundation for the accuracy of subsequent laser projection, but also improve the overall performance and user experience of the golf landing guidance system.
[0115] In one embodiment, step S30, "calculating initial projection control parameters based on the installation coordinates of the laser projector and the three-dimensional coordinates of the ball's landing point, and controlling the laser projector to emit laser rays according to the initial projection control parameters," specifically includes:
[0116] Obtain the pre-calibrated body coordinate system of the laser projector, and obtain the attitude matrix of the body coordinate system relative to the surface model coordinate system;
[0117] In the embodiments of this application, obtaining the pre-calibrated body coordinate system of the laser projector and the attitude matrix of the body coordinate system relative to the surface model coordinate system refers to determining the internal coordinate reference system of the laser projector and the spatial transformation relationship between this internal coordinate system and the global coordinate system used by the green surface model. The body coordinate system typically uses the optical center or mechanical rotation center of the laser projector as its origin and defines its own orthogonal axis, serving as a direct reference for the internal control commands of the laser projector. The attitude matrix is a mathematical tool used to describe the rotational and translational relationship of one three-dimensional coordinate system relative to another. It can be implemented by selecting several known three-dimensional coordinate points in the surface model coordinate system, projecting laser light onto these points using the laser projector, recording internal control parameters, and calculating the matrix using optimization algorithms such as the least squares method; alternatively, it can be constructed by directly measuring the position and orientation of specific feature points on the laser projector body in the surface model coordinate system using external high-precision measuring equipment.
[0118] Based on the installation coordinates of the laser projector and the three-dimensional coordinates of the ball's landing point, the first projection direction vector from the laser projector to the target point in the coordinate system of the curved surface model is calculated, and the first projection direction vector is transformed to the coordinate system of the laser projector body according to the attitude matrix to obtain the second projection direction vector.
[0119] In the embodiments of this application, a vector pointing from the installation coordinates to the three-dimensional coordinates of the ball's landing point can be obtained by subtracting the installation coordinates of the laser projector from the three-dimensional coordinates of the ball's landing point. This vector is then normalized to obtain a unit direction vector. The first projection direction vector is transformed to the laser projector's body coordinate system based on the attitude matrix, resulting in a second projection direction vector. This second projection direction vector converts the projection direction in the global coordinate system into a direction in the internal coordinate system that the laser projector can understand and execute. Specifically, this is achieved by performing matrix multiplication between the first projection direction vector and the inverse matrix of the attitude matrix or the transpose of its rotated portion, thereby realizing the coordinate system transformation.
[0120] Based on the components of the second projection direction vector, calculate the horizontal and vertical deflection angles of the laser projector;
[0121] In the embodiments of this application, the horizontal and vertical deflection angles of the laser projector are calculated based on the components of the second projection direction vector. This aims to decompose the direction vector in the body coordinate system into the horizontal and vertical deflection angles required for the internal control of the laser projector. Specifically, these angles can typically be calculated using trigonometric functions based on the components of the second projection direction vector. For example, the horizontal deflection angle can be calculated using the projection component of the vector on the horizontal plane, and the vertical deflection angle can be calculated using the projection component of the vector on the vertical plane and the modulus of the horizontal projection. For laser projectors with certain nonlinear or complex mechanical structures, a mapping table between the direction vector and the deflection angle can be pre-established, and the corresponding angles can be obtained by looking up the table.
[0122] The projection distance is calculated based on the installation coordinates of the laser projector and the three-dimensional coordinates of the ball's landing point, and the laser intensity compensation value is calculated based on the projection distance.
[0123] In the embodiments of this application, the projection distance is the straight-line distance from the laser projector to the target point, and the laser intensity compensation value is used to adjust the laser intensity emitted by the laser projector to ensure that the brightness of the laser spot on the green surface remains consistent or meets the requirements at different distances. The projection distance can be calculated using the Euclidean distance formula to determine the distance between the installation coordinates of the laser projector and the three-dimensional coordinates of the ball's landing point. The laser intensity compensation value can be determined based on a pre-established functional relationship between the projection distance and the required laser intensity compensation value, for example, based on a laser attenuation model, by querying or calculating the corresponding compensation value from the calculated projection distance.
[0124] The specific process of calculating the laser intensity compensation value based on the projection distance includes: according to the formula Calculate, where, To compensate for the target laser control intensity, The preset reference light intensity, The actual projection distance is calculated based on the three-dimensional coordinates of the ball's landing point and the installation coordinates. This is the reference projection distance during calibration. In other embodiments, the compensation value can also be obtained by consulting a pre-calibrated "distance-PWM duty cycle" mapping table to ensure that the visual brightness of the light spot on the curved surface is consistent at different projection distances.
[0125] The horizontal deflection angle, vertical deflection angle, and laser intensity compensation value are combined to obtain the initial projection control parameters, and the laser projector is controlled to emit laser beams based on the initial projection control parameters.
[0126] In the embodiments of this application, the horizontal deflection angle, vertical deflection angle, and laser intensity compensation value can typically be encapsulated in a data structure as initial projection control parameters. These parameters are then sent to the laser projector via a control interface provided by the laser projector, such as serial communication, network protocol, or dedicated driver, so that the projector can adjust its internal motor and laser emission module to emit laser beams.
[0127] For example, as a specific implementation, a two-axis galvanometer laser projector can be used. During the system initialization phase, the laser projector is calibrated using a high-precision three-dimensional measuring device to obtain the origin, axis, and attitude matrix of its body coordinate system relative to the green surface model coordinate system. For example, the installation coordinates of the laser projector in the surface model coordinate system are (X... L ,Y L Z L The two-dimensional coordinates of the ball's landing point output by the simulator are transformed to obtain the three-dimensional coordinates of the ball's landing point (X). T ,Y T Z T ).
[0128] First, calculate the vector pointing from the laser projector mounting coordinates to the three-dimensional coordinates of the ball's landing point, i.e., (X... T -X L ,Y T -Y L Z T -Z L ), and normalize it to obtain the first projection direction vector.
[0129] Based on this, using the pre-acquired attitude matrix, which includes the rotation matrix and translation vector, the three-dimensional coordinate vector of the ball landing point is transformed to the body coordinate system of the laser projector through the inverse matrix or transpose matrix of the rotation matrix, thus obtaining the second projection direction vector.
[0130] Then, based on the components of the second projection direction vector, for example (V x V y V z ), calculate the horizontal deflection angle θ1=arctan2(V y V x ) and vertical deflection angle θ2=arctan2(V z ,sqrt(V x 2 +V y 2 Simultaneously, the Euclidean distance between the laser projector's installation coordinates and the three-dimensional coordinates of the ball's landing point is calculated, and the corresponding laser intensity compensation value is queried or calculated based on the preset distance-intensity compensation curve.
[0131] Finally, θ1, θ2 and the laser intensity compensation value are combined into initial projection control parameters, which are sent to the galvanometer control unit via a digital interface to drive the laser projector to emit laser beams.
[0132] Through the above technical solution, this application can convert the three-dimensional coordinates of the ball's landing point in the global coordinate system into horizontal and vertical deflection angles that the laser projector can directly execute, while simultaneously considering laser intensity compensation based on the projection distance. This initial projection parameter calculation method improves the accuracy of the laser projector's initial projection, reduces the initial deviation between the laser ray and the three-dimensional coordinates of the ball's landing point, and directly leads to faster convergence in subsequent iterative correction processes, reducing the number of corrections. This improves the response efficiency and user experience of the entire golf landing guidance system. In complex curved terrain, this precise initial positioning is particularly important, avoiding difficulties in correction or slow convergence caused by excessive initial deviations.
[0133] In one embodiment, the step of "combining the horizontal deflection angle, the vertical deflection angle, and the laser intensity compensation value to obtain initial projection control parameters, and controlling the laser projector to emit laser rays based on the initial projection control parameters" specifically includes:
[0134] Obtain the current actual horizontal deflection angle and actual vertical deflection angle of the laser projector;
[0135] In the embodiments of this application, the actual horizontal deflection angle and actual vertical deflection angle of the laser projector are obtained to determine the actual operating state of the laser projector at the current moment. The actual horizontal deflection angle and actual vertical deflection angle refer to the current physical angular position of the deflection mechanism inside the laser projector. These angles can be read in real time using angle sensors integrated inside the laser projector, such as encoders, potentiometers, or Hall sensors; alternatively, they can be obtained through feedback signals from the drive controller. Their function is to provide a benchmark for subsequent hysteresis compensation in order to evaluate the hysteresis characteristics of the laser projector in different deflection directions.
[0136] The horizontal deflection direction of the horizontal axis is determined based on the difference between the actual horizontal deflection angle and the calculated horizontal deflection angle, and the vertical deflection direction of the vertical axis is determined based on the difference between the actual vertical deflection angle and the calculated vertical deflection angle.
[0137] In the embodiments of this application, this step is used to determine the tendency of the laser projector to deflect in the horizontal and vertical directions. The horizontal and vertical deflection directions indicate whether the laser projector needs to deflect clockwise / counterclockwise or upward / downward to achieve the target angle. This can be achieved through numerical comparison, for example, by calculating the difference between the calculated angle and the actual angle. If the difference is positive, it is a positive deflection; if it is negative, it is a negative deflection.
[0138] Based on the horizontal and vertical deflection directions, the corresponding horizontal and vertical hysteresis compensations are retrieved from the pre-calibrated hysteresis compensation table, respectively.
[0139] In the embodiments of this application, this step aims to obtain a predetermined compensation value based on the directional motion of the laser projector. The hysteresis compensation table is a database storing the required compensation amounts for different deflection directions. This hysteresis compensation table is typically established through precision calibration experiments before the laser projector leaves the factory or during periodic maintenance. Furthermore, the hysteresis compensation table can be a two-dimensional lookup table, whose index can be the deflection direction and / or the range of deflection angles.
[0140] The mechanical hysteresis compensation table is used to compensate for the angular error caused by mechanical factors such as gear backlash and friction during the forward and reverse rotation of the laser projector's deflection mechanism. It needs to be calibrated once, and the specific method is as follows:
[0141] Calibration preparation stage: Select multiple calibration points with known and precise 3D coordinates on the green surface. These calibration points can be reflective markers or high-contrast markers affixed to the surface. Simultaneously, ensure that the image acquisition equipment can clearly capture these marker points.
[0142] Horizontal axis hysteresis calibration process: Starting from the minimum angle position, control the horizontal deflection axis of the laser projector, gradually increase the angle, pausing every 1° or 2°, and record the actual position coordinates of the laser spot. When the maximum angle is reached, gradually decrease the angle in the opposite direction to return to the starting position, and record the actual irradiation position at each angle.
[0143] By comparing the actual position deviations at the same target angle during forward and reverse scanning, the hysteresis of that angle position is calculated. For example, when the target angle is 15°, the actual angle when arriving forward may be 14.8°, and the actual angle when arriving in reverse may be 15.3°. In this case, a compensation of 0.2° is needed for forward scanning and a compensation of -0.3° is needed for reverse scanning.
[0144] All calibrated angles and their corresponding positive and negative compensation values are recorded in a table. For angle values not directly calibrated in the table, their compensation values can be calculated using linear interpolation.
[0145] Meanwhile, the vertical axis hysteresis calibration can be performed independently using the exact same method, and a vertical axis hysteresis compensation table can be established.
[0146] In actual operation, the system determines whether it is a forward or reverse rotation based on the relationship between the current deflection angle and the target deflection angle. Then, it queries or interpolates the corresponding compensation table to obtain the compensation amount, adds the compensation amount to the calculated target angle, and then sends it to the corresponding mechanism for execution.
[0147] The horizontal hysteresis compensation and vertical hysteresis compensation are superimposed on the horizontal deflection angle and the vertical deflection angle, respectively, to obtain the compensated horizontal deflection angle and the compensated vertical deflection angle.
[0148] In embodiments of this application, this step involves applying hysteresis compensation to the calculated ideal deflection angle to counteract the mechanical hysteresis effect within the laser projector. The superposition operation can be achieved through addition or subtraction, depending on the definition of hysteresis compensation.
[0149] The compensation values for horizontal deflection angle, vertical deflection angle, and laser intensity are combined to obtain the initial projection control parameters, and the laser projector is controlled to emit laser beams based on the initial projection control parameters.
[0150] In embodiments of this application, this step involves integrating all the modified and calculated control quantities to form the final initial projection control parameters. These initial projection control parameters are then sent to the drive controller of the laser projector to precisely control the deflection mechanism and laser emission power of the laser projector. The combination method can be to encapsulate these control quantities into a data structure or instruction set.
[0151] For example, as a specific implementation, assume that the laser projector uses a two-axis scanning galvanometer system to achieve horizontal and vertical deflection. After calculating the horizontal deflection angle of the target point to be 30 degrees and the vertical deflection angle to be 15 degrees, the system first obtains the actual horizontal deflection angle of the galvanometer as 29.5 degrees and the actual vertical deflection angle as 14.8 degrees by reading the encoder feedback of the galvanometer driver.
[0152] Based on this, the system compares the calculated values with the actual values. Specifically, for the horizontal axis, a calculated value of 30 degrees is greater than the actual value of 29.5 degrees, indicating that the horizontal axis needs to be deflected in the positive direction by 0.5 degrees. For the vertical axis, a calculated value of 15 degrees is greater than the actual value of 14.8 degrees, indicating that the vertical axis needs to be deflected in the positive direction by 0.2 degrees. Then, the system queries the pre-calibrated hysteresis compensation table based on the two directional information: "positive deflection of the horizontal axis" and "positive deflection of the vertical axis." For example, the hysteresis compensation table might record that an additional compensation of 0.1 degrees is needed when the horizontal axis is deflected in the positive direction, and an additional compensation of 0.05 degrees is needed when the vertical axis is deflected in the positive direction.
[0153] Based on this, these compensation amounts are superimposed on the calculated deflection angles: compensated horizontal deflection angle = 30 degrees + 0.1 degrees = 30.1 degrees; compensated vertical deflection angle = 15 degrees + 0.05 degrees = 15.05 degrees. Simultaneously, the laser intensity compensation value is calculated to be 0.8 based on the projection distance.
[0154] Finally, the compensation horizontal deflection angle of 30.1 degrees, the compensation vertical deflection angle of 15.05 degrees, and the laser intensity compensation value of 0.8 are combined into the initial projection control parameters and sent to the galvanometer driver and the laser controller to control the laser projector to emit laser beams.
[0155] The above technical solution allows for the full consideration of the mechanical backlash effect of the laser projector when calculating initial projection control parameters based on the installation coordinates of the laser projector and the three-dimensional coordinates of the ball's landing point. Specifically, by acquiring the actual deflection angle of the laser projector in real time and combining it with a pre-calibrated backlash compensation table, the calculated horizontal and vertical deflection angles are directionally compensated and corrected, resulting in more accurate compensated horizontal and vertical deflection angles. Combining the compensated angles with the laser intensity compensation value generates more accurate initial projection control parameters, thereby improving the accuracy of the laser projector's initial projection, reducing initial landing point deviation caused by backlash, reducing the number and time of subsequent iterations, and improving the response speed and user experience of the golf landing guidance system.
[0156] In one embodiment, step S40, "obtaining the actual landing point coordinates of the laser ray on the green surface, and correcting the projection control parameters based on the deviation between the actual landing point coordinates and the three-dimensional coordinates of the ball's landing point until the deviation converges to within a preset threshold," specifically includes:
[0157] (a) Acquire an image of the green surface using an image acquisition device, extract the center pixel coordinates of the laser spot in the green surface image, and transform the center pixel coordinates to the coordinate system of the surface model according to the surface model to obtain the actual landing point coordinates of the laser ray on the green surface.
[0158] In the embodiments of this application, the image acquisition device refers to a hardware device used to capture visual information of the green surface. Its function is to provide image data of the laser spot for subsequent location identification. Possible implementations include: high-resolution industrial cameras, smartphones or tablets equipped with image sensors, or vision sensor modules integrated near the laser projector. These image acquisition devices typically need sufficient frame rate and resolution to capture clear images of the laser spot. Extracting the center pixel coordinates of the laser spot refers to identifying the region of the laser spot from the acquired green surface image and calculating the position of the geometric center of this region in the image coordinate system. Its function is to accurately locate the laser's position in the image. Possible implementations include: using image processing algorithms, such as threshold segmentation, connected component analysis, morphological operations, etc., to identify laser spots with significant brightness or color features, and then calculating their centroid or geometric center as the center pixel coordinates; or using a deep learning-based object detection model, trained to recognize the laser spot and output its center position. Transforming the center pixel coordinates to the surface model coordinate system based on the surface model yields the actual landing point coordinates of the laser ray on the green surface. This involves mapping the center position of the laser spot in the image coordinate system to the three-dimensional green surface model coordinate system using known camera intrinsic and extrinsic parameters and the green surface model. Its function is to convert two-dimensional image information into precise physical coordinates in three-dimensional space. Possible implementation methods include: using camera calibration parameters, such as focal length, principal point, and distortion coefficients, and the camera's pose information relative to the surface model coordinate system, to back-project the pixel coordinates into three-dimensional space through perspective projection inverse operation and calculate the intersection point with the surface model; or using a pre-established lookup table of image pixels and surface model coordinates for rapid conversion.
[0159] (b) Calculate the three-dimensional deviation vector between the actual landing point coordinates and the three-dimensional coordinates of the ball's landing point, and query the surface normal vector at the actual landing point in the surface model;
[0160] In the embodiments of this application, calculating the three-dimensional deviation vector between the actual landing point coordinates and the three-dimensional coordinates of the ball's landing point refers to quantifying the positional difference between the actual laser landing point and the desired target point in three-dimensional space through vector subtraction. Its function is to clarify the direction and magnitude of the error in laser projection. This can be achieved by directly subtracting the actual landing point coordinates from the three-dimensional coordinates of the ball's landing point, obtaining a three-dimensional vector containing X, Y, and Z components. Querying the surface normal vector at the actual landing point in the surface model refers to obtaining the surface normal direction at the actual laser landing point location using the established green surface model. Its function is to provide local surface geometry information for subsequent correction calculations, as the local tilt of the surface should be considered when correcting the laser projection direction. Possible implementation methods include: if the surface model is a parametric surface, such as a B-spline or NURBS, the tangent plane can be obtained by taking the partial derivative of the parametric equations, thus obtaining the normal vector; if the surface model is a discrete point cloud or mesh model, it can be obtained by performing local plane fitting on points near the actual landing point, or by interpolating the normal vectors of adjacent triangular faces.
[0161] (c) Based on the surface normal vector, the installation coordinates of the laser projector and the actual landing point coordinates, a local sensitivity matrix is constructed relative to the laser projection angle, and the three-dimensional deviation vector is mapped to the horizontal deflection angle correction and the vertical deflection angle correction through the local sensitivity matrix.
[0162] In the embodiments of this application, constructing a local sensitivity matrix of the landing point position relative to the laser projection angle refers to establishing a mathematical model describing the sensitivity of the laser landing point's position change in three-dimensional space when the horizontal and vertical deflection angles of the laser projector change slightly. Its function is to quantify the impact of projection angle changes on the landing point position, providing a basis for precise correction. Possible implementation methods include: establishing a functional relationship between the laser projection direction and the landing point position using geometric optics principles, and then calculating the partial derivative of this function to obtain a sensitivity matrix in Jacobian form; or conducting small-scale projection angle perturbation experiments near the actual landing point to measure the landing point change, thereby empirically constructing or calibrating the sensitivity matrix. Mapping the three-dimensional deviation vector to horizontal and vertical deflection angle corrections using the local sensitivity matrix refers to using the constructed sensitivity matrix to deduce the required laser projection angle correction from the landing point deviation in three-dimensional space. Its function is to transform the spatial position error into a directly controllable projection angle parameter, which is usually achieved by solving a system of linear equations or matrix inverse operations, i.e., [horizontal deflection angle correction, vertical deflection angle correction]. T Sensitivity matrix -1 *Three-dimensional deviation vector.
[0163] It should be noted that the local sensitivity matrix describes how a small change in the laser projection angle causes a spatial displacement of the landing point on the green surface. The specific construction method is as follows:
[0164] First, record the current horizontal and vertical deflection angles of the laser projector, as well as the three-dimensional coordinates of the actual landing point.
[0165] Then, the horizontal deflection angle is increased by a small increment, such as 0.01°, while keeping the vertical deflection angle unchanged. The intersection of the laser ray and the green surface model is recalculated to obtain the new landing point coordinates. The new landing point coordinates are subtracted from the original landing point coordinates and then divided by the angle increment to obtain the partial derivative of the landing point position with respect to the horizontal deflection angle. This partial derivative is a three-dimensional vector.
[0166] Similarly, by increasing the vertical deflection angle by the same small increment while keeping the horizontal deflection angle unchanged, the intersection point is recalculated, and the partial derivative of the landing position with respect to the vertical deflection angle is obtained, which is also a three-dimensional vector.
[0167] Finally, these two three-dimensional vectors are combined column-wise to form a three-row, two-column matrix, namely the local sensitivity matrix. The first column of this local sensitivity matrix represents the effect of changes in the horizontal angle on the landing point, and the second column represents the effect of changes in the vertical angle on the landing point.
[0168] In practical applications, the measured three-dimensional deviation vector can be multiplied by the pseudo-inverse of the local sensitivity matrix or solved using the least squares method to obtain the horizontal and vertical deflection angles that need to be corrected. Furthermore, since the normal vector and curvature of the green surface differ at different locations, the sensitivity matrix needs to be recalculated based on the current actual landing position in each iteration to ensure the accuracy of the correction.
[0169] (d) Determine the adaptive correction gain based on the magnitude of the three-dimensional deviation vector, and multiply the adaptive correction gain by the horizontal deflection angle correction and the vertical deflection angle correction respectively to obtain the weighted correction amount;
[0170] In the embodiments of this application, determining the adaptive correction gain based on the magnitude of the three-dimensional deviation vector refers to dynamically adjusting the weighting factor of the correction amount according to the distance between the current laser impact point and the target point. Its function is to achieve adaptability in the correction process, avoiding overshoot or slow convergence. Possible implementation methods include: designing a gain function that takes the magnitude of the three-dimensional deviation vector as input and outputs a gain value between 0 and 1. For example, when the magnitude is large, the gain value is large to accelerate convergence; when the magnitude is small, the gain value is small to avoid oscillation. This gain function can be linear, nonlinear, or piecewise. Multiplying the adaptive correction gain by the horizontal deflection angle correction and the vertical deflection angle correction respectively to obtain the weighted correction amount means multiplying the calculated angle correction amount by the adaptive correction gain. Its function is to dynamically adjust the correction step size according to the current error magnitude to optimize convergence speed and stability.
[0171] It should be noted that the adaptive correction gain is used to dynamically adjust the correction step size according to the current deviation, so as to avoid overcorrection and oscillation when the deviation is large, while ensuring fast convergence when the deviation is small.
[0172] When the magnitude of the three-dimensional deviation vector is large, such as exceeding 20 millimeters, it indicates that the current landing point is far from the target point. In this case, a larger correction gain should be used, such as 0.8-1.0, to make the system quickly approach the target point.
[0173] When the deviation modulus is in a moderate range, such as between 5 mm and 20 mm, the correction gain should be moderate, such as 0.5-0.8, to ensure correction speed while avoiding overshoot.
[0174] When the deviation modulus is small, such as less than 5 mm, it means that it is close to the target point. At this time, a small correction gain, such as 0.2-0.5, should be used for fine adjustment to avoid repeated oscillations near the target point.
[0175] In practical implementation, a piecewise function approach can be used: pre-define 3-5 threshold intervals for the deviation modulus, with each interval corresponding to a fixed gain value. Alternatively, a continuous function approach can be used: the gain value decreases exponentially or inversely proportionally with the deviation modulus.
[0176] For example, when using a piecewise function, the gain can be set as follows: 0.9 when the deviation modulus is greater than 20 mm, 0.6 when the deviation modulus is between 10 and 20 mm, 0.4 when the deviation modulus is between 5 and 10 mm, and 0.25 when the deviation modulus is less than 5 mm.
[0177] When using a continuous function approach, the gain can be set to be equal to a maximum gain value multiplied by an exponential function. This exponential function uses the ratio of the negative deviation modulus to a certain characteristic length as the exponent, plus a minimum gain value as the base value, to ensure that the gain does not drop to zero.
[0178] In practical applications, piecewise functions are simpler to implement and have lower computational overhead, while continuous functions offer a smoother correction process. The choice can be made based on the specific hardware performance.
[0179] (e) The weighted correction is added to the current projection control parameters, and the laser projector is controlled to emit laser beams according to the updated projection control parameters;
[0180] In the embodiments of this application, adding the weighted correction amount to the current projection control parameters means adding the horizontal deflection angle correction amount and the vertical deflection angle correction amount, after adaptive gain adjustment, to the current horizontal deflection angle and vertical deflection angle control parameters of the laser projector, respectively. Its function is to update the control command of the laser projector, causing it to move towards the target point. Controlling the laser projector to emit laser rays according to the updated projection control parameters means sending the updated projection control parameters to the laser projector, causing it to adjust the projection direction and intensity, and emit new laser rays. Its function is to execute the corrected projection action.
[0181] (f) Determine whether the magnitude of the three-dimensional deviation vector has converged to within the preset magnitude range threshold. If it has not converged, repeat steps (a) to (e) until the magnitude of the three-dimensional deviation vector converges to within the preset magnitude range threshold, or the number of iterations reaches the preset maximum number of iterations limit.
[0182] In the embodiments of this application, determining whether the magnitude of the three-dimensional deviation vector converges to a preset magnitude range threshold means checking whether the distance between the current laser landing point and the target point is small enough to achieve the expected accuracy requirement. This serves as a termination condition for the correction process. Additionally, determining whether the number of iterations has reached a preset maximum iteration limit can also be used as a termination condition. The preset magnitude range threshold can be set according to actual application requirements, for example, a few millimeters or less. Repeating steps (a) to (e) until the magnitude of the three-dimensional deviation vector converges to the preset magnitude range threshold, or the number of iterations reaches the preset maximum iteration limit, means that when the laser landing point has not yet reached the accuracy requirement, the entire closed-loop control process from image acquisition to parameter correction continues. This achieves iterative adaptive correction of the laser point position, ensuring the final landing point accuracy.
[0183] By way of example, as a specific implementation, the image acquisition device may specifically be a high-speed CMOS camera with a resolution of 1920x1080 pixels, mounted near the laser projector. The center pixel coordinates of the laser spot can be extracted in the following manner:
[0184] First, Gaussian filtering is applied to the acquired green surface image to reduce noise. Second, Otsu thresholding is used to binarize the image to separate the laser spot region from the background. Then, connected component analysis algorithm is used to identify the largest connected region as the laser spot. Finally, the centroid of the connected region is calculated as the center pixel coordinate of the laser spot.
[0185] The transformation of the center pixel coordinates to the surface model coordinate system can be performed using pre-calibrated camera intrinsic and extrinsic parameter matrices, i.e., the rotation and translation matrices of the camera relative to the surface model coordinate system. Specifically, the center pixel coordinates are transformed into normalized image coordinates through the inverse transformation of the camera intrinsic parameter matrix, and then the ray direction vector in the camera coordinate system is obtained through the inverse transformation of the extrinsic parameter matrix. Finally, the intersection points with the implicit or parametric equations of the surface model are found to obtain the three-dimensional coordinates of the actual landing point in the surface model coordinate system. The local sensitivity matrix of the landing point position relative to the laser projection angle can be derived by differential derivation of the geometric model of the laser projector. For example, assuming the laser projector installation coordinates are (L... x ,L y ,L z The target point is (T) x ,T y ,T z The laser projection direction is determined by the horizontal deflection angle θ and the vertical deflection angle φ, and the landing point P(θ,φ) is a function of θ and φ. The elements of the sensitivity matrix J can be represented as... P / θ and P / φ. Additionally, the adaptive correction gain can be designed as a piecewise function. When the magnitude of the 3D deviation vector is greater than 5mm, the gain is set to 0.8; when the magnitude is between 1mm and 5mm, the gain is set to 0.5; and when the magnitude is less than 1mm, the gain is set to 0.2. The preset magnitude range threshold can be set to 0.5mm.
[0186] Through the above technical solution, this application can achieve precise perception of the actual landing point coordinates of the laser beam on the curved surface of the green, and based on this, perform efficient and stable projection control parameter correction. Specifically, by combining image acquisition equipment with a curved surface model, accurate conversion from two-dimensional image information to three-dimensional spatial coordinates can be achieved, overcoming the shortcomings of curved terrain in landing point recognition. In addition, the construction of the local sensitivity matrix makes the correction calculation more accurate, effectively dealing with nonlinear mapping relationships on complex curved surfaces. Furthermore, the introduction of adaptive correction gain allows the correction process to dynamically adjust the step size according to the error magnitude, avoiding overshoot or slow convergence problems during the correction process, thus improving the efficiency and stability of the correction. Finally, through iterative closed-loop control, it is ensured that the laser point can converge quickly and accurately to the three-dimensional coordinates of the ball landing point, thereby improving the accuracy of the golf landing guidance system and the user experience.
[0187] Furthermore, after the step of extracting the center pixel coordinates of the light spot, the following steps are also included:
[0188] Calculate the angle between the surface normal vector at the three-dimensional coordinates of the ball's landing point and the laser incident direction;
[0189] The beam shape distortion coefficient is calculated based on the included angle and the local curvature of the surface.
[0190] Based on the spot shape distortion coefficient, centroid offset compensation is performed on the extracted spot center pixel coordinates to obtain the actual landing point coordinates of the compensated spot.
[0191] In the step of calculating the deviation vector, the actual landing point coordinates of the compensated spot are compared with the three-dimensional coordinates of the ball's landing point.
[0192] The calculation of the spot shape distortion coefficient specifically includes:
[0193] Calculate the angle between the laser incident direction and the surface normal vector. ;
[0194] Extracting the local principal curvature of the surface at the three-dimensional coordinates of the ball's landing point and ;
[0195] Calculate the spot shape distortion coefficient using the formula: ,in, The light spot shape distortion coefficient is denoted as . For projection distance, This is a distortion model function based on geometric optics.
[0196] Furthermore, the light spot shape distortion coefficient includes the major axis distortion coefficient and the minor axis distortion coefficient, and the centroid offset compensation is specifically as follows:
[0197] The offset of the spot centroid along the major axis is calculated based on the major axis distortion coefficient and the minor axis distortion coefficient. and offset along the minor axis ;
[0198] The extracted center pixel coordinates of the light spot Compensation will be provided.
[0199] , The actual landing point coordinates of the compensated light spot are obtained. .
[0200] In the process of acquiring the laser spot image and extracting the center pixel coordinates, the laser spot undergoes shape distortion due to the angle between the surface normal vector and the laser incident direction, as well as the local curvature of the surface, when the laser is projected onto the green surface. Specifically, when the laser is incident on the surface at an inclined angle, the originally approximately circular spot is stretched into an ellipse; when the curvature of the surface is high at the incident point, the spot will undergo asymmetrical deformation along the direction of the fastest curvature change, exhibiting distorted shapes such as a narrow ellipse or an irregular oval. This shape distortion causes the geometric center of the spot to deviate from its optical centroid, making the directly extracted center pixel coordinates unable to accurately represent the actual target point position of the laser projection.
[0201] To address the aforementioned problems, in one embodiment, after extracting the center pixel coordinates of the light spot, this application further calculates the light spot shape distortion coefficient and performs centroid offset compensation, specifically including the following steps:
[0202] Based on the obtained 3D coordinates of the ball's landing point, the surface normal vector at that point is extracted from the surface model. The surface normal vector can be calculated using a local fitting method for the surface model. For example, a quadratic surface fitting can be performed on several surface points in the neighborhood of the ball's landing point's 3D coordinates, and the partial derivative of the fitted surface at that point can be calculated to obtain the normal vector. Based on the laser projector's installation position and the ball's landing point's 3D coordinates, the laser incident direction vector is calculated. After normalizing the laser incident direction vector, the angle between it and the surface normal vector is calculated. .
[0203] Due to the local geometric properties of the surface determined by the principal curvature and The descriptions correspond to the two orthogonal principal directions of the surface at that point, representing the fastest and slowest changes in curvature, respectively. The calculation of the principal curvatures is based on the first and second fundamental forms of the surface:
[0204] Local parameterization is performed on the surface points within the three-dimensional coordinate neighborhood of the ball's landing point, i.e. Calculate the second-order partial derivatives and construct the second fundamental form matrix of the surface, such as the Hessian matrix: Then, calculate the eigenvalues of the Hessian matrix. and The principal curvature is thus obtained as: , ;
[0205] The sign of the principal curvature indicates the concavity or convexity of the surface: a positive value indicates a convex surface, a negative value indicates a concave surface, and the absolute value indicates the magnitude of the curvature.
[0206] In addition, the distortion of the light spot shape is determined by two factors:
[0207] (1) Projection distortion caused by oblique incidence: When the laser is at an angle When incident at an oblique angle, the projection of the light spot onto the curved surface changes from a circle to an ellipse, and the ratio of the major axis to the minor axis is approximately... .
[0208] (2) Local deformation caused by surface curvature: When the surface has non-zero curvature, the light spot is stretched or compressed to different degrees in different directions. Principal curvature In the corresponding direction, the curvature of the surface is greatest, and the deformation of the light spot is most significant in this direction; principal curvature In the corresponding direction, the curvature of the surface is minimal, and the deformation of the light spot is relatively small.
[0209] A spot shape distortion coefficient D is defined to characterize the degree of deformation of the spot relative to an ideal circle. In one embodiment, the spot shape distortion coefficient includes a major axis distortion coefficient. and minor axis distortion coefficient Describe the deformation of the light spot in the directions of fastest and slowest curvature change, respectively:
[0210] , ;
[0211] in, The projection distance is the Euclidean distance from the laser projector to the three-dimensional coordinates of the ball's landing point. The curvature influence coefficient characterizes the sensitivity of curvature to light spot deformation and can be obtained through pre-calibration. The specific calibration method is as follows: select several calibration points with different curvatures on the green surface, project a laser beam at each calibration point and acquire a light spot image, measure the actual major and minor axis dimensions of the light spot, fit them with theoretical calculations, and determine the curvature influence coefficient. The optimal value.
[0212] Because beam shape distortion causes the optical centroid of the beam to shift relative to its geometric center, for elliptical beams, when the ratio of the major axis to the minor axis is large, the centroid will shift towards the direction where the light intensity distribution is more concentrated. Under the assumption of a Gaussian intensity distribution for laser light, the centroid shift and the distortion coefficient have the following relationship:
[0213] Let the angle between the major axis of the light spot and the x-axis of the image coordinate system be θ. This angle is determined by the projection relationship between the principal curvature directions of the surface and the camera imaging plane. In the camera imaging coordinate system, the offset Δx of the centroid along the major axis and the offset Δy along the minor axis are:
[0214] , ;
[0215] in, The nominal radius of the light spot (the radius of an ideal circular light spot on the camera's imaging plane, in pixels). The centroid offset coefficient characterizes the influence of the distortion degree on the centroid offset. This centroid offset coefficient can also be determined through calibration experiments.
[0216] Assuming the coordinates of the center pixel of the directly extracted spot are This coordinate is usually obtained using a geometric center extraction algorithm based on the light spot contour or a centroid algorithm based on gray-scale weighting. However, due to the distortion of the light spot shape, this coordinate cannot accurately represent the real target point of the laser projection.
[0217] Therefore, the original center pixel coordinates need to be compensated based on the calculated centroid offset.
[0218] , The actual landing point coordinates of the compensated light spot. This coordinate is used in subsequent steps to compare with the three-dimensional coordinates of the ball's landing point and calculate the deviation vector.
[0219] In summary, by introducing a spot shape distortion coefficient and a centroid offset compensation mechanism, this application can effectively eliminate the influence of surface normal vector tilt and local curvature changes on the spot center extraction accuracy. In experimental verification, for high curvature regions with a curvature radius of less than 1 meter, when the laser incident angle... When the angle is greater than 30°, the spot center extraction error of the uncompensated scheme can reach 8-12 pixels, corresponding to an actual deviation of about 15-25mm on the green surface. However, after introducing distortion compensation, the spot center extraction error is reduced to 2-3 pixels, corresponding to an actual deviation of about 4-6mm on the green surface, which significantly improves the reference accuracy of closed-loop correction.
[0220] It should be noted that the spot shape distortion compensation is a correction of the spot center coordinates extracted in step S40, and it addresses a different physical problem than the laser intensity compensation in step S30: laser intensity compensation solves the recognition problem caused by uneven spot brightness, while spot distortion compensation solves the positioning deviation problem caused by spot shape deformation. Combining the two can achieve high-precision laser landing point guidance under complex curved terrain conditions.
[0221] Furthermore, Figure 2 This is a schematic diagram of laser spot shape distortion provided in an embodiment of this application, used to illustrate the shape distortion phenomenon of the laser spot on the green surface and the principle of centroid offset compensation. Figure 2 As shown:
[0222] Figure 2 (a) shows a circular spot of laser light when the laser is incident perpendicularly onto a flat curved surface under ideal conditions, where the surface normal vector coincides with the laser incident direction, and the included angle is... =0°, the light spot is a standard circle, and the geometric center coincides with the optical centroid;
[0223] Figure 2 (b) illustrates the elliptical distortion caused by the oblique incidence of the laser, when the laser is at an angle... When incident at an angle, the light spot is stretched into an ellipse with a major-minor axis ratio of approximately At this point, the geometric center of the light spot shifts from the optical centroid. ;
[0224] Figure 2 (c) demonstrates the asymmetric deformation caused by a high-curvature surface, at the principal curvature of the surface. and Under the combined effect, the light spot is significantly stretched along the direction of the fastest curvature change, forming a narrow oval or asymmetrical ellipse, and the centroid shift is more obvious;
[0225] Figure 2 (d) illustrates the principle of centroid offset compensation. In the camera imaging coordinate system, the calculated offset is used to adjust the original extracted geometric center coordinates. Compensation is performed to obtain the compensated optical centroid coordinates. This allows for precise positioning of the target point where the laser is actually projected.
[0226] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0227] In one embodiment, a green surface terrain sensing and laser point adaptive correction system is provided, which corresponds one-to-one with the green surface terrain sensing and laser point adaptive correction method described in the above embodiment. The green surface terrain sensing and laser point adaptive correction system includes:
[0228] The model fitting module is used to scan the green surface, obtain three-dimensional point cloud data, and perform surface fitting on the three-dimensional point cloud data to obtain the surface model of the green surface.
[0229] The coordinate determination module is used to obtain the two-dimensional coordinates of the ball's landing point output by the simulator, and to query the height value corresponding to the two-dimensional coordinates of the ball's landing point based on the surface model to form the three-dimensional coordinates of the ball's landing point.
[0230] The laser control module is used to calculate the initial projection control parameters based on the installation coordinates of the laser projector and the three-dimensional coordinates of the ball's landing point, and to control the laser projector to emit laser beams according to the initial projection control parameters.
[0231] The parameter correction module is used to obtain the actual landing point coordinates of the laser beam on the green surface, and correct the projection control parameters based on the deviation between the actual landing point coordinates and the three-dimensional coordinates of the ball landing point until the deviation converges to within the preset threshold.
[0232] Specific limitations regarding the green surface terrain sensing and laser point adaptive correction system can be found in the limitations of the green surface terrain sensing and laser point adaptive correction method described above, and will not be repeated here. Each module in the aforementioned green surface terrain sensing and laser point adaptive correction system 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, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0233] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements a method for green surface terrain perception and adaptive correction of laser points.
[0234] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0235] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for sensing the curved surface of a green and adaptively correcting laser points, characterized in that, A golf landing guidance system applied to simulators and laser projectors includes the following steps: The green surface is scanned to obtain three-dimensional point cloud data, and the three-dimensional point cloud data is fitted to the surface to obtain the surface model of the green surface. Obtain the two-dimensional coordinates of the ball's landing point output by the simulator, and query the height value corresponding to the two-dimensional coordinates of the ball's landing point based on the surface model to form the three-dimensional coordinates of the ball's landing point; The initial projection control parameters are calculated based on the installation coordinates of the laser projector and the three-dimensional coordinates of the ball's landing point, and the laser projector is controlled to emit laser beams according to the initial projection control parameters. Obtain the actual landing point coordinates of the laser beam on the green surface, and correct the projection control parameters based on the deviation between the actual landing point coordinates and the three-dimensional coordinates of the ball landing point until the deviation converges to within the preset threshold.
2. The method for green surface topography perception and adaptive laser point correction according to claim 1, characterized in that, The steps of scanning the green surface to obtain three-dimensional point cloud data and then performing surface fitting on the three-dimensional point cloud data to obtain a surface model of the green surface specifically include: A global scan of the green surface is performed to obtain initial 3D point cloud data, and surface fitting is performed on the initial 3D point cloud data to obtain an initial surface model; Calculate the local curvature of each region in the initial surface model, identify regions with local curvature exceeding a preset curvature threshold as high curvature regions, and perform supplementary scanning on high curvature regions to obtain supplementary point cloud data; The supplementary point cloud data is fused with the initial 3D point cloud data, and local surface refitting is performed on the high curvature region to obtain the surface model of the green surface.
3. The method for green surface topography perception and adaptive laser point correction according to claim 1, characterized in that, The steps of obtaining the two-dimensional coordinates of the ball's landing point output by the simulator, querying the height value corresponding to the two-dimensional coordinates of the ball's landing point based on the surface model, and forming the three-dimensional coordinates of the ball's landing point specifically include: Multiple calibration points are set on the green surface. The first coordinate of each calibration point in the simulator coordinate system and the second coordinate in the surface model coordinate system are obtained respectively. The two-dimensional coordinate transformation matrix from the simulator coordinate system to the projection plane of the surface model is calculated based on the first coordinate and the second coordinate. Obtain the two-dimensional coordinates of the ball's landing point output by the simulator, and transform the two-dimensional coordinates of the ball's landing point to the coordinate system of the curved surface model according to the coordinate transformation matrix to obtain the planar coordinates of the target point; In the curved surface model, the planar coordinates of the target point are interpolated to obtain the corresponding height value. The planar coordinates of the target point are then combined with the height value to obtain the three-dimensional coordinates of the ball's landing point.
4. The method for green surface topography perception and adaptive laser point correction according to claim 3, characterized in that, The steps of setting multiple calibration points on the green surface, obtaining the first coordinates of each calibration point in the simulator coordinate system and the second coordinates in the surface model coordinate system, and calculating the two-dimensional coordinate transformation matrix from the simulator coordinate system to the projection plane of the surface model based on the first and second coordinates, specifically include: Obtain the local curvature of each region in the surface model, and determine the density of calibration points in each region based on the local curvature; Based on the density of calibration points in each region, multiple calibration points are arranged on the green surface, and the first coordinates of each calibration point in the simulator coordinate system and the second coordinates in the surface model coordinate system are obtained respectively. Based on the first and second coordinates of each calibration point, calculate the two-dimensional coordinate transformation matrix from the simulator coordinate system to the projection plane of the surface model.
5. The method for green surface topography perception and adaptive laser point correction according to claim 4, characterized in that, The step of calculating the two-dimensional coordinate transformation matrix from the simulator coordinate system to the projection plane of the curved surface model based on the first and second coordinates of each calibration point specifically includes: Based on the local curvature of each calibration point at its corresponding position in the surface model, initial fitting weights are determined for each calibration point. A system of coordinate equations is constructed using the first and second coordinates of each calibration point, and then solved based on the initial fitting weights to obtain the initial coordinate transformation matrix. Based on the initial coordinate transformation matrix, perform a forward mapping on the first coordinates of each calibration point, and calculate the residual between the forward mapping result of each calibration point and the corresponding second coordinate; The calibration points whose residuals exceed the preset residual threshold are identified as abnormal calibration points, and the initial fitting weights of the abnormal calibration points are reduced. Based on the fitting weights of each calibration point after weight reduction, the coordinate transformation matrix is obtained by weighted least squares solution of the corresponding equation system.
6. The method for green surface topography perception and adaptive laser point correction according to claim 1, characterized in that, The step of calculating the initial projection control parameters based on the installation coordinates of the laser projector and the three-dimensional coordinates of the ball's landing point, and controlling the laser projector to emit laser beams according to the initial projection control parameters, specifically includes: Obtain the pre-calibrated body coordinate system of the laser projector, and obtain the attitude matrix of the body coordinate system relative to the surface model coordinate system; Based on the installation coordinates of the laser projector and the three-dimensional coordinates of the ball's landing point, the first projection direction vector from the laser projector to the target point in the coordinate system of the curved surface model is calculated, and the first projection direction vector is transformed to the coordinate system of the laser projector body according to the attitude matrix to obtain the second projection direction vector. Based on the components of the second projection direction vector, calculate the horizontal and vertical deflection angles of the laser projector; The projection distance is calculated based on the installation coordinates of the laser projector and the three-dimensional coordinates of the ball's landing point, and the laser intensity compensation value is calculated based on the projection distance. The horizontal deflection angle, vertical deflection angle, and laser intensity compensation value are combined to obtain the initial projection control parameters, and the laser projector is controlled to emit laser beams based on the initial projection control parameters.
7. The method for green surface topography perception and laser point adaptive correction according to claim 6, characterized in that, The step of combining the horizontal deflection angle, vertical deflection angle, and laser intensity compensation value to obtain initial projection control parameters, and controlling the laser projector to emit laser beams based on the initial projection control parameters, specifically includes: Obtain the current actual horizontal deflection angle and actual vertical deflection angle of the laser projector; The horizontal deflection direction of the horizontal axis is determined based on the difference between the actual horizontal deflection angle and the calculated horizontal deflection angle, and the vertical deflection direction of the vertical axis is determined based on the difference between the actual vertical deflection angle and the calculated vertical deflection angle. Based on the horizontal and vertical deflection directions, the corresponding horizontal and vertical hysteresis compensations are retrieved from the pre-calibrated hysteresis compensation table, respectively. The horizontal hysteresis compensation and vertical hysteresis compensation are superimposed on the horizontal deflection angle and the vertical deflection angle, respectively, to obtain the compensated horizontal deflection angle and the compensated vertical deflection angle. The compensation values for horizontal deflection angle, vertical deflection angle, and laser intensity are combined to obtain the initial projection control parameters, and the laser projector is controlled to emit laser beams based on the initial projection control parameters.
8. The method for green surface topography perception and adaptive laser point correction according to claim 1, characterized in that, The step of obtaining the actual landing point coordinates of the laser ray on the green surface, and correcting the projection control parameters based on the deviation between the actual landing point coordinates and the three-dimensional coordinates of the ball landing point until the deviation converges to within a preset threshold, specifically includes: (a) Acquire an image of the green surface using an image acquisition device, extract the center pixel coordinates of the laser spot in the green surface image, and transform the center pixel coordinates to the coordinate system of the surface model according to the surface model to obtain the actual landing point coordinates of the laser ray on the green surface. (b) Calculate the three-dimensional deviation vector between the actual landing point coordinates and the three-dimensional coordinates of the ball's landing point, and query the surface normal vector at the actual landing point in the surface model; (c) Based on the surface normal vector, the installation coordinates of the laser projector and the actual landing point coordinates, a local sensitivity matrix is constructed relative to the laser projection angle, and the three-dimensional deviation vector is mapped to the horizontal deflection angle correction and the vertical deflection angle correction through the local sensitivity matrix. (d) Determine the adaptive correction gain based on the magnitude of the three-dimensional deviation vector, and multiply the adaptive correction gain by the horizontal deflection angle correction and the vertical deflection angle correction respectively to obtain the weighted correction amount; (e) The weighted correction is added to the current projection control parameters, and the laser projector is controlled to emit laser beams according to the updated projection control parameters; (f) Determine whether the magnitude of the three-dimensional deviation vector has converged to within the preset magnitude range threshold. If it has not converged, repeat steps (a) to (e) until the magnitude of the three-dimensional deviation vector converges to within the preset magnitude range threshold, or the number of iterations reaches the preset maximum number of iterations limit.
9. A green surface terrain sensing and laser point adaptive correction system, characterized in that, include: The model fitting module is used to scan the green surface, obtain three-dimensional point cloud data, and perform surface fitting on the three-dimensional point cloud data to obtain the surface model of the green surface. The coordinate determination module is used to obtain the two-dimensional coordinates of the ball's landing point output by the simulator, and to query the height value corresponding to the two-dimensional coordinates of the ball's landing point based on the surface model to form the three-dimensional coordinates of the ball's landing point. The laser control module is used to calculate the initial projection control parameters based on the installation coordinates of the laser projector and the three-dimensional coordinates of the ball's landing point, and to control the laser projector to emit laser beams according to the initial projection control parameters. The parameter correction module is used to obtain the actual landing point coordinates of the laser beam on the green surface, and correct the projection control parameters based on the deviation between the actual landing point coordinates and the three-dimensional coordinates of the ball landing point until the deviation converges to within the preset threshold.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of a green surface terrain perception and laser point adaptive correction method as described in any one of claims 1 to 8.
