A fan solid sphere ranging method and system based on visual technology
The fan-shaped solid sphere ranging method using visual technology utilizes real-time overhead video capture by a camera and calculates the perspective matrix, solving the problems of complexity and installation difficulty of traditional ranging equipment, and realizing the convenience and traceability of solid sphere ranging.
Patent Information
- Application Number
- CN202211114278.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-14
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2042-09-14
AI Technical Summary
In existing technologies, solid sphere ranging devices are complex, susceptible to interference, and difficult to install and deploy, making it impossible to replay the test process and perform motion analysis.
A vision-based method for measuring distance using a solid ball in a fan shape is employed. The method involves capturing real-time overhead video of the throw with a camera, extracting the landing image, converting it into a perspective view, and calculating the throwing score using a perspective matrix. The camera is used to perform distance measurement and motion analysis.
It improves the convenience and traceability of solid ball ranging, avoids the complexity and installation difficulty of sensing equipment, and enables motion analysis through video playback.
Smart Images

Figure CN115631230B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of solid sphere ranging technology, and in particular to a fan-shaped solid sphere ranging method and system based on vision technology. Background Technology
[0002] Shot put is a power and speed sport, based on strength and centered on speed. It's a sport that requires rapid power generation and comprehensive body coordination. After the shot put is thrown, the throwing distance is measured, and then scored.
[0003] For measuring the distance of a solid sphere, traditional methods use sensors such as infrared sensors and photoelectric sensors. However, these methods have the following drawbacks: the sensors used are complex, susceptible to interference, and difficult to install and deploy. They also cannot be used for playback of the test process or motion analysis.
[0004] Therefore, how to provide a method and system for measuring the distance of a solid sphere based on vision technology, so as to improve the convenience and traceability of solid sphere ranging, has become an urgent technical problem to be solved. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a method and system for measuring the distance of a solid sphere in a sector based on vision technology, thereby improving the convenience and traceability of solid sphere distance measurement.
[0006] In a first aspect, the present invention provides a method for measuring the distance of a solid sector sphere based on visual technology, comprising the following steps:
[0007] Step S10: Draw a distance measurement line based on the throwing point;
[0008] Step S20: Throw a solid ball from the throwing point in the direction of the distance measuring line, and capture the throwing video in real time using a camera.
[0009] Step S30: Extract the landing image of the solid ball after the throw is completed from the throwing video, and convert the landing image into a perspective view;
[0010] Step S40: Calculate the perspective matrix based on the perspective view and the actual coordinates of the distance measuring line;
[0011] Step S50: Based on the actual landing coordinates of the solid ball, the throwing point, and the perspective matrix, obtain the perspective landing coordinates and the perspective throwing point;
[0012] Step S60: Calculate the throwing score based on the perspective landing coordinates, perspective throwing point, and distance measuring line.
[0013] Further, in step S10, the ranging marker is specifically:
[0014] Draw a circle with radius r centered at the throwing point, and draw a sector with radius R centered at the throwing point in the throwing direction. Set several marker points at equal intervals on the two straight sides of the sector, and draw arcs based on the symmetrical marker points.
[0015] Further, step S40 specifically includes:
[0016] Using OpenCV's findHomography method, the perspective matrix is calculated based on the perspective coordinates of each marker point in the perspective drawing and the actual coordinates of each marker point on the distance measuring line.
[0017] Further, step S50 specifically includes:
[0018] Using OpenCV's warpPerspective method, the perspective landing coordinates and perspective throwing point are calculated based on the actual landing coordinates of the solid ball, the throwing point, and the perspective matrix.
[0019] Further, step S60 specifically includes:
[0020] Step S61: Calculate the first pixel distance between the perspective landing coordinates and the perspective throwing point;
[0021] Step S62: From all the marker points, select the marker point closest to the solid ball on the outside of the solid ball, and calculate the second pixel distance between the selected marker point and the perspective throwing point;
[0022] Step S63: Obtain the actual marker distance from the selected marker point to the throwing point based on the ranging datum line;
[0023] Step S64: Calculate the actual throwing distance based on the first pixel distance, the second pixel distance, and the actual marker distance:
[0024] Actual throwing distance = actual marker distance * first pixel distance / second pixel distance;
[0025] Step S65: Calculate the throwing score based on the actual throwing distance and radius r:
[0026] Throwing score = Actual throwing distance - r;
[0027] Step S66: Save the throwing video and throwing results.
[0028] Secondly, the present invention provides a fan-shaped solid sphere ranging system based on vision technology, comprising the following modules:
[0029] The distance measurement mark drawing module is used to draw distance measurement marks based on the throwing point;
[0030] The throwing video shooting module is used to throw a solid ball from the throwing point in the direction of the distance measuring line, and to capture the throwing video in real time using a camera.
[0031] The landing image conversion module is used to extract the landing image of the solid ball after the throwing video is completed and convert the landing image into a perspective view.
[0032] The perspective matrix calculation module is used to calculate the perspective matrix based on the perspective view and the actual coordinates of the distance measurement line.
[0033] The perspective conversion module is used to obtain the perspective landing coordinates and perspective throwing point based on the actual landing coordinates of the solid ball, the throwing point, and the perspective matrix.
[0034] The throwing score calculation module is used to calculate the throwing score based on the perspective landing coordinates, perspective throwing point, and distance measuring line.
[0035] Furthermore, in the distance measuring mark drawing module, the distance measuring mark specifically refers to:
[0036] Draw a circle with radius r centered at the throwing point, and draw a sector with radius R centered at the throwing point in the throwing direction. Set several marker points at equal intervals on the two straight sides of the sector, and draw arcs based on the symmetrical marker points.
[0037] Furthermore, the perspective matrix calculation module specifically comprises:
[0038] Using OpenCV's findHomography method, the perspective matrix is calculated based on the perspective coordinates of each marker point in the perspective drawing and the actual coordinates of each marker point on the distance measuring line.
[0039] Furthermore, the perspective conversion module specifically comprises:
[0040] Using OpenCV's warpPerspective method, the perspective landing coordinates and perspective throwing point are calculated based on the actual landing coordinates of the solid ball, the throwing point, and the perspective matrix.
[0041] Furthermore, the throwing score calculation module specifically includes:
[0042] The first pixel distance calculation unit is used to calculate the first pixel distance between the perspective landing coordinates and the perspective throwing point;
[0043] The second pixel distance calculation unit is used to select the marker point closest to the solid ball from the outside of the solid ball from each of the marker points, and calculate the second pixel distance between the selected marker point and the perspective throwing point.
[0044] The actual marker distance calculation unit is used to obtain the actual marker distance from the selected marker point to the throwing point based on the ranging datum line;
[0045] The actual throwing distance calculation unit is used to calculate the actual throwing distance based on the first pixel distance, the second pixel distance, and the actual marker distance.
[0046] Actual throwing distance = actual marker distance * first pixel distance / second pixel distance;
[0047] The performance calculation unit is used to calculate the throwing score based on the actual throwing distance and radius r.
[0048] Throwing score = Actual throwing distance - r;
[0049] The data storage unit is used to save the throwing video and the throwing results.
[0050] The advantages of this invention are:
[0051] By pre-drawing distance measurement lines and capturing real-time overhead video of the shot put being thrown using a camera, the landing image of the shot put after the throw is extracted from the video and converted into a perspective view. Based on the perspective view and the actual coordinates of the distance measurement lines, a perspective matrix is calculated. Based on the actual landing coordinates of the shot put, the throwing point, and the perspective matrix, the perspective landing coordinates and perspective throwing point are obtained. Finally, the throwing score can be calculated based on the perspective landing coordinates, perspective throwing point, and distance measurement lines. In other words, the calculation of the throwing score only requires a camera, without the need to deploy infrared sensors, photoelectric sensors, or other sensing devices. Furthermore, the throwing video captured by the camera can be used for playback and motion analysis of the test process, ultimately greatly improving the convenience and traceability of shot put distance measurement. Attached Figure Description
[0052] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0053] Figure 1 This is a flowchart of a fan-shaped solid sphere ranging method based on vision technology according to the present invention.
[0054] Figure 2 This is a schematic diagram of the structure of a fan-shaped solid sphere ranging system based on vision technology according to the present invention.
[0055] Figure 3 This is a schematic diagram of the distance measuring caliper of the present invention.
[0056] Figure 4 This is a schematic diagram of the distance measurement method of the present invention. Detailed Implementation
[0057] The technical solution in this application embodiment has the following general idea: a camera is used to capture a video of a solid ball being thrown within the distance measuring line and to extract an image of the solid ball landing after the throw is completed. Based on the landing image and the distance measuring line, the throwing score is calculated by combining perspective transformation and the Pythagorean theorem. No sensor equipment needs to be deployed, and the throwing video can be used for tracing, thereby improving the convenience and traceability of solid ball distance measurement.
[0058] Please refer to Figures 1 to 4 As shown, a preferred embodiment of the present invention, a fan-shaped solid sphere ranging method based on vision technology, includes the following steps:
[0059] Step S10: Draw a distance measuring line based on the throwing point, that is, the thrower throws a solid ball within the distance measuring line and uses the distance measuring line to measure the distance.
[0060] Step S20: Throw a solid ball from the throwing point in the direction of the distance measuring line. Capture the throwing video in real time using a camera to facilitate later tracing.
[0061] Step S30: Extract the landing image of the solid ball after the throw is completed from the throwing video, and convert the landing image into a perspective view;
[0062] Step S40: Calculate the perspective matrix based on the perspective view and the actual coordinates of the distance measuring line;
[0063] Step S50: Detect the actual landing coordinates of the solid ball from the landing image using a target detection algorithm, and obtain the perspective landing coordinates and perspective throwing point based on the actual landing coordinates of the solid ball, the throwing point, and the perspective matrix.
[0064] Step S60: Calculate the throwing score based on the perspective landing coordinates, perspective throwing point, and distance measuring line, that is, first calculate the pixel distance, and then convert the pixel distance into the actual distance.
[0065] In step S10, the ranging marker is specifically:
[0066] Draw a circle with radius r centered at the throwing point, and draw a sector with radius R centered at the throwing point in the throwing direction. Set several marker points at equal intervals on the two straight sides of the sector, and draw arcs based on the symmetrical marker points.
[0067] Step S40 specifically involves:
[0068] Using OpenCV's findHomography method, the perspective matrix is calculated based on the perspective coordinates of each marker point in the perspective drawing and the actual coordinates of each marker point on the distance measuring line.
[0069] Step S50 specifically involves:
[0070] Using OpenCV's warpPerspective method, the perspective landing coordinates and perspective throwing point are calculated based on the actual landing coordinates of the solid ball, the throwing point, and the perspective matrix.
[0071] Step S60 specifically includes:
[0072] Step S61: Calculate the first pixel distance between the perspective landing coordinates and the perspective throwing point;
[0073] Step S62: From all the marker points, select the marker point closest to the solid ball on the outside of the solid ball, and calculate the second pixel distance between the selected marker point and the perspective throwing point;
[0074] Step S63: Obtain the actual marker distance from the selected marker point to the throwing point based on the ranging datum line;
[0075] Step S64: Calculate the actual throwing distance based on the first pixel distance, the second pixel distance, and the actual marker distance:
[0076] Actual throwing distance = actual marker distance * first pixel distance / second pixel distance;
[0077] Step S65: Calculate the throwing score based on the actual throwing distance and radius r:
[0078] Throwing score = Actual throwing distance - r;
[0079] Step S66: Save the throwing video and throwing results.
[0080] A preferred embodiment of the present invention provides a fan-shaped solid sphere ranging system based on vision technology, comprising the following modules:
[0081] The distance measuring mark drawing module is used to draw distance measuring marks based on the throwing point, that is, the thrower throws a solid ball within the distance measuring mark and uses the distance measuring mark to measure the distance;
[0082] The throwing video shooting module is used to throw a solid ball from the throwing point towards the direction of the distance measuring line, and to capture the throwing video in real time with a camera, which is convenient for later traceability.
[0083] The landing image conversion module is used to extract the landing image of the solid ball after the throwing video is completed and convert the landing image into a perspective view.
[0084] The perspective matrix calculation module is used to calculate the perspective matrix based on the perspective view and the actual coordinates of the distance measurement line.
[0085] The perspective conversion module is used to detect the actual landing coordinates of the solid ball from the landing image using a target detection algorithm, and to obtain the perspective landing coordinates and perspective throwing point based on the actual landing coordinates of the solid ball, the throwing point, and the perspective matrix.
[0086] The throwing score calculation module is used to calculate the throwing score based on the perspective landing coordinates, perspective throwing point and distance measuring line, that is, first calculate the pixel distance, and then convert the pixel distance into the actual distance.
[0087] In the distance measurement mark drawing module, the distance measurement mark is specifically:
[0088] Draw a circle with radius r centered at the throwing point, and draw a sector with radius R centered at the throwing point in the throwing direction. Set several marker points at equal intervals on the two straight sides of the sector, and draw arcs based on the symmetrical marker points.
[0089] The perspective matrix calculation module is specifically as follows:
[0090] Using OpenCV's findHomography method, the perspective matrix is calculated based on the perspective coordinates of each marker point in the perspective drawing and the actual coordinates of each marker point on the distance measuring line.
[0091] The perspective conversion module is specifically as follows:
[0092] Using OpenCV's warpPerspective method, the perspective landing coordinates and perspective throwing point are calculated based on the actual landing coordinates of the solid ball, the throwing point, and the perspective matrix.
[0093] The throwing performance calculation module specifically includes:
[0094] The first pixel distance calculation unit is used to calculate the first pixel distance between the perspective landing coordinates and the perspective throwing point;
[0095] The second pixel distance calculation unit is used to select the marker point closest to the solid ball from the outside of the solid ball from each of the marker points, and calculate the second pixel distance between the selected marker point and the perspective throwing point.
[0096] The actual marker distance calculation unit is used to obtain the actual marker distance from the selected marker point to the throwing point based on the ranging datum line;
[0097] The actual throwing distance calculation unit is used to calculate the actual throwing distance based on the first pixel distance, the second pixel distance, and the actual marker distance.
[0098] Actual throwing distance = actual marker distance * first pixel distance / second pixel distance;
[0099] The performance calculation unit is used to calculate the throwing score based on the actual throwing distance and radius r.
[0100] Throwing score = Actual throwing distance - r;
[0101] The data storage unit is used to save the throwing video and the throwing results.
[0102] The following example further illustrates the present invention:
[0103] refer to Figure 4 First, draw a circle with a diameter of 2.135 meters centered at the throwing point A'. Then, draw a sector with a radius of 12 meters centered at the throwing point in the throwing direction, with an angle of 34.92°. On the two straight sides of the sector, set several marker points at intervals of 3 meters. Draw arcs based on the symmetrical marker points. The landing point of the solid ball after being thrown is S' (actual landing coordinates). The throwing video is captured in real time by a camera.
[0104] Extract the landing image of the shot put after the throw is completed from the video and convert it into a perspective view;
[0105] Calculate the perspective matrix h based on the perspective view and the actual coordinates of the distance measurement marks;
[0106] Based on the actual landing coordinates S' of the solid ball, the throwing point A', and the perspective matrix h, the perspective landing coordinates S and the perspective throwing point A are obtained;
[0107] Calculate the first pixel distance between the perspective landing coordinates and the perspective throwing point:
[0108]
[0109] Select marker B, which is closest to the solid ball, from all marker points, and calculate the second pixel distance between marker B and the perspective throwing point A:
[0110]
[0111] Based on the distance measurement markings, the actual distance from marker point B to the throwing point is 6 meters.
[0112] The actual throwing distance is calculated based on the first pixel distance, the second pixel distance, and the actual marker distance:
[0113] A'S' = 6 * AS_pix / AB_pix;
[0114] The throwing result was calculated based on the actual throwing distance and a diameter of 2.135 meters:
[0115] Throwing score = A'S' - 2.135.
[0116] In summary, the advantages of this invention are:
[0117] By pre-drawing distance measurement lines and capturing real-time overhead video of the shot put being thrown using a camera, the landing image of the shot put after the throw is extracted from the video and converted into a perspective view. Based on the perspective view and the actual coordinates of the distance measurement lines, a perspective matrix is calculated. Based on the actual landing coordinates of the shot put, the throwing point, and the perspective matrix, the perspective landing coordinates and perspective throwing point are obtained. Finally, the throwing score can be calculated based on the perspective landing coordinates, perspective throwing point, and distance measurement lines. In other words, the calculation of the throwing score only requires a camera, without the need to deploy infrared sensors, photoelectric sensors, or other sensing devices. Furthermore, the throwing video captured by the camera can be used for playback and motion analysis of the test process, ultimately greatly improving the convenience and traceability of shot put distance measurement.
[0118] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for fan solid sphere ranging based on visual technology, characterized in that: The method comprises the following steps: Step S10, drawing a ranging mark based on the throwing point; the ranging mark is specifically: a circle with the throwing point as the center and a radius of r is drawn, a sector with the throwing point as the center and a radius of R is drawn in the throwing direction, a plurality of mark points are arranged on the two straight edges of the sector at equal intervals, and a circular arc is drawn based on the symmetric mark points; Step S20, throwing a solid ball from the throwing point in the direction of the ranging mark, and shooting a throwing video in real time through a camera; Step S30, cutting a landing image of the solid ball from the throwing video, and converting the landing image into a perspective view; Step S40, calculating a perspective matrix based on the perspective view and the actual coordinates of the ranging mark; Step S50, obtaining a perspective landing coordinate and a perspective throwing point based on the actual landing coordinate of the solid ball, the throwing point, and the perspective matrix; Step S60, calculating a throwing result based on the perspective landing coordinate, the perspective throwing point, and the ranging mark; The step S60 specifically comprises: Step S61, calculating a first pixel distance between the perspective landing coordinate and the perspective throwing point; Step S62, selecting a mark point closest to the solid ball from the mark points on the outside of the solid ball, and calculating a second pixel distance between the selected mark point and the perspective throwing point; Step S63, obtaining an actual mark distance from the selected mark point to the throwing point based on the ranging mark; Step S64, calculating an actual throwing distance based on the first pixel distance, the second pixel distance, and the actual mark distance: Actual throwing distance = actual mark distance * first pixel distance / second pixel distance; Step S65, calculating a throwing result based on the actual throwing distance and the radius r: Throwing result = actual throwing distance - r; Step S66, saving the throwing video and the throwing result.
2. A fan-shaped solid sphere ranging method based on visual technology according to claim 1, characterized in that: The step S40 specifically comprises: using the findHomography method of openCV to calculate the perspective matrix based on the perspective mark coordinates of the mark points in the perspective view and the actual coordinates of the mark points on the ranging mark.
3. A fan-shaped solid sphere ranging method based on visual technology according to claim 1, characterized in that: The step S50 specifically comprises: using the warpPerspective method of openCV to calculate the perspective landing coordinate and the perspective throwing point based on the actual landing coordinate of the solid ball, the throwing point, and the perspective matrix.
4. A vision-based sector solid sphere ranging system, characterized in that: The method comprises the following modules: a ranging mark drawing module for drawing a ranging mark based on a throwing point; the ranging mark is specifically: a circle with the throwing point as the center and a radius of r is drawn, a sector with the throwing point as the center and a radius of R is drawn in the throwing direction, a plurality of mark points are arranged on the two straight edges of the sector at equal intervals, and a circular arc is drawn based on the symmetric mark points; a throwing video shooting module for throwing a solid ball from the throwing point in the direction of the ranging mark, and shooting a throwing video in real time through a camera; a landing image conversion module for cutting a landing image of the solid ball from the throwing video, and converting the landing image into a perspective view; a perspective matrix calculation module for calculating a perspective matrix based on the perspective view and the actual coordinates of the ranging mark; a perspective matrix calculation module for calculating a perspective matrix based on the perspective view and the actual coordinates of the ranging mark; The perspective conversion module is configured to obtain perspective landing coordinates and a perspective throwing point based on the actual landing coordinates of the solid sphere, the throwing point, and the perspective matrix; The throwing result calculation module is configured to calculate a throwing result based on the perspective landing coordinates, the perspective throwing point, and the ranging mark line; The throwing result calculation module specifically includes: A first pixel distance calculation unit configured to calculate a first pixel distance between the perspective landing coordinates and the perspective throwing point; A second pixel distance calculation unit configured to select, from the identification points, an identification point closest to the solid sphere on the outside of the solid sphere, and calculate a second pixel distance between the selected identification point and the perspective throwing point; An actual identification distance calculation unit configured to obtain an actual identification distance from the throwing point to the selected identification point based on the ranging mark line; An actual throwing distance calculation unit configured to calculate an actual throwing distance based on the first pixel distance, the second pixel distance, and the actual identification distance: Actual throwing distance = actual identification distance * first pixel distance / second pixel distance; A result calculation unit configured to calculate a throwing result based on the actual throwing distance and the radius r: Throwing result = actual throwing distance - r; A data storage unit configured to save the throwing video and the throwing result.
5. A visual technology based sector solid sphere ranging system as claimed in claim 4, wherein: The perspective matrix calculation module specifically includes: The findHomography method of openCV is used to calculate the perspective matrix based on the perspective identification coordinates of the identification points in the perspective view and the actual coordinates of the identification points in the ranging mark line.
6. A visual technology based sector solid sphere ranging system as claimed in claim 4, wherein: The perspective conversion module specifically includes: The warpPerspective method of openCV is used to calculate the perspective landing coordinates and the perspective throwing point based on the actual landing coordinates of the solid sphere, the throwing point, and the perspective matrix.
Citation Information
Patent Citations
Automatic distance measuring device and method for long-distance throwing events of sports competitions
CN107233721A
Distance measuring device for distance-jump event
CN203287017U