Billiard projection coordinate calibration method, system and device and storage medium
By calculating the perspective transformation matrix and dynamically adjusting the projection position, the problem of low calibration accuracy of billiard projection position is solved, and the high-precision calibration and adaptability of the billiard projection system are realized, which is suitable for different environments and usage scenarios.
Patent Information
- Application Number
- CN202411557426.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-02-11
AI Technical Summary
In the prior art In billiard-assisted training, a single video image determines the projection position inaccurately and lacks multi-view angle calibration, resulting in low accuracy of projection position calibration, unable to quickly and accurately calculate and adjust the projection position, and it is difficult to adapt to different environmental conditions.
By obtaining video image information based on billiards and pool tables, multiple target points are determined, their pixel coordinates and actual corresponding point coordinates are obtained, the perspective transformation matrix is calculated, and the projection position of the billiards is determined. Optionally, the system also includes obtaining the actual projection images of multiple target points, judging and calibrating the projection images, obtaining deformation parameters, dynamically adjusting the projection position and light and shadow position, and adjusting the projection parameters according to environmental parameters.
It realizes accurate calibration of billiard projection position, improves the consistency between the projection position and the actual position, enhances the practicality and accuracy of the system, can adapt to different environments and usage scenarios, and provides a more stable and reliable billiard projection system.
Abstract
Description
Technical Field
[0001] The present application relates to the field of billiards, and in particular to a billiard projection coordinate calibration method, system, device and storage medium. Background Art
[0002] In the prior art, when billiards are assisted in training, it may be inaccurate to determine the projection position by relying solely on a single video image, and there is a lack of multi-view calibration. There may be errors in determining the target point and obtaining its coordinates, resulting in an inaccurate perspective transformation matrix, which in turn affects the calibration accuracy of the billiard projection position. Secondly, for complex billiard scenes and dynamic changes, the prior art may not be able to quickly and accurately calculate and adjust the projection position, resulting in a lag or deviation between the projection and the actual position. In addition, under different environmental conditions, the prior art may find it difficult to adaptively adjust the projection parameters, resulting in poor projection effects.
[0003] Therefore, the prior art still needs to be improved and developed.
[0004] Application Contents
[0005] In view of the above-mentioned deficiencies in the prior art, the purpose of the present application is to provide a billiard projection coordinate calibration method, system, device and storage medium, aiming to solve the problem of billiard projection position calibration.
[0006] The technical solution of this application is as follows:
[0007] In a first aspect, the present application discloses a billiard projection coordinate calibration method, which includes:
[0008] Obtain video image information based on billiard balls and billiard tables;
[0009] Identify multiple target points;
[0010] Obtain pixel coordinates of multiple target points and corresponding point coordinates of multiple target points on the actual billiard table, and calculate the perspective transformation matrix;
[0011] Based on the actual position of the billiard ball, the corresponding projection position of the billiard ball is determined through perspective transformation matrix calculation.
[0012] The above-mentioned scheme of the present application can make full use of existing equipment to monitor billiard balls and billiard tables by obtaining video image information to determine target points. Determining multiple target points and obtaining their pixel coordinates and actual corresponding point coordinates provides an accurate data basis for calculating the perspective transformation matrix. The calculation of the perspective transformation matrix enables the system to accurately convert the position of the billiard ball in the video image into the projection position on the actual billiard table. This method achieves the effect of accurately calibrating the projection coordinates of the billiard ball, so that the projection position is highly consistent with the actual position of the billiard ball, providing a reliable foundation for subsequent auxiliary exercises and examinations and other functions. Whether under different hardware equipment installation conditions or facing various complex billiard table layouts, the projection position of the billiard ball can be accurately determined, which improves the practicality and accuracy of the system.
[0013] Optionally, the billiard projection coordinate calibration method further comprises:
[0014] Acquire actual projection images of multiple target points;
[0015] Determine whether the actual projection image and the actual position of the target point deviate beyond a preset range;
[0016] If so, the actual projection image is calibrated so that the actual projection image is aligned with the actual position of the target point;
[0017] Get the deformation parameters of this calibration and save them.
[0018] The above scheme of the present application further improves the accuracy of the calibration of the billiard projection coordinates. Since the performance of the projection equipment, environmental factors, etc. may cause deviations in the projection image, these deviations can be corrected in time by judging and calibrating the actual projection image to ensure the accuracy of the projection effect. By obtaining and saving the deformation parameters, calibration can be performed quickly in subsequent use, reducing the time and workload of repeated calculations. At the same time, this also makes the entire billiard projection system more stable and reliable, and can adapt to different usage scenarios and environmental changes. For example, after long-term use, the projection equipment may have slight displacement or deformation, and the saved deformation parameters can be quickly adjusted to ensure the accuracy of the projection coordinates.
[0019] Optionally, the billiard projection coordinate calibration method further comprises:
[0020] Based on the projection position of the billiard ball, the projection light and shadow of the billiard ball and the light and shadow lines of the pocket are generated.
[0021] The above-mentioned scheme of the present application provides intuitive visual guidance for billiard users by generating light and shadow lines of billiard ball projection and pocket opening. During practice or examination, users can clearly see the line between the ball and the pocket opening, so as to better plan the route and strength of the shot. The generation of such light and shadow lines helps to improve the accuracy and strategy of the user's shot, allowing users to more intuitively understand the relationship between the direction of movement of the ball and the target pocket opening. At the same time, the existence of light and shadow lines also increases the auxiliary function of the system, allowing users to perform billiard training more efficiently and improve the training effect.
[0022] Optionally, the billiard projection coordinate calibration method further comprises:
[0023] Based on the actual position of the billiard ball, dynamically adjust the projection position of the billiard ball and the position of the light and shadow lines.
[0024] The above scheme of the present application ensures that the system can always accurately reflect the actual state of the billiards by dynamically adjusting the projection position and the position of the light and shadow lines. During the billiards movement, the position of the ball is constantly changing. This dynamic adjustment can keep up with the rhythm of the ball's movement in time and provide users with real-time auxiliary information. Whether the ball is moving quickly or rolling slowly, the system can maintain the accuracy and timeliness of the projection and light and shadow lines. This allows users to obtain reliable visual guidance throughout the billiards movement process, improves the user's ability to grasp the ball's movement trajectory, helps users make better decisions on hitting the ball, and improves the practicality of the system and user experience.
[0025] Optionally, the billiard projection coordinate calibration method further comprises:
[0026] Based on the dynamically changing position of the billiard ball, the running speed of the billiard ball is calculated, and the color of the billiard ball projection light and shadow is adjusted accordingly according to the running speed of the billiard ball.
[0027] The above scheme of the present application provides users with more information about the movement state of the ball by calculating the running speed of the billiard ball and adjusting the color of the projected light and shadow. The user can intuitively understand the speed of the ball through the color of the projected light and shadow, so as to better judge the timing and strength of the hit. Light and shadow of different colors can attract the user's attention, allowing the user to pay more attention to the speed changes of the ball, which helps to improve the user's reaction speed and decision-making ability. At the same time, this visualization method also increases the fun and interactivity of the system, making billiards practice and examinations more vivid and interesting, and stimulating the enthusiasm and participation of users.
[0028] Optionally, the billiard projection coordinate calibration method further comprises:
[0029] Based on the dynamically changing positions of the billiard balls, when the billiard balls collide with each other, or when they touch the edge of the table, or when they enter the pocket, corresponding sound prompts will be emitted synchronously.
[0030] The above scheme of the present application provides users with multi-dimensional feedback information by synchronously issuing sound prompts. During billiards, users can not only observe the position and movement state of the ball visually, but also perceive important events of the ball through sound. When the ball collides, touches the edge of the table or enters the pocket, the sound prompt can remind the user in time, allowing the user to understand the movement of the ball more clearly. This sound prompt helps users improve their ability to judge the trajectory of the ball, especially in complex game situations, users can grasp the dynamics of the ball more accurately. At the same time, the sound prompt also increases the interactivity and immersion of the system, allowing users to engage in billiards activities more devotedly.
[0031] Optionally, the billiard projection coordinate calibration method further comprises:
[0032] A plurality of video image information based on billiard balls and a billiard table is obtained, and after the projection positions of the plurality of corresponding billiard balls are determined, a corresponding calibration is performed to determine the final projection position.
[0033] The above scheme of the present application improves the stability and reliability of the system by obtaining multiple video image information and calibrating to determine the final projection position. Multiple video images can monitor the billiards from different angles or different time points, providing more comprehensive information. By calibrating multiple projection positions, the problem of inaccurate projection caused by errors or uncertainties in a single image can be reduced. This method makes the final projection position more accurate and reliable, and provides users with more accurate auxiliary information. Whether in complex lighting conditions or when the ball moves at a faster speed, the accuracy of the projection position can be ensured, improving the performance of the system and user experience.
[0034] On the other hand, the present application discloses a billiard projection coordinate calibration system, which includes:
[0035] An image acquisition module, used for acquiring video image information based on billiard balls and billiard tables;
[0036] A target point determination module, used for determining multiple target points;
[0037] A calculation module is used to obtain pixel coordinates of multiple target points and corresponding point coordinates of the multiple target points on the actual billiard tabletop, and calculate a perspective transformation matrix;
[0038] The projection determination module is used to determine the corresponding projection position of the billiard ball based on the actual position of the billiard ball through perspective transformation matrix calculation.
[0039] The above-mentioned scheme of the present application can make full use of existing equipment to monitor billiard balls and billiard tables by obtaining video image information to determine target points. Determining multiple target points and obtaining their pixel coordinates and actual corresponding point coordinates provides an accurate data basis for calculating the perspective transformation matrix. The calculation of the perspective transformation matrix enables the system to accurately convert the position of the billiard ball in the video image into the projection position on the actual billiard table. This method achieves the effect of accurately calibrating the projection coordinates of the billiard ball, so that the projection position is highly consistent with the actual position of the billiard ball, providing a reliable foundation for subsequent auxiliary exercises and examinations and other functions. Whether under different hardware equipment installation conditions or facing various complex billiard table layouts, the projection position of the billiard ball can be accurately determined, which improves the practicality and accuracy of the system.
[0040] On the other hand, the present application discloses an electronic device, which includes a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and execute the billiard projection coordinate calibration method as described above.
[0041] On the other hand, the present application discloses a storage medium, in which a computer program capable of being loaded by a processor and executing the billiard ball projection coordinate calibration method as described above is stored.
[0042] The above solution of the present application has at least one of the following beneficial effects:
[0043] 1. By obtaining video image information to determine the target point, the existing equipment can be fully utilized to monitor the billiards and the billiard table. Determine multiple target points and obtain their pixel coordinates and actual corresponding point coordinates, providing an accurate data basis for calculating the perspective transformation matrix. The calculation of the perspective transformation matrix enables the system to accurately convert the position of the billiard ball in the video image into the projection position on the actual billiard table. This method achieves the effect of accurately calibrating the projection coordinates of the billiard ball, so that the projection position is highly consistent with the actual position of the billiard ball, providing a reliable foundation for subsequent auxiliary exercises and examinations. Whether under different hardware equipment installation conditions or facing various complex billiard table layouts, the projection position of the billiard ball can be accurately determined, improving the practicality and accuracy of the system;
[0044] 2. By generating the shadow and light lines of the billiard ball projection and the pocket, it provides intuitive visual guidance for billiards users. During practice or examination, users can clearly see the line between the ball and the pocket, so as to better plan the route and strength of the shot. The generation of such shadow lines helps to improve the accuracy and strategy of the user's shot, and allows users to more intuitively understand the relationship between the direction of the ball's movement and the target pocket. At the same time, the existence of shadow lines also increases the auxiliary function of the system, allowing users to perform billiards training more efficiently and improve training results;
[0045] 3. By dynamically adjusting the projection position and the position of the light and shadow lines, the system can always accurately reflect the actual state of the billiards. During the billiards movement, the position of the ball is constantly changing. This dynamic adjustment can keep up with the rhythm of the ball's movement and provide real-time auxiliary information to the user. Whether the ball is moving quickly or rolling slowly, the system can maintain the accuracy and timeliness of the projection and light and shadow lines. This allows users to obtain reliable visual guidance throughout the billiards movement process, improves the user's ability to grasp the ball's trajectory, helps users make better decisions on hitting the ball, and improves the practicality of the system and user experience. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and effect of the present application clearer and more specific, the present application is further described in detail below. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0047] The first embodiment of the present application discloses a billiard projection coordinate calibration method, which includes:
[0048] Obtain video image information based on billiard balls and billiard tables;
[0049] Identify multiple target points;
[0050] Obtain pixel coordinates of multiple target points and corresponding point coordinates of multiple target points on the actual billiard table, and calculate the perspective transformation matrix;
[0051] Based on the actual position of the billiard ball, the corresponding projection position of the billiard ball is determined through perspective transformation matrix calculation.
[0052] First, video image information based on the billiard ball and the billiard table is obtained, and then multiple target points are determined. These target points can be specific positions of the billiard table, such as the four corners. Then, the pixel coordinates of the multiple target points are obtained, and the corresponding point coordinates of these target points on the actual billiard table are determined at the same time, and the perspective transformation matrix is calculated through these coordinate data. Finally, based on the actual position of the billiard ball, the perspective transformation matrix is used for calculation to determine the corresponding projection position of the billiard ball.
[0053] By obtaining the video image information to determine the target point, the existing equipment can be fully utilized to monitor the billiards and the billiard table. Determining multiple target points and obtaining their pixel coordinates and actual corresponding point coordinates provides an accurate data basis for calculating the perspective transformation matrix. The calculation of the perspective transformation matrix enables the system to accurately convert the position of the billiard in the video image into the projection position on the actual billiard table. This method achieves the effect of accurately calibrating the billiard projection coordinates, making the projection position highly consistent with the actual position of the billiard, and providing a reliable foundation for subsequent auxiliary exercises and examinations. Whether under different hardware equipment installation conditions or facing various complex billiard table layouts, the projection position of the billiard can be accurately determined, improving the practicality and accuracy of the system.
[0054] Specifically, this application uses a four-point perspective transformation algorithm to improve the accuracy of projection, which is mainly used to map a quadrilateral area on one plane to a quadrilateral area on another plane while keeping the perspective relationship unchanged. In billiard projection and coordinate calibration, the basic principles are as follows:
[0055] Determine four corresponding points on the source plane and the target plane. In the billiard scene, the source plane can be the image plane captured by the camera, and the target plane is the billiard table. The four corresponding points are usually selected from the four corners of the billiard table or four locations with obvious features.
[0056] Through the coordinates of these four corresponding points, a 3x3 perspective transformation matrix can be calculated. This matrix describes the perspective transformation relationship from the source plane to the target plane.
[0057] For any point on the source plane, by multiplying its coordinates with the perspective transformation matrix, the corresponding coordinates on the target plane can be obtained. In this way, the perspective transformation of the image from the source plane to the target plane is realized.
[0058] Suppose there is a billiard table and a visible light camera installed above it in a billiard room. In the image captured by the camera, the billiard table appears as a quadrilateral area. Now we need to project a circular light shadow onto the billiard table and ensure that the light shadow corresponds accurately to the actual position of the billiard ball.
[0059] First, in the image captured by the camera, four points are determined as corresponding points on the source plane, such as the pixel coordinates of the four corners of the pool table (A1, B1, C1, D1).
[0060] Then, on the actual billiard table, four corresponding points are determined as corresponding points (A2, B2, C2, D2) on the target plane.
[0061] The perspective transformation matrix can be calculated from the coordinates of these four points. For example, suppose the coordinates of A1 are (x1, y1), the coordinates of B1 are (x2, y2), the coordinates of C1 are (x3, y3), and the coordinates of D1 are (x4, y4); the coordinates of A2 are (X1, Y1), the coordinates of B2 are (X2, Y2), the coordinates of C2 are (X3, Y3), and the coordinates of D2 are (X4, Y4). Using these coordinates, the perspective transformation matrix M can be calculated through a specific mathematical algorithm.
[0062] When the circular light and shadow are to be projected onto the billiard table, for the coordinates (u, v) of any point P on the light and shadow, the corresponding coordinates (U, V) on the billiard table are obtained by multiplying its coordinates with the perspective transformation matrix M. That is, (U, V) = M*(u, v). In this way, the circular light and shadow can be accurately projected onto the billiard table, and the projection position is updated in real time as the billiard ball moves, ensuring that the light and shadow always correspond to the actual position of the billiard ball.
[0063] The billiard projection coordinate calibration method, wherein the method further comprises:
[0064] Acquire actual projection images of multiple target points;
[0065] Determine whether the actual projection image and the actual position of the target point deviate beyond a preset range;
[0066] If so, the actual projection image is calibrated so that the actual projection image is aligned with the actual position of the target point;
[0067] Get the deformation parameters of this calibration and save them.
[0068] The above scheme of the present application further improves the accuracy of the calibration of the billiard projection coordinates. Since the performance of the projection equipment, environmental factors, etc. may cause deviations in the projection image, these deviations can be corrected in time by judging and calibrating the actual projection image to ensure the accuracy of the projection effect. By obtaining and saving the deformation parameters, calibration can be performed quickly in subsequent use, reducing the time and workload of repeated calculations. At the same time, this also makes the entire billiard projection system more stable and reliable, and can adapt to different usage scenarios and environmental changes. For example, after long-term use, the projection equipment may have slight displacement or deformation, and the saved deformation parameters can be quickly adjusted to ensure the accuracy of the projection coordinates.
[0069] When the present application is implemented, the position of the billiard table and the billiard ball can be identified by a visible light camera, and the rectangular coordinates of the hitting area of the billiard table can be determined to obtain a flexible and changeable virtual rectangular net. At the coordinate position of the billiard ball, a light and shadow circle is projected in proportion in the four corner pockets (upper corner pocket and lower bottom pocket) of the billiard table.
[0070] Then observe the projected light and shadow circle, compare it with the actual billiard ball to see if there is any difference, and then use software to align the projected light and shadow circle with the outer edge of the real billiard ball. After alignment, save the deformation parameters of the corner pocket point, and after calibrating the four pockets in sequence, you will get a set of offset parameters that adapt to the trapezoidal correction of the billiard table. This set of parameters is added and calculated for the coordinates after each movement of the billiard ball, so that the position of the ball on the billiard table can be accurately projected.
[0071] In some possible embodiments of the present application, the billiard projection coordinate calibration method further comprises:
[0072] Based on the projection position of the billiard ball, the projection light and shadow of the billiard ball and the light and shadow lines of the pocket are generated.
[0073] After the projection position of the billiard ball is determined, the projection light and shadow of the billiard ball and the light and shadow line of the pocket are generated based on the projection position. This process requires first determining the position of the pocket of the billiard table, and then connecting the projection light and shadow of the billiard ball with the pocket through a specific light and shadow effect.
[0074] By generating the shadow and light lines of the billiard ball projection and the pocket, the system provides intuitive visual guidance for billiards users. During practice or examination, users can clearly see the line between the ball and the pocket, so as to better plan the route and strength of the shot. The generation of such shadow lines helps to improve the accuracy and strategy of the user's shot, and allows users to more intuitively understand the relationship between the direction of the ball's movement and the target pocket. At the same time, the existence of shadow lines also increases the auxiliary function of the system, allowing users to perform billiards training more efficiently, improving training effects and competition results.
[0075] In some possible embodiments of the present application, the billiard projection coordinate calibration method further comprises:
[0076] Based on the actual position of the billiard ball, dynamically adjust the projection position of the billiard ball and the position of the light and shadow lines.
[0077] The actual position of the billiard ball is continuously monitored, and the projection position and light and shadow line position of the billiard ball are adjusted in real time according to the dynamic changes of the billiard ball position. This requires the system to continuously obtain the latest position information of the billiard ball and use the existing calculation methods and parameters to quickly recalculate and adjust.
[0078] By dynamically adjusting the projection position and the position of the light and shadow lines, the system can always accurately reflect the actual state of the billiards. During the billiards movement, the position of the ball is constantly changing. This dynamic adjustment can keep up with the rhythm of the ball's movement and provide users with real-time auxiliary information. Whether the ball is moving quickly or rolling slowly, the system can maintain the accuracy and timeliness of the projection and light and shadow lines. This allows users to obtain reliable visual guidance throughout the billiards movement process, improves the user's ability to grasp the ball's trajectory, helps users make better decisions on hitting the ball, and improves the practicality of the system and user experience.
[0079] In some possible embodiments of the present application, the billiard projection coordinate calibration method further comprises:
[0080] Based on the dynamically changing position of the billiard ball, the running speed of the billiard ball is calculated, and the color of the billiard ball projection light and shadow is adjusted accordingly according to the running speed of the billiard ball.
[0081] Based on the dynamically changing position of the billiard ball, the speed of the billiard ball is determined by calculating the position change of the billiard ball at different time points. Then, the color of the billiard ball projection light and shadow is adjusted accordingly according to the running speed of the billiard ball. For example, different speed ranges can be set to correspond to different colors. When the ball speed is faster, a bright color is displayed, and when the ball speed is slower, another softer color is displayed.
[0082] By calculating the speed of the billiard ball and adjusting the color of the projected light and shadow, users are provided with more information about the movement of the ball. Users can intuitively understand the speed of the ball through the color of the projected light and shadow, so as to better judge the timing and strength of the hit. Different colors of light and shadow can attract the user's attention, allowing the user to pay more attention to the speed changes of the ball, which helps to improve the user's reaction speed and decision-making ability. At the same time, this visualization method also increases the fun and interactivity of the system, making billiards practice and examinations more vivid and interesting, and stimulating the enthusiasm and participation of users.
[0083] In some possible embodiments of the present application, the billiard projection coordinate calibration method further comprises:
[0084] Based on the dynamically changing positions of the billiard balls, when the billiard balls collide with each other, or when they touch the edge of the table, or when they enter the pocket, corresponding sound prompts will be emitted synchronously.
[0085] The system continuously monitors the dynamically changing positions of the billiard balls. When the billiard balls collide with each other, touch the edge of the table, or enter the pocket, the system will simultaneously issue a corresponding sound prompt. The sound prompt can be differentiated according to different event types, for example, a collision can emit a specific sound, and entering the pocket can emit another sound.
[0086] By emitting sound prompts synchronously, users are provided with multi-dimensional feedback information. During billiards, users can not only observe the position and movement of the ball visually, but also perceive important events of the ball through sound. When the ball collides, touches the edge of the table, or enters the pocket, the sound prompt can remind the user in time, allowing the user to understand the movement of the ball more clearly. This sound prompt helps users improve their ability to judge the trajectory of the ball, especially in complex game situations, so that users can grasp the dynamics of the ball more accurately. At the same time, the sound prompt also increases the interactivity and immersion of the system, allowing users to be more engaged in billiards activities.
[0087] In some possible embodiments of the present application, the billiard projection coordinate calibration method further comprises:
[0088] A plurality of video image information based on billiard balls and a billiard table is obtained, and after the projection positions of the plurality of corresponding billiard balls are determined, a corresponding calibration is performed to determine the final projection position.
[0089] A plurality of video image information based on billiard balls and billiard tables is obtained, and the projection positions of the plurality of corresponding billiard balls are determined by analyzing and calculating the positions of the billiard balls in the plurality of video images. Then, these projection positions are comprehensively considered and calibration is performed to determine the final projection position. The calibration process can adopt a variety of methods, such as taking an average value, a weighted average, etc., to improve the accuracy of the projection position.
[0090] The stability and reliability of the system are improved by obtaining multiple video image information and calibrating the final projection position. Multiple video images can monitor the billiards from different angles or at different time points, providing more comprehensive information. By calibrating multiple projection positions, the problem of inaccurate projection caused by errors or uncertainties in a single image can be reduced. This method makes the final projection position more accurate and reliable, providing users with more accurate auxiliary information. Whether in complex lighting conditions or when the ball moves at a fast speed, the accuracy of the projection position can be ensured, improving the performance of the system and user experience.
[0091] In some possible embodiments of the present application, the billiard projection coordinate calibration method further comprises:
[0092] Get the environment parameters and adjust the projection parameters accordingly.
[0093] The system obtains environmental parameters, which may include light intensity, temperature, humidity, etc. Then, according to different environmental parameters, the projection parameters are adjusted accordingly, such as the brightness, contrast, color, etc. of the projection. For example, in a strong light environment, the brightness of the projection is automatically increased to ensure that the projection is clearly visible; in a humid environment, the color of the projection is adjusted to improve recognition.
[0094] By obtaining environmental parameters and adjusting projection parameters accordingly, the system can adapt to different environmental conditions to ensure that the projection effect always remains good. In actual billiard scenarios, environmental factors may affect the projection. For example, excessive light may cause unclear projection, and high or low temperature may affect device performance. By obtaining environmental parameters in real time and making corresponding adjustments, the system can work normally in various environments and provide users with stable projection assistance functions. This adaptive adjustment improves the robustness and practicality of the system, allowing users to enjoy a high-quality billiard projection experience in different environments.
[0095] Some possible embodiments of the present application may also include: intelligently judging the hitting route according to the position of the billiard ball and the line connecting the billiard ball and the pocket position. The intelligent hitting route prediction greatly improves the user's strategy formulation ability in billiard sports. Using the collected data and advanced algorithms, the system can predict the possible movement routes of the ball under different hitting methods according to the current position, speed and distribution of other balls, and project them on the billiard table in the form of light and shadow. This allows users to consider various possibilities more comprehensively when preparing to hit the ball and formulate a more reasonable hitting strategy. For example, when facing a complex game, the system's hitting route prediction can help users find the best hitting angle and strength and improve the accuracy of hitting. At the same time, this prediction function can also help beginners master billiard skills faster and reduce mistakes caused by lack of experience. In the game, intelligent hitting route prediction can provide key decision-making support for players and increase the chance of winning.
[0096] In some possible embodiments of the present application, it may also include: based on the needs of the user, personalized projection can be performed, and the personalized projection setting meets the specific needs and preferences of different users, and enhances the user's sense of participation and satisfaction. Users can choose different light and shadow colors, shapes and brightness according to their visual needs, so that the projection is more in line with personal aesthetics and habits. For example, some users may like bright colors to enhance the visual effect, while other users may prefer soft light and shadow to reduce visual fatigue. In addition, users can also set specific projection effects to adapt to different environments, such as selecting brighter projections in dim environments, or adjusting the contrast of projections in bright environments. After the user saves his settings, he can quickly call them in different occasions, which improves the convenience of use. This personalized setting function makes the billiard projection system more flexible and changeable, and can meet the needs of different user groups.
[0097] Some possible embodiments of the present application may also include: combining billiard projection with virtual reality technology to bring a new billiard experience to users. After the user wears the virtual reality device, he can see a more realistic billiard scene in the virtual environment, and there will be a corresponding projection on the actual billiard table. The projection in the virtual environment can provide more information and interactive functions, such as displaying the historical movement trajectory of the ball. The user can review his own batting process and analyze the reasons for mistakes, so as to continuously improve his own skills. Providing professional coaching guidance functions can help users improve their billiards level faster. This combination not only increases the fun and attractiveness of billiards, but also provides users with richer learning and training resources. In practice and exams, virtual reality combined with projection can make users more focused and engaged, improving training effects and exam results.
[0098] In some possible embodiments of the present application, the projection of the rotation trajectory of the ball provides an important tool for users to gain a deep understanding of the motion state of the ball. By analyzing the data collected by the camera to calculate the rotation of the billiard ball, and projecting it on the billiard table with special light and shadow effects, the user can intuitively see the direction and intensity of the ball's rotation. For example, the strong rotation of the ball is represented by a spiral light and shadow, which enables the user to better judge the direction of the ball after the collision after hitting the ball. For high-level players, accurately grasping the rotation of the ball is the key to formulating complex hitting strategies. The projection of the rotation trajectory can help them control the position of the cue ball more accurately and achieve accurate hitting effects. For beginners, the projection of the rotation trajectory can help them better understand the concept of rotation in billiards and improve their ability to control the ball. In addition, the projection of the rotation trajectory can also increase the viewing value of billiards games, allowing the audience to more clearly see the impact of the rotation of the ball on the results of the game.
[0099] Some possible embodiments of the present application may also include: historical data comparison projection provides users with an effective means of self-assessment and progress tracking. The system records the data of each shot of the user, including the position, speed, rotation and other information of the ball. When the user is practicing or taking an exam, the current ball motion state can be compared with the historical data for projection. For example, by using different colors of light and shadow to show the difference between the current state and the best historical state, the user can intuitively see in which aspects they have made progress and which aspects still need improvement. This helps users discover their technical shortcomings and develop targeted training plans. At the same time, historical data comparison projection can also stimulate the user's sense of competition and motivation for progress, allowing users to be more actively involved in billiards practice. In addition, for coaches and training institutions, historical data comparison projection can provide them with more detailed student performance information to better guide students to improve their billiards level.
[0100] Some possible embodiments of the present application may also include: remote battle projection uses network technology to enable users in different locations to conduct remote billiard battles, bringing a new competitive experience to billiard enthusiasts. Both sides' billiard tables are projected, and the position and movement status of the other party's ball are displayed in real time, which allows users to feel nervous and excited as if they were playing in the same place. At the same time, battle information such as scores, remaining time, etc. can be added to the projection, so that users can keep abreast of the progress of the game. Remote battle projection breaks geographical restrictions, allowing users to compete with friends or opponents from different places, increasing the sociality and interactivity of billiards. In addition, this battle method also provides a new way to organize and promote billiard games, attracting more people to participate in billiards.
[0101] On the other hand, the present application discloses a billiard projection coordinate calibration system, which includes:
[0102] An image acquisition module, used for acquiring video image information based on billiard balls and billiard tables;
[0103] A target point determination module, used for determining multiple target points;
[0104] A calculation module is used to obtain pixel coordinates of multiple target points and corresponding point coordinates of the multiple target points on the actual billiard tabletop, and calculate a perspective transformation matrix;
[0105] The projection determination module is used to determine the corresponding projection position of the billiard ball based on the actual position of the billiard ball through perspective transformation matrix calculation.
[0106] The functions and specific implementations of each module of the above-mentioned system of the present application have been described in detail in the method steps, so they will not be repeated here.
[0107] On the other hand, the present application discloses an electronic device, which includes a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and execute the billiard projection coordinate calibration method as described above.
[0108] On the other hand, the present application discloses a storage medium, in which a computer program capable of being loaded by a processor and executing the billiard ball projection coordinate calibration method as described above is stored.
[0109] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0110] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0111] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0112] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present invention belong.
[0113] This embodiment provides a computer-readable storage medium. Since the computer program stored in the medium can implement the various steps of the aforementioned embodiments after being run on a processor, the same technical effects as the aforementioned embodiments can be achieved. The principle analysis can refer to the aforementioned related step descriptions and will not be repeated here.
[0114] The embodiments of this specific implementation method are all preferred embodiments of the present application, and are not intended to limit the protection scope of the present application. Therefore, all equivalent changes made based on the structure and principle of the present application should be included in the protection scope of the present application.
Claims
1. A billiard projection coordinate calibration method, characterized in that: include: Obtain video image information based on billiard balls and billiard tables; Identify multiple target points; Obtain pixel coordinates of multiple target points and corresponding point coordinates of multiple target points on the actual billiard table, and calculate the perspective transformation matrix; Based on the actual position of the billiard ball, the corresponding projection position of the billiard ball is determined through perspective transformation matrix calculation.
2. The billiard projection coordinate calibration method according to claim 1, characterized in that: The method further comprises: Acquire actual projection images of multiple target points; Determine whether the actual projection image and the actual position of the target point deviate beyond a preset range; If so, the actual projection image is calibrated so that the actual projection image is aligned with the actual position of the target point; Get the deformation parameters of this calibration and save them.
3. The billiard projection coordinate calibration method according to claim 1, characterized in that: The method further comprises: Based on the projection position of the billiard ball, the projection light and shadow of the billiard ball and the light and shadow lines of the pocket are generated.
4. The billiard projection coordinate calibration method according to claim 1, characterized in that: The method further comprises: Based on the actual position of the billiard ball, dynamically adjust the projection position of the billiard ball and the position of the light and shadow lines.
5. The billiard projection coordinate calibration method according to claim 1, characterized in that: The method further comprises: Based on the dynamically changing position of the billiard ball, the running speed of the billiard ball is calculated, and the color of the billiard ball projection light and shadow is adjusted accordingly according to the running speed of the billiard ball.
6. The billiard projection coordinate calibration method according to claim 1, characterized in that: The method further comprises: Based on the dynamically changing positions of the billiard balls, when the billiard balls collide with each other, or when they touch the edge of the table, or when they enter the pocket, corresponding sound prompts will be emitted synchronously.
7. The billiard projection coordinate calibration method according to claim 1, characterized in that: The method further comprises: A plurality of video image information based on billiard balls and a billiard table is obtained, and after the projection positions of the plurality of corresponding billiard balls are determined, a corresponding calibration is performed to determine the final projection position.
8. A billiard projection coordinate calibration system, characterized in that: include: An image acquisition module, used for acquiring video image information based on billiard balls and billiard tables; A target point determination module, used for determining multiple target points; A calculation module is used to obtain pixel coordinates of multiple target points and corresponding point coordinates of the multiple target points on the actual billiard tabletop, and calculate a perspective transformation matrix; The projection determination module is used to determine the corresponding projection position of the billiard ball based on the actual position of the billiard ball through perspective transformation matrix calculation.
9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and execute the billiard projection coordinate calibration method as claimed in any one of claims 1 to 7.
10. A storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the billiard projection coordinate calibration method as described in any one of claims 1 to 7.