Method and system for adapting virtual putting green and real putting green in different shapes
By calculating the relative characteristics of virtual and real greens in a golf simulator with the hole as the reference, and selecting the candidate point with the minimum cost value as the fitting position for the real green, the problem of inconsistent shapes between virtual and real greens is solved, achieving efficient ball placement matching and consistent putting experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-27
- Publication Date
- 2026-03-24
AI Technical Summary
In existing hybrid golf simulators, when the virtual green and the real green are not the same shape, it is difficult to simultaneously ensure the rationality of the ball placement, the consistency of the putting experience, and the cost of system expansion and deployment, resulting in poor adaptation accuracy and deployment versatility.
Using the hole as a common reference, the horizontal distance, azimuth angle, and slope angle of the stopping point are calculated in both virtual and real local coordinate systems to generate a set of candidate points. The candidate point with the smallest value of a preset weighted combination is selected as the suitable position for the real green, and the real position information is output for indication.
Even when the virtual green and the real green are not the same shape, it can quickly obtain a realistic ball placement position that is close to the virtual ball stopping experience, which improves the accuracy and versatility of the hybrid putting phase and avoids the reliance on replicating the virtual green or manual calibration on the real green.
Smart Images

Figure CN121714907A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of golf simulators, and in particular to a method and system for adapting a virtual green with a different shape to a real green, a computer device, and a storage medium. BACKGROUND
[0002] Golf simulators generally obtain hitting parameters through radar, camera, and other detection devices, generate corresponding virtual ball flight trajectories and landing points in a display terminal, and thus realize hitting training and competition under indoor conditions. In order to improve the real feel of short shots, especially putts, the industry has also developed a hybrid solution that combines virtual long shots with real green putts. When the virtual ball enters the green area, the system needs to determine the tee position in the real putting area and prompt the player to continue putting on the real green through laser, light, or positioning guidance.
[0003] In existing hybrid solutions, it is common practice to design the real green as a replicated structure that is approximately consistent with the shape of the virtual green, or to use an adjustable real green mechanism to reconstruct the virtual green terrain. In scenarios where the shape of the real green is fixed and needs to cover a large number of virtual courses, there are also implementation methods that use manual calibration, preset point mapping, or simple geometric relationships to calculate the tee position. The above methods often have difficulty in simultaneously considering the rationality of the tee position matching, the consistency of the putting experience, and the system expansion deployment cost when the shape and slope distribution of the virtual green and the real green are inconsistent or need to be quickly switched between multiple virtual courses. Moreover, these methods can also cause problems such as large mapping maintenance, low adaptation efficiency, or obvious experience deviation. SUMMARY
[0004] The purpose of the embodiments of the present application is to provide a method and system for adapting a virtual green with a different shape to a real green, a computer device, and a storage medium, in order to solve the technical problem of poor adaptation accuracy and deployment versatility in the hybrid putting phase.
[0005] To solve the above technical problems, the embodiments of the present application provide a method for adapting a virtual green with a different shape to a real green, which adopts the following technical solutions: Obtain the coordinates of a stop point corresponding to a stop in a virtual green, the coordinates of a virtual cup, a digital surface model of a real green, and the coordinates of a real cup; Establish corresponding local coordinate systems with the virtual cup and the real cup as the origins, respectively, and calculate the horizontal distance of the stop point relative to the virtual cup, the attack hole azimuth, and the slope angle in the direction of the stop point from the cup in the virtual local coordinate system; generate a candidate point set in a real local coordinate system based on the digital surface model, and calculate a horizontal distance, a hole direction angle, and a slope angle of each candidate point relative to the real hole cup; select a candidate point with a minimum fitness value from the candidate point set as an adaptive position of the real green based on a preset weighted combination of a horizontal distance difference, a hole direction angle difference, and a slope angle difference of the candidate point as the fitness value; output real position information of the adaptive position, and use the real position information to indicate the adaptive position on the real green.
[0006] To solve the above technical problems, the embodiment of the present application also provides an adaptive system of a virtual green and a real green with different shapes, which adopts the technical scheme as follows: The acquisition module is configured to acquire a digital surface model of a real green and a real hole cup coordinate, and a virtual green corresponding to a stop point coordinate of a first stop and a virtual hole cup coordinate; The first calculation module is configured to establish a corresponding local coordinate system with the virtual hole cup and the real hole cup as origins respectively, and calculate a horizontal distance, a hole direction angle, and a slope angle of the stop point relative to the virtual hole cup in the virtual local coordinate system; The second calculation module is configured to generate a candidate point set in a real local coordinate system based on the digital surface model, and calculate a horizontal distance, a hole direction angle, and a slope angle of each candidate point relative to the real hole cup; The selection module is configured to select a candidate point with a minimum fitness value from the candidate point set as an adaptive position of the real green based on a preset weighted combination of a horizontal distance difference, a hole direction angle difference, and a slope angle difference of the candidate point as the fitness value; The output module is configured to output real position information of the adaptive position, and use the real position information to indicate the adaptive position on the real green.
[0007] To solve the above technical problems, the embodiment of the present application also provides a computer device, which adopts the technical scheme as follows: A computer device includes a memory and a processor, the memory stores computer readable instructions, and the processor executes the computer readable instructions to realize the steps of the adaptive method of a virtual green and a real green with different shapes as described above.
[0008] To solve the above technical problems, the embodiment of the present application also provides a computer readable storage medium, which adopts the technical scheme as follows: A computer readable storage medium, having stored thereon computer readable instructions, which when executed by a processor implement the steps of the method for adapting a virtual green with different shape to a real green as described above.
[0009] Compared with the prior art, the embodiments of the present application have the following beneficial effects: The method for adapting a virtual green with different shape to a real green disclosed in the present application, by taking the hole cup as a common reference, converts the virtual stopping point and the real candidate point into unified relative features of horizontal distance, attack hole azimuth and slope angle along the attack hole direction respectively, and automatically determines the adaptation position on the real green by minimizing the preset weighted value, so that the real teeing position close to the virtual stopping experience as a whole can be quickly obtained under the condition that the virtual green and the real green have different shapes, avoiding relying on the real green to copy the virtual green or manual hole-by-hole calibration, thereby improving the adaptation accuracy and deployment universality of the mixed putting stage. BRIEF DESCRIPTION OF DRAWINGS
[0010] In order to more clearly illustrate the schemes in the present application, the drawings needed in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0011] Figure 1 is a flow chart of an embodiment of the method for adapting a virtual green with different shape to a real green according to the present application; Figure 2 is a structural schematic diagram of an embodiment of the adaptation system for a virtual green with different shape to a real green according to the present application; Figure 3 is a structural schematic diagram of an embodiment of the computer device according to the present application. DETAILED DESCRIPTION
[0012] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0013] Reference Figure 1 , shows a flow chart of an embodiment of the method for adapting a virtual green with different shape to a real green according to the present application. The method for adapting a virtual green with different shape to a real green includes the following steps: In step S101, the coordinates of the stop point corresponding to the first stop in the virtual green, the coordinates of the virtual cup, the digital surface model of the real green, and the coordinates of the real cup are obtained.
[0014] In the embodiment, the adaptation of the virtual green with different shapes to the real green means that the virtual green and the real green are not consistent in the plane boundary, the slope fluctuation, and the slope distribution. The system does not require the real green to copy the geometric shape of the virtual green, but automatically determines an adaptation position on the real green through a set of computable mapping rules, so that the distance, direction, and slope characteristics along the direction of the attack hole of the adaptation position relative to the real cup are as close as possible to the corresponding characteristics of the stop point relative to the virtual cup in the virtual green, thereby realizing the comparability of the putting experience and reducing the cost of manual calibration.
[0015] In the embodiment, the coordinates of the stop point corresponding to the first stop in the virtual green, the coordinates of the virtual cup, the digital surface model of the real green, and the coordinates of the real cup are obtained. The stop point coordinates can be output by the shot detection and simulation module of the golf simulator, representing the two-dimensional or three-dimensional position of the virtual ball after stopping rolling in the virtual green area. The virtual cup coordinates are the position identifier of the virtual cup in the virtual scene, which is used for subsequent establishment of relative characteristics based on the cup. The digital surface model of the real green can be understood as a discrete expression of the real green surface, which can be a regular grid elevation map or an elevation grid after interpolation of point cloud. Each grid cell or sampling point contains at least a plane coordinate and an elevation value, which is used to calculate the terrain elevation and local slope at any point on the real green. The real cup coordinates are the measured position of the cup on the real green, which can be obtained by construction measurement, positioning base station measurement, or annotation in the digital surface model. In order to facilitate subsequent calculation, the coordinate systems of the virtual end and the real end can be different, but they need to ensure that their internal coordinates are consistent and can complete the calculation of distance, angle, and slope in their respective coordinate systems.
[0016] In step S102, a local coordinate system is established with the virtual cup and the real cup as the origin, respectively, and the horizontal distance, the attack hole azimuth, and the slope angle of the stop point relative to the virtual cup are calculated in the virtual local coordinate system.
[0017] In the embodiment, the local coordinate system can be understood as a local plane coordinate frame with the hole cup as the origin, for converting the relationship of the ball relative to the hole cup from absolute coordinates to comparable relative features; the implementation can be: a two-dimensional plane coordinate is established with the virtual hole cup as the origin at the virtual end, a preset reference direction is selected as the zero angle direction (for example, the virtual scene north direction, the local coordinate X axis direction of the green, or the opposite direction of the green pointing to the tee direction), and the measurement reference of the attack hole azimuth is defined with the reference direction. The so-called horizontal distance refers to the plane distance from the hole cup to the stopping point in the local plane, ignoring the influence of elevation fluctuation on distance, facilitating scale alignment between different shapes of greens. The so-called attack hole azimuth refers to the angle of rotation from the preset reference direction to the direction of the line connecting the hole cup to the stopping point, used to represent the azimuthal position of the stopping point relative to the hole cup; in the implementation, the angle can be limited within a preset range (for example, 0 to 360 degrees or negative 180 to positive 180 degrees), so that the minimum angle principle is adopted to handle the angle wraparound when calculating the angle difference subsequently. The so-called slope angle refers to the degree of inclination of the slope in the direction from the hole cup to the stopping point, which can be represented by the elevation change corresponding to the unit horizontal distance in that direction, for example, by calculating the slope angle equal to the inverse tangent (elevation difference in that direction divided by horizontal distance). The slope angle of the virtual end can be directly obtained from the terrain data or height field of the virtual green, that is, the elevations of several sampling points on the line connecting the hole cup and the stopping point are read, and the slope angle in that direction is estimated based on the elevation difference and horizontal distance between the sampling points, so that the slope inclination in the direction of the ball position is included in the feature representation. For example, if the virtual hole cup is located at the local origin and the stopping point is at a local plane coordinate of (2.0 meters, 3.0 meters), the horizontal distance is about 3.61 meters; if the angle of the connecting line relative to the reference direction is about 56 degrees, the attack hole azimuth is about 56 degrees; if the elevation at the hole cup is 0.00 meters and the elevation at the stopping point is 0.12 meters in that direction, the slope angle can be approximately 1.9 degrees, which is obtained by the inverse tangent (0.12 / 3.61), to represent that the direction from the hole cup to the stopping point is uphill with a slope of about 1.9 degrees.
[0018] In step S103, a candidate point set is generated in the real local coordinate system based on the digital surface model, and the horizontal distance, attack hole azimuth, and slope angle in the direction from the hole cup to the candidate point of each candidate point relative to the real hole cup are calculated.
[0019] In the present embodiment, the candidate point set can be understood as a set of alternative positions on the real green where a ball can be placed for selection of a real position that best matches the virtual tee characteristics. The candidate point set can be generated based on discrete sampling of the real green digital surface model, for example, sampling at fixed steps within a certain radius around the real cup, or sampling in polar coordinates: setting a distance step (e.g. 0.2 meters or 0.5 meters) and an angle step (e.g. 2 degrees or 5 degrees) with the real cup as the center, generating sampling points at different distance rings and different azimuth angles, and taking the sampling points falling within the real green area as candidate points. The so-called falling within the real green area can be determined by the digital surface model coverage, the pre-labeled green boundary polygon, or the placeable area mask, so as to avoid generating candidate points outside the green or in the non-placeable area. For each candidate point, the horizontal distance and the attack angle relative to the real cup are calculated in the real local coordinate system, and the calculation method is consistent with the virtual end. At the same time, the real green digital surface model is used to read the elevation sampling value in the direction from the real cup to the candidate point and to calculate the slope angle, so that the candidate point also has the (d, θ, φ) set of characteristics that can be aligned with the virtual end. For example, if the real cup is the origin, a certain candidate point has a real local plane coordinate of (1.8 meters, 2.7 meters), the horizontal distance is about 3.24 meters, and the azimuth angle is about 56 degrees. If the elevation at the cup is 0.00 meters and the elevation at the candidate point is 0.10 meters in the direction, the slope angle is about 1.8 degrees. By calculating the characteristics of a large number of candidate points, the distance distribution, azimuth distribution, and slope distribution of the real green around the cup are converted into a set of discrete characteristics that can be searched and compared.
[0020] Step S104, taking the pre-set weighted combination of the horizontal distance difference, the attack angle difference, and the slope angle difference of the candidate points as the generation value, selecting the candidate point with the smallest generation value from the candidate point set as the adaptive position of the real green.
[0021] In the present embodiment, the substitution value can be understood as a numerical indicator measuring how close a candidate point is to the virtual stop point in terms of relative cup relationship, and the smaller the value is, the closer it is. The horizontal distance difference can be the absolute value or squared difference of the distance difference between the candidate point and the stop point; the attack angle difference suggests using the minimum included angle difference, i.e. converting the angle difference to the range of 0 to 180 degrees to avoid error amplification caused by 360-degree wrapping; the slope angle difference is the absolute value or squared difference of the slope angle difference between the candidate point and the stop point. The preset weighted combination refers to weighting and summing the three types of differences according to weights, for example, the substitution value is equal to w1 multiplied by the horizontal distance difference plus w2 multiplied by the attack angle difference plus w3 multiplied by the slope angle difference, or equal to w1 multiplied by the horizontal distance squared difference plus w2 multiplied by the attack angle squared difference plus w3 multiplied by the slope angle squared difference; the weights w1, w2, w3 can be pre-set according to the sensitivity of the push experience, for example, in the scenario where the slope impact is emphasized more, w3 is increased to make the system preferentially select the real point with a closer slope. Continuing the above example, the virtual end features are a distance of 3.61 meters, an attack angle of 56 degrees, and a slope of 1.9 degrees; the real end candidate point A features are a distance of 3.24 meters, an attack angle of 56 degrees, and a slope of 1.8 degrees, then the distance difference is 0.37 meters, the attack angle difference is 0 degrees, and the slope difference is 0.1 degrees; the candidate point B features are a distance of 3.62 meters, an attack angle of 40 degrees, and a slope of 0.3 degrees, then the distance difference is 0.01 meters, the attack angle difference is 16 degrees, and the slope difference is 1.6 degrees. If the weights are set to make the slope difference have a greater impact, then the candidate point A can have a smaller overall substitution value and be selected as the adaptive position; if the weights are set to emphasize the distance more, then the candidate point B can be better.
[0022] Step S105, output the real position information of the adaptive position, and use the real position information to indicate the adaptive position on the real green.
[0023] In the embodiment, real position information of the adapted position is outputted, and the real position information is used to indicate the adapted position on the real green. The real position information herein can be understood as two-dimensional or three-dimensional coordinates of the adapted position in a real green coordinate system, or polar coordinate expression (distance and azimuth angle) in a real local coordinate system, and the output can be sent to an indication terminal or a control module on site to complete landing indication. The indication can be implemented in various ways as long as the player can accurately find the adapted position on the real green, for example, by forming a light spot at the adapted position through a movable laser lamp, by ground projection or indicator marking, or by real-time display of the distance and direction of the player relative to the adapted position on a handheld terminal to guide the player to the point; when a handheld terminal is used for guidance, the terminal can obtain the current position of the player based on the positioning device and calculate the relative vector to the adapted position, dynamically prompting how many meters to go forward and how many degrees to deflect to the left or right until entering a preset arrival range. For example, when the system outputs that the adapted position is 3.2 meters away and 56 degrees in the real local coordinate system, if a laser indication is used on site, the polar coordinate can be converted into a plane coordinate required for laser device control and driven to project; if positioning guidance is used, the current distance of 3.2 meters can be displayed on the interface of the mobile phone and updated in real time as the player moves, assisting the player in placing the ball at the adapted position and starting the putting.
[0024] The present application converts the virtual stop point and the real candidate point into unified relative characteristics of horizontal distance, attack hole azimuth angle, and slope angle along the attack hole direction by taking the hole cup as a common reference, and automatically determines the adapted position on the real green by preset weighted value minimization, so that the real ball placement position close to the virtual stop experience as a whole can be quickly obtained under the condition that the virtual green and the real green shapes are inconsistent, and the virtual green is replicated or artificially calibrated hole by hole depending on the real green, thereby improving the adaptation accuracy and deployment universality of the mixed putting stage.
[0025] In some optional implementations of the embodiment, in the step of selecting the candidate point with the minimum value from the candidate point set as the adapted position of the real green by preset weighted combination of the horizontal distance difference, the attack hole azimuth angle difference, and the slope angle difference of the candidate points, the attack hole azimuth angle difference is the minimum included angle difference determined within a preset angle range; The slope angle difference is the difference between the slope angles in the direction of the corresponding point indicated by the hole cup.
[0026] In the embodiment, the attack hole azimuth angle difference is the minimum included angle difference in the preset angle range, which is mainly used to ensure that the angle difference is consistent with geometric intuition when the angle crosses the value boundary. Since the attack hole azimuth angle is usually taken as 0-360 degrees or -180-180 degrees, if the difference is directly calculated, the angle difference may be mis-calculated as 358 degrees when the virtual end azimuth angle is 359 degrees and the real end azimuth angle is 1 degree, thereby causing the value to be abnormally enlarged and the candidate point that should be highly matched to be incorrectly excluded. When the minimum included angle difference is used, the difference between the two angles can be calculated by wrapping around the preset angle range, so that the angle difference in the above example is determined as 2 degrees, thereby more accurately representing the relative deflection amplitude of the hole cup pointing to the target point direction. The slope angle difference is the difference between the slope angles along the direction of the hole cup pointing to the corresponding point, which is used to make the value not only reflect the matching degree of the distance and the azimuth, but also reflect the slope difference in the main force direction of the push. Since the rolling trend of the ball during the push is closely related to the slope of the line connecting the hole cup and the ball position, even if the distance and the azimuth of the ball position are the same, if the direction changes from uphill to downhill or the slope increases, the push speed control and the line selection will also be significantly changed. Therefore, by explicitly including the difference in the value through the slope angle difference, the system can preferentially select the real candidate point with a more similar push experience. For example, if the virtual end stop point and the hole cup have an azimuth angle of 60 degrees, a distance of 3.0 meters, and a 2-degree uphill, and a certain real candidate point has the same azimuth and distance but a 2-degree downhill, the slope angle difference reaches 4 degrees, and even if the distance difference and the azimuth angle difference are 0, the value of the candidate point will still be significantly increased, thereby avoiding selecting an adaptive position with a significantly inconsistent experience.
[0027] The application limits the attack hole azimuth angle difference to the minimum included angle difference in the preset angle range, so that the angle difference is consistent with geometric intuition when the angle crosses the boundary, and avoids mis-selection or omission of matched points due to abnormal enlargement of the value caused by angle wrapping. Meanwhile, the slope difference is represented by the difference between the slope angles along the direction of the hole cup pointing to the corresponding point, so that the value can more directly reflect the slope difference in the main force direction of the push, thereby improving the consistency of the selected adaptive position in terms of push difficulty and line trend.
[0028] In some optional implementations of the embodiment, the determination of the slope angle includes: obtaining at least two elevation sampling values on the corresponding green terrain data along the direction of the hole cup pointing to the target point, and calculating the slope angle based on the elevation sampling values and the corresponding horizontal distance; when the elevation sampling values meet the preset stability condition, outputting the slope angle for the value calculation.
[0029] In the embodiment, the determination of the slope angle is used to convert the degree of inclination of the green terrain in a certain attack direction into a calculable feature. For example, at least two elevation sample values are obtained on the corresponding green terrain data in the direction pointing to the target point from the hole cup. It can be understood that the elevations at the hole cup and the target point are taken in this direction, or one or more intermediate elevations between the two points are taken to reduce the influence of local noise on the slope estimation; then the slope angle is calculated based on the elevation sample values and the corresponding horizontal distance, for example, the slope value is obtained by dividing the elevation difference by the horizontal distance, and the slope angle is obtained by taking the inverse tangent. When the elevation sample values meet the preset stability condition, the slope angle is output, which is used to avoid the matching deviation caused by the unreliable slope angle due to the sampling error, local peak or interpolation anomaly of the digital surface model. The stability condition can be realized in the form of adjacent sample point elevation difference not exceeding a threshold, slope angle change in the neighborhood not exceeding a threshold, or intermediate sample point and two-end linear interpolation residual not exceeding a threshold. Taking an example, if the hole cup is sampled at the hole cup elevation 0.00 meters, the elevation 0.04 meters at 1.5 meters from the hole cup, and the target point elevation 0.09 meters on the line connecting the hole cup and the target point, and the adjacent elevation difference is smooth, the slope angle of about 1.7 degrees can be output, that is, the inverse tangent (0.09 / 3.0)≈1.7 degrees; if the intermediate point elevation appears a mutation, for example, the elevation is 0.20 meters, which causes the curve to be not smooth, it can be determined that the stability condition is not met and the slope angle feature can be used for stable value calculation after resampling or removing the abnormal sample value.
[0030] The present application obtains at least two elevation samples in the direction from the hole cup to the target point, and calculates the slope angle combined with the horizontal distance, so that the slope feature can be stably and reproducibly obtained from the green terrain data; and the sampling values are constrained by the stability condition, which reduces the influence of the sampling noise, local peak or interpolation anomaly of the digital surface model on the estimation of the slope angle, thereby improving the reliability of the slope angle difference participating in the value calculation and the stability of the matching result.
[0031] In some optional implementations of the embodiment, the above-mentioned step of generating a candidate point set based on the digital surface model in the real local coordinate system comprises: generating polar coordinate sampling points with a preset distance step and a preset angle step centering on the real hole cup; only determining the polar coordinate sampling points falling within the real green area represented by the digital surface model as the candidate point set.
[0032] In the embodiment, the polar coordinate sampling point can be understood as a point generated with the hole cup as the origin and distance r and azimuth angle θ as parameters. The corresponding sampling point can be obtained by converting (r, θ) into the plane coordinates in the real local coordinate system. The preset distance step controls the density of the distance ring, and the preset angle step controls the direction density on each distance ring. Both of them can be set according to the system accuracy and the calculation cost. For example, the distance step is 0.2 meters and the angle step is 5 degrees, which can form a relatively fine discrete grid around the hole cup. Further, only the sampling points falling into the real green area represented by the digital surface model are determined as the candidate point set, so as to avoid generating the candidate points to the outside of the green or the area not covered by the digital surface model, thereby ensuring that the terrain data is supported when the horizontal distance, azimuth angle and slope angle of the candidate points are calculated subsequently and the candidate points have the practical significance of being able to put the ball. For example, when the coverage range of the digital surface model of the real green forms a closed boundary, the system can determine whether each polar coordinate sampling point is inside or outside the boundary. If the sampling point is outside the boundary, it is not included in the candidate point set. When the real green is a non-circular boundary, this screening is particularly necessary, otherwise the sampling points with the same distance at some azimuth angles may fall outside the green, resulting in invalid slope calculation subsequently.
[0033] The application generates polar coordinate sampling points with the real hole cup as the center according to the distance step and the angle step, so that the candidate points are uniformly covered around the hole cup according to the distance and the direction, which is convenient for directly aligning with the distance / azimuth features of the virtual end. Only the sampling points falling into the real green area represented by the digital surface model are retained, so as to avoid the candidate points falling outside the green or in the area without terrain data support, thereby ensuring the effectiveness of the candidate point set and the implementability of the subsequent slope calculation from the source.
[0034] In some optional implementation manners of the embodiment, after the step of calculating the horizontal distance, the attack hole azimuth angle and the slope angle of each candidate point relative to the real hole cup, the method further includes: writing the horizontal distance, the attack hole azimuth angle and the slope angle of each candidate point and the corresponding real position information into the index data to form the association relationship between the candidate point features and the real position information.
[0035] In the embodiment, the index data can be understood as a structured storage, such as a database table, a key-value index or a tree structure index, each record of which at least contains the feature triplet (d, θ, φ) of the candidate point and the real position information of the candidate point in the real green coordinate system; through the association relationship, the system can first locate the candidate point set based on the features during subsequent adaptation, then calculate the value and output the optimal candidate point, without the need to regenerate all candidate points from the digital surface model and repeatedly calculate all features each time, thereby reducing the online calculation burden. For example, the system can perform offline sampling on the real green once during the deployment stage, calculate (d, θ, φ) for each candidate point and write it into the index data; when the virtual end gives the feature of the stopping point, the candidate point record with similar distance or direction can be directly retrieved in the index data and its real position information can be read to quickly enter the value calculation and optimal selection process.
[0036] The present application writes the distance, azimuth angle and slope angle of the candidate point and the real position information into the index data, forms a searchable association between the features and the positions, so that the candidate point can be quickly located and its real position information can be read during subsequent adaptation, the online overhead of repeatedly generating candidate points and repeatedly calculating features is reduced, and the response efficiency and system expansion capability during multiple invocations and multi-virtual course adaptation are improved.
[0037] In some optional implementation manners of the embodiment, the step of taking the preset weighted combination of the horizontal distance difference, the attack hole azimuth angle difference and the slope angle difference of the candidate point as the value is preceded by: a distance constraint window is set with the horizontal distance of the stopping point as the center, and a candidate matching point set with the horizontal distance falling within the distance constraint window is filtered based on the index data; the value calculation is performed on the candidate matching point set and the adaptation position is selected.
[0038] In the embodiment, the distance constraint window is used to pre-screen the candidate points before the generation value calculation, so as to reduce the influence of irrelevant candidate points on online calculation and reduce the probability of long-distance mismatch. The distance constraint window centered on the horizontal distance of the stop point can be understood as setting an allowed deviation range, for example [dv-Δd, dv+Δd], near the horizontal distance dv of the stop point, where Δd is a preset window width; the system filters the candidate matching points set whose horizontal distance falls within the range based on the index data, so as to limit the subsequent generation value calculation on the candidate points close to the virtual distance scale. Then, the generation value calculation is performed on the candidate matching point set, and the adaptive position is selected, so that the system can both maintain the matching quality and improve the calculation efficiency. For example, if the horizontal distance between the virtual stop point and the hole cup is 3.0 meters, and Δd is set to 0.5 meters, then the system only calculates the azimuth angle difference and the slope angle difference of the candidate points whose distance falls within the range of [2.5 meters, 3.5 meters] and calculates the generation value; in this way, unnecessary calculation caused by candidate points with a distance of 8 meters or 1 meter can be avoided, and at the same time, the optimal solution is more in line with the requirements of the push-off experience with a distance of 8 meters or 1 meter. The combination of the pre-screening and the subsequent generation value minimization can significantly improve the overall response speed when the number of candidate points is large or a large number of virtual golf courses need to be adapted.
[0039] The present application pre-screens the candidate points by the distance constraint window centered on the horizontal distance of the stop point before the generation value calculation, so that the number of candidate points participating in the generation value comparison is significantly reduced, while ensuring that the candidate matching points and the virtual stop point are close in distance scale and reducing long-distance mismatch; on this basis, the generation value calculation including the distance difference, the azimuth angle difference and the slope angle difference is performed, which can improve the real-time adaptation speed and calculation stability while considering the matching quality.
[0040] In some optional implementation modes of the embodiment, in the step of outputting the real position information of the adaptive position and using the real position information to indicate the adaptive position on the real green, the method comprises: sending the real position information of the adaptive position to a guiding device to drive the guiding device to form an indication of the adaptive position on the real green; after the indication, acquiring the actual ball position of the player and calculating the deviation from the adaptive position, updating the weight parameters in the preset weight combination based on the deviation, for subsequent generation value calculation.
[0041] In the embodiment, the real position information of the adapted position is sent to a guiding device for landing the calculated adapted position to a player-perceivable live prompt, thereby completing the virtual-to-real closed loop connection. The guiding device here can be a movable laser lamp, a projection device, a ground marker lamp or a mobile terminal linked with the positioning system, which have the common feature of being able to form a clear indication on the real green according to the real position information, such as projecting a laser spot at the adapted position, or displaying the distance and direction from the current position of the player to the adapted position on the mobile terminal and dynamically guiding the player to the point. Further, the actual putting position of the player is acquired after the indication and the deviation from the adapted position is calculated, in order to quantify the system error or execution error between the indication result and the actual landing point; the weight parameters in the preset weighted combination are updated based on the deviation, which is used to make the subsequent adaptation more consistent with the experience consistency requirement in the real use scenario. The update can be understood as a self-learning mechanism: when the system observes that a certain type of candidate point matches in distance and direction, but the experience deviation is caused by the greater influence of slope difference on putting, the weight of the slope angle difference can be increased; when it is observed that the slope estimation error is large or the player is not sensitive to the slope, the weight of the slope angle difference can also be reduced accordingly, in order to balance the matching stability and the experience consistency. To illustrate with an example, if multiple records show that the actual putting point of the player has a fixed directional deviation from the indication point, or the putting result is not ideal under certain slope combinations, the system can adjust the weight parameters in the subsequent generation value calculation, so that the selected adapted position is more consistent with the player's final experience close to the virtual green in a statistical sense, thereby improving the long-term adaptation effect and usability of the system under different real greens and different virtual course combinations.
[0042] The present application sends the real position information of the adapted position to the guiding device to form a clear indication on the real green, so that the calculated adapted position can be accurately perceived by the player and used for actual putting, thereby completing the landing closed loop from virtual to real; and the deviation of the actual putting position is acquired after the indication, and the weight parameters of the preset weighted combination are updated accordingly, so that the system can use the deviation data in the real use process for adaptive correction, gradually improving the adaptation consistency and long-term usability under different green conditions and different player habits.
[0043] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by computer readable instructions instructing related hardware, which can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments. The storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0044] It should be understood that, although each step in the flowchart of the accompanying drawings is shown in sequence according to the direction of the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless explicitly stated herein, the execution of these steps is not strictly limited in sequence, and they can be executed in other orders. Moreover, at least part of the steps in the flowchart of the accompanying drawings can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence is not necessarily sequential, but can be alternately executed with at least part of other steps or sub-steps or stages of other steps.
[0045] Further referring to Figure 2 , as an implementation of the method shown in the above Figure 1 , the present application provides an embodiment of an adaptive system of virtual greens with different shapes and real greens, which corresponds to the method embodiment shown in Figure 1 , and the system can be applied to various electronic devices.
[0046] As shown in Figure 2 , the adaptive system of virtual greens with different shapes and real greens described in the embodiment includes an acquisition module 201, a first calculation module 202, a second calculation module 203, a selection module 204, and an output module 205. Among them: The acquisition module 201 is configured to acquire the coordinates of the stop point corresponding to a stop in the virtual green and the coordinates of the virtual cup, and the digital surface model of the real green and the coordinates of the real cup; The first calculation module 202 is configured to establish a corresponding local coordinate system with the virtual cup and the real cup as the origin, respectively, and calculate the horizontal distance of the stop point relative to the virtual cup, the attack hole azimuth, and the slope angle along the cup pointing to the stop point direction in the virtual local coordinate system; The second calculation module 203 is configured to generate a candidate point set in the real local coordinate system based on the digital surface model, and calculate the horizontal distance of each candidate point relative to the real cup, the attack hole azimuth, and the slope angle along the cup pointing to the candidate point direction; The selection module 204 is configured to use the pre-set weighted combination of the horizontal distance difference, the attack hole azimuth difference, and the slope angle difference of the candidate points as the generation value, and select the candidate point with the smallest generation value from the candidate point set as the adaptive position of the real green; The output module 205 is configured to output the real position information of the adaptive position, and use the real position information to indicate the adaptive position on the real green.
[0047] The shape different virtual green and real green adapting system provided by the embodiment of the present application can realize all processes of the shape different virtual green and real green adapting method of the above embodiment, and the functions and technical effects of each module in the device are the same as those of the shape different virtual green and real green adapting method of the above embodiment, which will not be repeated here.
[0048] To solve the above technical problems, the embodiment of the present application further provides a computer device. For details, please refer to Figure 3 , Figure 3 The basic structure block diagram of the computer device of the embodiment is shown in the figure.
[0049] The computer device 3 includes a memory 31, a processor 32 and a network interface 33 which are connected to each other through a system bus. It should be pointed out that only the computer device 3 with components 31-33 is shown in the figure, but it should be understood that it is not required to implement all the shown components, and more or less components can be alternatively implemented. Among them, the computer device herein is a device capable of automatically performing numerical calculation and / or information processing according to pre-set or stored instructions, which hardware includes but is not limited to microprocessor, application specific integrated circuit (ASIC), field programmable gate array (FPGA), digital signal processor (DSP), embedded device, etc., which can be understood by those skilled in the art.
[0050] The computer device can be a desktop computer, a notebook computer, a palm computer and a cloud server, etc. The computer device can interact with the user through a keyboard, a mouse, a remote controller, a touchpad or a voice control device, etc.
[0051] The memory 31 includes at least one type of readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 31 can be an internal storage unit of the computer device 3, such as a hard disk or a memory of the computer device 3. In other embodiments, the memory 31 can also be an external storage device of the computer device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 3. Of course, the memory 31 can also include both an internal storage unit and an external storage device of the computer device 3. In this embodiment, the memory 31 is generally used to store an operating system and various application software installed on the computer device 3, such as computer readable instructions of the method for adapting a virtual green with a different shape to a real green, etc. In addition, the memory 31 can also be used to temporarily store various data that have been output or will be output.
[0052] The processor 32 can be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 32 is generally used to control the overall operation of the computer device 3. In this embodiment, the processor 32 is used to execute computer readable instructions or process data stored in the memory 31, such as computer readable instructions of the method for adapting a virtual green with a different shape to a real green.
[0053] The network interface 33 can include a wireless network interface or a wired network interface, and is generally used to establish a communication connection between the computer device 3 and other electronic devices.
[0054] The present application also provides another embodiment, i.e., a computer readable storage medium storing computer readable instructions, which can be executed by at least one processor to make the at least one processor perform the steps of the method for adapting a virtual green with a different shape to a real green as described above.
[0055] Those skilled in the art can clearly understand the above-mentioned embodiment method can be realized by means of software and the necessary general hardware platform, of course, can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) execute the methods described in various embodiments of the present application.
[0056] The above are only the preferred embodiments of the present application, and are not used to limit the present application, any modification, equivalent replacement and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for adapting virtual greens of different shapes to real greens, characterized in that, Includes the following steps: Obtain the coordinates of the ball's stopping point and the virtual hole coordinates for a single stop in the virtual green, and the digital surface model of the real green and the real hole coordinates. Establish corresponding local coordinate systems with the virtual hole and the real hole as the origin respectively, and calculate the horizontal distance of the stopping point relative to the virtual hole, the attack azimuth angle, and the slope angle along the direction from the hole to the stopping point in the virtual local coordinate system; Based on the digital surface model, a set of candidate points is generated in the real local coordinate system, and the horizontal distance, azimuth angle of attack, and slope angle along the direction from the hole to the candidate point are calculated for each candidate point relative to the real hole cup. Using a preset weighted combination of the horizontal distance difference, the azimuth difference, and the slope difference of the candidate points as the cost, the candidate point with the smallest cost value is selected from the set of candidate points as the suitable location for the real green. Output the actual location information of the adapted position, and use the actual location information to indicate the adapted position on the actual green.
2. The method according to claim 1, characterized in that, In the step of selecting the candidate point with the smallest cost value from the candidate point set as the suitable position for the real green by using a preset weighted combination of the horizontal distance difference, the azimuth difference of the hole, and the slope angle difference of the candidate point as the cost value, the azimuth difference of the hole is the minimum included angle difference determined within a preset angle range. The slope angle difference is the difference in slope angles along the direction from the hole cup to the corresponding point.
3. The method according to claim 2, characterized in that, The determination of the slope angle includes: At least two elevation samples are obtained on the corresponding green terrain data along the direction from the hole cup to the target point, and the slope angle is calculated based on the elevation samples and the corresponding horizontal spacing. When the elevation sampling value meets the preset stability condition, the slope angle is output for the calculation of the cost value.
4. The method according to claim 1, characterized in that, The step of generating a candidate point set in the real local coordinate system based on the digital surface model includes: Polar coordinate sampling points are generated with the actual hole cup as the center according to preset distance steps and preset angle steps; Only polar coordinate sampling points that fall within the real green area represented by the digital surface model are determined as the candidate point set.
5. The method according to claim 4, characterized in that, After calculating the horizontal distance, azimuth angle, and slope angle along the direction from the hole cup to the candidate point for each candidate point, the method further includes: The horizontal distance, azimuth angle, and slope angle of each candidate point are written into the index data to form a correlation between the candidate point features and the real location information.
6. The method according to claim 5, characterized in that, Before the step of using a pre-weighted combination of the horizontal distance difference, the azimuth difference, and the slope difference of the candidate points as the cost, the method further includes: A distance constraint window is set with the horizontal distance of the ball stopping point as the center, and a set of candidate matching points whose horizontal distance falls into the distance constraint window is obtained based on the index data; Perform the cost calculation on the candidate matching point set and select the suitable position.
7. The method according to claim 1, characterized in that, The step of outputting the actual location information of the adapted position and using the actual location information to indicate the adapted position on the actual green includes: The actual location information of the adapted position is sent to the guidance device to drive the guidance device to generate an indication of the adapted position on the actual green; Following the instruction, the player's actual ball placement position is obtained and the deviation is calculated with the adapted position. Based on the deviation, the weight parameters in the preset weighted combination are updated for subsequent cost calculation.
8. A system for adapting virtual greens of different shapes to real greens, characterized in that, include: The acquisition module is used to acquire the coordinates of the ball stopping point and the coordinates of the virtual hole cup corresponding to a single ball stop in the virtual green, as well as the digital surface model of the real green and the coordinates of the real hole cup. The first calculation module is used to establish corresponding local coordinate systems with the virtual hole and the real hole as the origin, respectively, and to calculate the horizontal distance of the stopping point relative to the virtual hole, the attack azimuth angle, and the slope angle along the direction from the hole to the stopping point in the virtual local coordinate system. The second calculation module is used to generate a set of candidate points in the real local coordinate system based on the digital surface model, and to calculate the horizontal distance, azimuth angle of the hole, and slope angle along the direction from the hole to the candidate point for each candidate point relative to the real hole cup. The selection module is used to select the candidate point with the smallest cost value from the candidate point set as the suitable location for the real green, using a preset weighted combination of the horizontal distance difference, the azimuth difference of the hole, and the slope angle difference of the candidate point as the cost value. The output module is used to output the actual location information of the adapted position and use the actual location information to indicate the adapted position on the actual green.
9. A computer device, characterized in that, The device includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the method for adapting virtual greens of different shapes to real greens as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the method for adapting virtual greens of different shapes to real greens as described in any one of claims 1 to 7.