Badminton hitting speed calculation method and device, computer equipment and storage medium
By using the court camera to collect images and reconstruct badminton three-dimensional coordinates, screening the hitting points to calculate the hitting speed, the cost and inaccurate calculation in the existing technology is solved, and low-cost and high-accurate badminton hitting speed calculation is achieved .
Patent Information
- Application Number
- CN202411559442.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-02-18
AI Technical Summary
The existing badminton ball speed identification scheme is expensive and difficult to popularize badminton enthusiasts. Moreover, the quality of the three-dimensional coordinates of ordinary cameras is poor, making it difficult to accurately calculate the ball speed.
The existing camera installed on the court is used to collect the stadium images, detect the badminton position through the pre-trained object detection model, and reconstruct the three-dimensional coordinates of the badminton using the internal and external parameters of the camera, filter the potential hitting points and calculate the hitting speed.
It realizes the acquisition of court images at low cost and calculates the badminton hitting speed, which improves the accuracy and real-time calculations, and avoids the calculation difficulties caused by poor reconstruction quality of ordinary cameras.
Smart Images

Figure CN119477979A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to a method and device for calculating badminton hitting speed, a computer device and a storage medium. Background Art
[0002] Badminton, as a fitness sport, is loved by more and more sports enthusiasts. With the development of the times, the manufacturing process of badminton has also changed, and the rules of badminton competitions have also changed accordingly. In order to ensure that the game is fair and just, the identification and detection of ball speed is particularly important, which is related to whether the game can proceed smoothly.
[0003] In the related technology, conventional ball speed recognition solutions include implanting a chip in the ball, using radar to measure speed, using a high-speed camera in conjunction with computer vision methods to measure speed, etc. However, these methods require high costs and can only be done in professional venues, making them difficult to popularize to the majority of badminton enthusiasts. Summary of the invention
[0004] In view of this, the present invention provides a badminton hitting speed calculation method, device, computer equipment and storage medium to solve the problem of high cost required by existing ball speed identification solutions.
[0005] In a first aspect, the present invention provides a method for calculating badminton hitting speed, the method comprising:
[0006] Acquire a court image acquired by an image acquisition device, where the court image includes a badminton in the court;
[0007] Input the court image into the pre-trained object detection model, detect the position of the badminton in each frame of the court image, and reconstruct the three-dimensional coordinates of the badminton corresponding to the badminton position using the internal and external parameters of the image acquisition device;
[0008] Based on the three-dimensional coordinates of the badminton, an initial hitting moment is determined, and a set of three-dimensional coordinates of the badminton in each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment is screened to obtain a set of potential hitting points;
[0009] Based on the preset hitting point screening rules, the potential hitting point set is screened to obtain the hitting point set;
[0010] Using the hitting point set and the first preset time window frame, the real hitting moment, the incoming ball trajectory and the hitting trajectory are fitted. Based on the incoming ball trajectory and the hitting trajectory, the real hitting point is determined. Based on the real hitting point and the real hitting moment, the badminton hitting speed is calculated.
[0011] In the present invention, the existing image acquisition equipment such as cameras installed on the court is used to collect court images, replacing high-speed cameras or radars, greatly reducing the system installation cost, achieving low-cost collection of court images, and then achieving low-cost calculation of badminton hitting speed. By reconstructing the three-dimensional coordinates of the badminton, screening the hitting points and using the hitting points to calculate the badminton hitting speed, the problem of the difficulty in calculating the badminton hitting speed caused by the poor quality of the reconstruction of the three-dimensional coordinates of the badminton caused by ordinary cameras can be avoided, and the real-time calculation of the badminton hitting speed can be achieved, which improves the accuracy and real-time performance of the badminton hitting speed calculation.
[0012] In an optional implementation, after reconstructing the three-dimensional coordinates of the badminton corresponding to the position of the badminton using the internal and external parameters of the image acquisition device, the method further includes:
[0013] When a plurality of three-dimensional coordinates of badminton balls are reconstructed in the current frame court image, a unique three-dimensional coordinate of the badminton ball in the current frame court image is screened using a preset screening logic.
[0014] In this method, since the ordinary camera is not accurate enough in reconstructing the three-dimensional coordinates of the badminton, it is necessary to use a preset filtering logic to filter out the unique three-dimensional coordinates of the badminton corresponding to the current frame court image from the multiple reconstructed three-dimensional coordinates of the badminton.
[0015] In an optional implementation, the three-dimensional coordinates of the badminton at the initial hitting moment are the three-dimensional coordinates of the badminton with the smallest x coordinate or the largest x coordinate in the three-dimensional coordinate set of the badminton, and the three-dimensional coordinate set of the badminton in each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment is screened to obtain a potential hitting point set, including:
[0016] Determine whether there is a three-dimensional coordinate of the badminton in each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment;
[0017] When the three-dimensional coordinates of the badminton exist in the current frame, determining whether the three-dimensional coordinates of the badminton in the current frame are the three-dimensional coordinates of the badminton with the smallest x coordinate or the largest x coordinate in the three-dimensional coordinate set of the badminton in each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment;
[0018] When the three-dimensional coordinates of the badminton in the current frame are the three-dimensional coordinates of the badminton with the smallest x coordinate or the largest x coordinate in the three-dimensional coordinate set of the badminton in each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment, determine the current frame as a potential hitting point, and determine the hitting direction corresponding to the potential hitting point;
[0019] The badminton three-dimensional coordinate set of each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment is traversed until the badminton three-dimensional coordinate set is traversed to obtain a potential hitting point set.
[0020] In this method, by determining whether there are reconstructed three-dimensional coordinates of a badminton in each frame within a first preset time window, when there are reconstructed three-dimensional coordinates of a badminton, determining whether the three-dimensional coordinates of the badminton in each frame of the court image are the maximum or minimum values of the x-coordinate, the potential hitting point is determined, and the badminton three-dimensional coordinate set is traversed to obtain a potential hitting point set, so as to facilitate the subsequent use of the potential hitting point set to screen the hitting points, and then facilitate the fitting of the hitting speed.
[0021] In an optional embodiment, the preset hitting point screening rules include that the interval between the current potential hitting point and the previous potential hitting point is greater than the second preset time window frame, the hitting direction of the current potential hitting point is opposite to the hitting direction of the previous potential hitting point, the height of the current potential hitting point from the ground is greater than the preset height, the current potential hitting point is within the court, there is at least one three-dimensional coordinate of the badminton between the second preset time window frame after the current potential hitting point and the current potential hitting point, and the second preset time window frame is half of the first preset time window frame;
[0022] Based on the preset hitting point screening rules, the potential hitting point set is screened to obtain a hitting point set, including:
[0023] Determine whether the current potential hitting point meets all preset hitting point screening rules;
[0024] When the current potential hitting point satisfies all preset hitting point screening rules, the current potential hitting point is determined to be the hitting point, and the potential hitting point set is traversed until the traversal of the potential hitting point set is completed to obtain the hitting point set.
[0025] In this method, by judging whether the potential hitting point satisfies all preset hitting point screening rules, when the potential hitting point satisfies all preset hitting point screening rules, the potential hitting point is determined to be the hitting point, and the potential hitting point set is traversed to obtain the hitting point set, so as to facilitate the subsequent use of the hitting point to fit the hitting speed, thereby further improving the accuracy of the hitting speed calculation.
[0026] In an optional implementation, using the hitting point set and the first preset time window frame, fitting to obtain the real hitting moment, the incoming ball trajectory and the hitting trajectory, determining the real hitting point based on the incoming ball trajectory and the hitting trajectory, and calculating the badminton hitting speed based on the real hitting point and the real hitting moment, including:
[0027] Based on the first preset time window frame, determine the first frame before the current hitting point where the three-dimensional coordinates of the badminton exist and the second frame after the current hitting point where the three-dimensional coordinates of the badminton exist, and determine the real hitting moment based on the fitting of the first frame and the second frame;
[0028] Using the first frame and the third frame before the first frame in which the three-dimensional coordinates of the badminton are stored, the initial speed and initial position of the incoming ball are calculated, and the trajectory of the incoming ball is obtained by fitting;
[0029] Using the second frame and the fourth frame after the second frame in which the three-dimensional coordinates of the badminton are present, the initial speed and initial position of the hitting ball are calculated, and the hitting trajectory is obtained by fitting;
[0030] Based on the incoming ball trajectory and the hitting ball trajectory, determining the closest point between the incoming ball trajectory and the hitting ball trajectory as the real hitting point;
[0031] The badminton hitting speed is calculated based on the real hitting point and the real hitting moment using the displacement / time difference method.
[0032] In this method, the real hitting moment is determined, the incoming ball trajectory and the hitting trajectory are fitted, the real hitting point is determined using the incoming ball trajectory and the hitting trajectory, and the badminton hitting speed is calculated using the real hitting moment and the real hitting point. This realizes real-time calculation of the badminton hitting speed and avoids the difficulty in calculating the hitting speed due to the poor quality of reconstruction results of ordinary cameras.
[0033] In an optional implementation, the method further includes: multiplying the hitting speed by a preset empirical coefficient to obtain a final hitting speed.
[0034] In this method, the badminton will roll within one frame after hitting the ball, which will cause a sharp drop in speed. The speed estimated based on the motion state can only get the hitting speed after rolling. In order to compensate for this error, the final hitting speed is obtained by multiplying the hitting speed by a preset empirical coefficient, so that the calculated final hitting speed is closer to the actual hitting speed.
[0035] In a second aspect, the present invention provides a badminton hitting speed calculation device, the device comprising:
[0036] An image acquisition module is used to acquire a court image acquired by an image acquisition device, wherein the court image includes a badminton in the court;
[0037] A three-dimensional coordinate reconstruction module is used to input the court image into a pre-trained object detection model, detect the position of the badminton in each frame of the court image, and reconstruct the three-dimensional coordinates of the badminton corresponding to the badminton position using the internal and external parameters of the image acquisition device;
[0038] A potential hitting point screening module is used to determine the initial hitting moment based on the three-dimensional coordinates of the badminton, and screen the three-dimensional coordinate set of the badminton in each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment to obtain a potential hitting point set;
[0039] A hitting point screening module, used to screen the potential hitting point set based on a preset hitting point screening rule to obtain a hitting point set;
[0040] The batting speed calculation module is used to use the batting point set and the first preset time window frame to fit the real batting moment, the incoming ball trajectory and the batting trajectory, determine the real batting point based on the incoming ball trajectory and the batting trajectory, and calculate the badminton batting speed based on the real batting point and the real batting moment.
[0041] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the badminton hitting speed calculation method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0042] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the badminton hitting speed calculation method of the first aspect or any corresponding embodiment thereof.
[0043] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the badminton hitting speed calculation method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0045] Figure 1 4 is a flow chart of a method for calculating badminton hitting speed according to an embodiment of the present invention.
[0046] Figure 2 is a schematic diagram of a camera installation according to an embodiment of the present invention.
[0047] Figure 3 It is a schematic diagram of an Aruco placement position according to an embodiment of the present invention.
[0048] Figure 4 4 is a flow chart of another method for calculating badminton hitting speed according to an embodiment of the present invention.
[0049] Figure 5 4 is a flow chart of another method for calculating badminton hitting speed according to an embodiment of the present invention.
[0050] Figure 6 4 is a structural block diagram of a badminton hitting speed calculation device according to an embodiment of the present invention.
[0051] Figure 7 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0053] In the related technology, conventional ball speed recognition solutions include implanting a chip in the ball, using radar to measure speed, using a high-speed camera in conjunction with computer vision methods to measure speed, etc. However, these methods require high costs and can only be done in professional venues, making them difficult to popularize to the majority of badminton enthusiasts.
[0054] In order to solve the above problems, a method for calculating the speed of a badminton shot is provided in an embodiment of the present invention, which is used in a computer device. It should be noted that the execution subject may be a badminton shot speed calculation device, which may be implemented as part or all of a computer device through software, hardware, or a combination of software and hardware, wherein the computer device may be a terminal, a client, or a server, and the server may be a single server or a server cluster composed of multiple servers. The terminal in the embodiment of the present application may be a smart phone, a personal computer, a tablet computer, or other intelligent hardware devices. In the following method embodiments, the execution subject is taken as an example of a computer device for explanation.
[0055] The computer device in this embodiment is suitable for use in badminton matches, where the speed of a badminton shot is calculated. The present invention provides a method for calculating the speed of a badminton shot, and uses existing image acquisition devices such as cameras installed on the court to collect court images, replacing high-speed cameras or radars, greatly reducing the system installation cost, achieving low-cost collection of court images, and thus achieving low-cost calculation of the speed of a badminton shot. By reconstructing the three-dimensional coordinates of a badminton, screening the hitting points, and using the hitting points to calculate the speed of a badminton shot, the problem of the difficulty in calculating the speed of a badminton shot caused by the poor quality of the three-dimensional coordinates of a badminton reconstructed by an ordinary camera can be avoided, and the real-time calculation of the speed of a badminton shot can be achieved, thereby improving the accuracy and real-time performance of the calculation of the speed of a badminton shot.
[0056] According to an embodiment of the present invention, an embodiment of a method for calculating the speed of a badminton shot is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0057] In this embodiment, a method for calculating the speed of a badminton shot is provided, which can be used in the above-mentioned computer device. Figure 1 : is a flow chart of a method for calculating badminton hitting speed according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0058] Step S101, obtaining a court image acquired by an image acquisition device.
[0059] In the embodiment of the present invention, the court image includes a badminton in the court.
[0060] In one example, the image acquisition device may be an ordinary security camera, a pan / tilt monitor, an electronic eye, or other image acquisition device. The type of image acquisition device is not limited in the present invention. Taking the image acquisition device as a camera as an example, Figure 2 is a schematic diagram of a camera installation according to an embodiment of the present invention, such as Figure 2 As shown, cameras are placed outside the four corners of the badminton court at a height of 3 to 4 meters, and the camera angles are adjusted so that each camera can capture the entire court.
[0061] Specifically, before the court image is input into the pre-trained object detection model, it also includes: Camera internal parameter calibration: Before the camera is used for the first time, the camera internal parameter calibration should be performed first. The camera internal parameters are often calibrated at the factory, and can also be calibrated using Zhang Youzheng's calibration method. Use Aruco code No. 1 to 12 to print the plastic board, Figure 3is a schematic diagram of an Aruco placement position according to an embodiment of the present invention, such as Figure 3 As shown, place the corresponding board at the specified position, establish a world coordinate system with the upper right corner of the court as the origin of the world coordinate system, the long side as the X-axis, the short side as the Y-axis, and the spatial height as the Z-axis (omitted in the schematic diagram), and then obtain the world coordinate values corresponding to the four corner points in each Aruco according to the scale of the printed board. Since the board is on the ground, the z value of each point is 0. After the calibration is completed, the internal reference is recorded for repeated calls in subsequent steps.
[0062] Calculation of camera extrinsic parameters: Each time the camera is started, in order to prevent the camera from being moved by a person, the camera extrinsic parameters need to be calibrated. Use a key point detection algorithm (such as a key point detection model or other computer vision algorithm, the type of key point detection algorithm is not limited in the present invention) to detect the intersection of the badminton court ground line, and correspond the intersection of the badminton court ground line with the intersection of the badminton court ground line in the real coordinate system to calculate the extrinsic parameters of each camera.
[0063] Camera frame synchronization: In order to obtain accurate badminton reconstruction results, the camera needs to be time synchronized before the system starts. Use the edge server in the same LAN segment as the NTP server and use the NTP protocol to correct the time of the clock on the camera to ensure that there is no time difference between the four cameras in the same court, or the time difference is within a certain allowable range.
[0064] Step S102, inputting the court image into a pre-trained object detection model, detecting the position of the badminton in each frame of the court image, and reconstructing the three-dimensional coordinates of the badminton corresponding to the position of the badminton using the internal and external parameters of the image acquisition device.
[0065] In one example, an object detection model is used to detect the position of a badminton in each frame, and the camera intrinsic parameters and camera extrinsic parameters are used to reconstruct the 3D coordinates of the badminton in 3D space. If multiple results are reconstructed in one frame, some filtering logic is needed to filter out the only ball in each frame as the ball to be analyzed.
[0066] Step S103, based on the three-dimensional coordinates of the badminton, determine the initial hitting moment, and filter the three-dimensional coordinate set of the badminton in each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment to obtain a set of potential hitting points.
[0067] In one example, within the first preset time window near the moment of hitting the ball, the coordinates of the badminton at the moment of hitting the ball should be the point with the smallest x coordinate or the largest x coordinate among all points in the first preset time window. According to experience, the flight time of the badminton will not be less than 10 frames, so the radius of the first preset time window is set to 10 frames, and the first preset time window is 20 frames. The specific value of the first preset time window is not limited in the present invention.
[0068] Step S104, based on the preset hitting point screening rule, the potential hitting point set is screened to obtain the hitting point set.
[0069] In one example, after the potential hitting points are obtained, the potential hitting points need to be screened. In addition to satisfying the extreme point condition, a reasonable hitting point should also satisfy the preset hitting point screening rules.
[0070] Step S105, using the hitting point set and the first preset time window frame, fitting the real hitting moment, the incoming ball trajectory and the hitting trajectory, determining the real hitting point based on the incoming ball trajectory and the hitting trajectory, and calculating the badminton hitting speed based on the real hitting point and the real hitting moment.
[0071] In one example, assume that the 11th frame is the hitting frame, the 11-a frame is the last moment with reconstruction results before the hitting frame, and the 11+b frame is the next moment with reconstruction results after the hitting frame. The actual hitting moment should be between the 11-a frame and the 11+b frame. In order to fit the accurate hitting moment, we need to simulate the movement of badminton.
[0072] In order to simplify the model, it is assumed that the badminton is only affected by gravity and air resistance during flight, the air resistance is proportional to the square of the speed and the direction is always opposite to the speed direction, and the air resistance coefficient is a constant. Enumerate the two adjacent frames with reconstruction results before the 11th frame, use the coordinates and time difference of these two frames to calculate the initial speed and initial position, and you can get up to 10 incoming ball trajectories. Enumerate the two adjacent frames with reconstruction results after the 11th frame, use the coordinates and time difference of these two frames to reverse the initial speed and initial position at the moment of hitting the ball, and you can get up to 10 hitting trajectories. Enumerate the incoming ball trajectory and the hitting trajectory, and the closest point of the two trajectories closest to the fitted hitting point is the real hitting point. Using the real hitting point and the fitted real hitting moment as the starting point, calculate the hitting speed.
[0073] The badminton hitting speed calculation method provided in this embodiment uses existing cameras and other image acquisition devices installed on the court to collect court images, replacing high-speed cameras or radars, greatly reducing the system installation cost, achieving low-cost collection of court images, and then achieving low-cost calculation of badminton hitting speed. By reconstructing the three-dimensional coordinates of the badminton, screening the hitting points and using the hitting points to calculate the badminton hitting speed, the problem of the difficulty in calculating the badminton hitting speed caused by the poor quality of the reconstruction of the three-dimensional coordinates of the badminton caused by ordinary cameras can be avoided, and the badminton hitting speed can be calculated in real time, thereby improving the accuracy and real-time performance of the badminton hitting speed calculation.
[0074] In this embodiment, a method for calculating the speed of a badminton shot is provided, which can be used in the above-mentioned computer device. Figure 4 FIG. 4 is a flow chart of another method for calculating badminton hitting speed according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:
[0075] Step S401, obtain the court image acquired by the image acquisition device. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0076] Step S402, inputting the court image into a pre-trained object detection model, detecting the position of the badminton in each frame of the court image, and reconstructing the three-dimensional coordinates of the badminton corresponding to the position of the badminton using the internal and external parameters of the image acquisition device.
[0077] In one example, by using an object detection model (yolov5) to detect badminton from four perspectives at the same time, using the camera's intrinsic and extrinsic parameters, the rays in the 3D space corresponding to the detection results at each perspective can be obtained, and the coordinates of the point closest to the four rays can be calculated, which is the position of the badminton in the court image.
[0078] Step S403, when a plurality of three-dimensional coordinates of badminton balls are reconstructed in the current frame court image, a unique three-dimensional coordinate of badminton balls in the current frame court image is screened using a preset screening logic.
[0079] In one example, when there are multiple badmintons on the scene, based on the above principle, the distance between the ray and the reconstructed three-dimensional coordinates of the badminton in the previous frame is calculated simultaneously, and the distance is used as the basis for ray matching to reconstruct multiple three-dimensional coordinates of the badminton.
[0080] The screening logic includes: after reconstructing multiple badminton three-dimensional coordinates, use the deepsort tracking algorithm to match each badminton three-dimensional coordinate reconstructed in this frame with the badminton three-dimensional coordinates in the previous frame one by one, and then judge in sequence according to the following rules: 1. The badmintons left after screening should be located in the badminton court. 2. If the tracking algorithm knows that the current badminton three-dimensional coordinates have been stationary for a period of time in the past, filter out the badminton three-dimensional coordinates. 3. If there is a badminton three-dimensional coordinate among the remaining badminton three-dimensional coordinates that matches the badminton three-dimensional coordinates selected in the previous frame (tracking information), select this badminton three-dimensional coordinate. 4. If the badminton three-dimensional coordinates were screened out in the previous frame, select the badminton three-dimensional coordinates that are closest to the badminton three-dimensional coordinates in the previous frame. 5. In other cases, no badminton three-dimensional coordinates are screened out in this frame.
[0081] Step S404: Determine the initial hitting moment based on the three-dimensional coordinates of the badminton, and filter the three-dimensional coordinates of the badminton in each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment to obtain a set of potential hitting points. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0082] Step S405: Based on the preset hitting point screening rules, the potential hitting point set is screened to obtain a hitting point set. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.
[0083] Step S406, using the hitting point set and the first preset time window frame, fitting the real hitting moment, the incoming ball trajectory and the hitting trajectory, determining the real hitting point based on the incoming ball trajectory and the hitting trajectory, and calculating the badminton hitting speed based on the real hitting point and the real hitting moment. Figure 1 Step S105 of the illustrated embodiment will not be described in detail here.
[0084] The badminton hitting speed calculation method provided in this embodiment is not accurate enough to reconstruct the three-dimensional coordinates of the badminton using an ordinary camera. Therefore, it is necessary to use a preset filtering logic to filter out the multiple reconstructed three-dimensional coordinates of the badminton to obtain the unique three-dimensional coordinates of the badminton corresponding to the current frame court image.
[0085] In this embodiment, a method for calculating the speed of a badminton shot is provided, which can be used in the above-mentioned computer device. Figure 5 FIG. 4 is a flow chart of another method for calculating badminton hitting speed according to an embodiment of the present invention. Figure 5 As shown, the process includes the following steps:
[0086] Step S501, obtain the court image acquired by the image acquisition device. Figure 4 Step S401 of the illustrated embodiment will not be described in detail here.
[0087] Step S502: Input the court image into the pre-trained object detection model, detect the position of the badminton in each frame of the court image, and reconstruct the three-dimensional coordinates of the badminton corresponding to the badminton position using the internal and external parameters of the image acquisition device. Figure 4 Step S402 of the illustrated embodiment will not be described in detail here.
[0088] Step S503, based on the three-dimensional coordinates of the badminton, determine the initial hitting moment, and filter the three-dimensional coordinate set of the badminton in each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment to obtain a set of potential hitting points.
[0089] Specifically, the three-dimensional coordinates of the badminton at the initial hitting moment are the three-dimensional coordinates of the badminton with the smallest x coordinate or the largest x coordinate in the three-dimensional coordinate set of badmintons. The above step S503 includes:
[0090] It is determined whether the three-dimensional coordinates of the badminton exist in each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment.
[0091] When the badminton three-dimensional coordinates exist in the current frame, it is determined whether the badminton three-dimensional coordinates in the current frame are the badminton three-dimensional coordinates with the smallest x coordinate or the largest x coordinate in the badminton three-dimensional coordinate set of each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment.
[0092] When the badminton three-dimensional coordinates in the current frame are the badminton three-dimensional coordinates with the smallest x coordinate or the largest x coordinate in the badminton three-dimensional coordinate set of each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment, the current frame is determined to be a potential hitting point, and the hitting direction corresponding to the potential hitting point is determined.
[0093] The badminton three-dimensional coordinate set of each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment is traversed until the badminton three-dimensional coordinate set is traversed to obtain a potential hitting point set.
[0094] In one example, a possible hitting moment should meet the following conditions: within the first preset time window near the hitting moment, the three-dimensional coordinates of the badminton at the hitting moment should be the moment corresponding to the three-dimensional coordinates of the badminton with the smallest x coordinate or the largest x coordinate among all the three-dimensional coordinates of the badminton in the first preset time window. Since the flight time of the badminton will not be less than 10 frames, the radius of the first preset time window is set to 10 frames, and 20 frames is the shortest time for a badminton to go back and forth.
[0095] Filter the results of the 21 frames from the t-20th frame to the tth frame. If the t-10th frame has the reconstructed three-dimensional coordinates of the badminton, determine whether the x coordinate of the three-dimensional coordinates of the badminton in the t-10th frame is the largest or smallest among the 21 frames. If the x coordinate of the three-dimensional coordinates of the badminton in the t-10th frame is the largest or smallest among the 21 frames, then the t-10th frame is a potential hitting point. At the same time, the direction of the hit can also be determined based on whether the x coordinate at this time is the minimum or maximum value, where x is the minimum value, which means that the ball is hit in the direction with a larger x value, and vice versa, x is the maximum value, which means that the ball is hit in the direction with a smaller x value.
[0096] In this method, by determining whether there are reconstructed three-dimensional coordinates of a badminton in each frame within a first preset time window, when there are reconstructed three-dimensional coordinates of a badminton, determining whether the three-dimensional coordinates of the badminton in each frame of the court image are the maximum or minimum values of the x-coordinate, the potential hitting point is determined, and the badminton three-dimensional coordinate set is traversed to obtain a potential hitting point set, so as to facilitate the subsequent use of the potential hitting point set to screen the hitting points, and then facilitate the fitting of the hitting speed.
[0097] Step S504, based on the preset hitting point screening rule, the potential hitting point set is screened to obtain the hitting point set.
[0098] Specifically, the preset hitting point screening rules include that the interval between the current potential hitting point and the previous potential hitting point is greater than the preset time window frame, the hitting direction of the current potential hitting point is opposite to the hitting direction of the previous potential hitting point, the height of the current potential hitting point from the ground is greater than the preset height, the current potential hitting point is within the court, there is at least one badminton three-dimensional coordinate between the second preset time window frame after the current potential hitting point and the current potential hitting point, and the second preset time window frame is half of the first preset time window frame. The above step S504 includes:
[0099] Based on the preset hitting point screening rule, the potential hitting point set is screened to obtain the hitting point set, including.
[0100] Determine whether the current potential hitting point meets all preset hitting point screening rules.
[0101] When the current potential hitting point satisfies all preset hitting point screening rules, the current potential hitting point is determined to be the hitting point, and the potential hitting point set is traversed until the traversal of the potential hitting point set is completed to obtain the hitting point set.
[0102] In one example, after obtaining the potential hitting point set, the potential hitting point set needs to be screened. In addition to satisfying the above conditions, a reasonable hitting point should also satisfy the following conditions: the interval between the current potential hitting point and the previous potential hitting point is greater than the second preset time window frame, that is, the interval between this hitting and the previous hitting should be more than 10 frames. The hitting direction of the current potential hitting point is opposite to the hitting direction of the previous potential hitting point. Since the length of the badminton racket face is 40cm, the number of hitting below 20cm is very small, and most of the "hitting events" below 20cm are actually picking up the ball. The height of the current potential hitting point from the ground is greater than the preset height, that is, the height from the ground when this hitting occurs should be more than 20cm. The current potential hitting point is in the court. Since there is no reconstructed badminton three-dimensional coordinate within 10 frames, the hitting speed cannot be calculated. There is at least one badminton three-dimensional coordinate between the second preset time window frame after the current potential hitting point and the current potential hitting point, that is, there should be at least one reconstructed badminton three-dimensional coordinate within 10 frames after the hitting point.
[0103] In this method, by judging whether the potential hitting point satisfies all preset hitting point screening rules, when the potential hitting point satisfies all preset hitting point screening rules, the potential hitting point is determined to be the hitting point, and the potential hitting point set is traversed to obtain the hitting point set, so as to facilitate the subsequent use of the hitting point to fit the hitting speed, thereby further improving the accuracy of the hitting speed calculation.
[0104] Step S505, using the hitting point set and the first preset time window frame, fit the real hitting moment, the incoming ball trajectory and the hitting trajectory, determine the real hitting point based on the incoming ball trajectory and the hitting trajectory, and calculate the badminton hitting speed based on the real hitting point and the real hitting moment.
[0105] Specifically, the above step S505 includes:
[0106] Step S5051, based on the first preset time window frame, determine the first frame before the current hitting point in which the three-dimensional coordinates of the badminton exist and the second frame after the current hitting point in which the three-dimensional coordinates of the badminton exist, and determine the actual hitting moment based on the fitting of the first frame and the second frame.
[0107] Step S5052, using the first frame and the third frame before the first frame in which the three-dimensional coordinates of the badminton are stored, the initial speed and initial position of the incoming ball are calculated, and the trajectory of the incoming ball is obtained by fitting.
[0108] Step S5053, using the second frame and the fourth frame after the second frame in which the three-dimensional coordinates of the badminton are present, the initial speed and initial position of the hitting ball are calculated, and the hitting trajectory is obtained by fitting.
[0109] Step S5054, based on the incoming ball trajectory and the hitting ball trajectory, determine the closest point between the incoming ball trajectory and the hitting ball trajectory as the actual hitting point.
[0110] Step S5055, using the displacement / time difference method, based on the real hitting point and the real hitting moment, the badminton hitting speed is calculated.
[0111] In one example, after obtaining the first preset hitting window of 21 frames, the hitting speed is calculated using the first preset hitting window, where it is assumed that the 11th frame is the hitting frame, the 11-a frame is the last moment before the hitting frame when the three-dimensional coordinates of the badminton are reconstructed, and 11+b is the next moment after the hitting frame when the three-dimensional coordinates of the badminton are reconstructed, then the actual hitting moment should be between the 11-a frame and the 11+b frame.
[0112] In order to fit the accurate hitting moment, it is necessary to simulate the movement of badminton. In order to simplify the model, it is assumed that badminton is only affected by gravity and air resistance during flight, the air resistance is proportional to the square of the speed and the direction is always opposite to the speed direction, and the air resistance coefficient is a constant. Enumerate the two adjacent frames with reconstructed three-dimensional coordinates of the badminton before the 11th frame, and use the coordinates and time difference of these two frames to calculate the initial speed and initial position, and you can get up to 10 incoming ball trajectories, where the initial position is the three-dimensional coordinates of the badminton reconstructed in the previous frame, and the initial speed is the displacement / time difference. Enumerate the two adjacent frames with reconstructed three-dimensional coordinates of the badminton after 11 frames, and use the coordinates and time difference of these two frames to reverse the initial speed and initial position at the moment of hitting the ball, and you can get up to 10 hitting trajectories. Enumerate the incoming ball trajectory and the hitting trajectory, and the closest point of the two trajectories closest to the fitted hitting point is the real hitting point. Use the real hitting point and the fitted real hitting moment as the starting point to calculate the hitting speed.
[0113] In this method, the real hitting moment is determined, the incoming ball trajectory and the hitting trajectory are fitted, the real hitting point is determined using the incoming ball trajectory and the hitting trajectory, and the badminton hitting speed is calculated using the real hitting moment and the real hitting point. This realizes real-time calculation of the badminton hitting speed and avoids the difficulty in calculating the hitting speed due to the poor quality of reconstruction results of ordinary cameras.
[0114] Step S506, multiplying the hitting speed by a preset empirical coefficient to obtain a final hitting speed.
[0115] In one example, because the badminton will roll within one frame after hitting the ball, this will cause a sharp drop in speed, and the speed estimated based on the motion state can only get the hitting speed after rolling. In order to compensate for this error, the ball speed needs to be corrected upward. The obtained speed is multiplied by an empirical coefficient of 1.1 to 1.35. The faster the shot speed, the smaller the coefficient, and the final hitting speed is obtained.
[0116] In this method, the badminton will roll within one frame after hitting the ball, which will cause a sharp drop in speed. The speed estimated based on the motion state can only get the hitting speed after rolling. In order to compensate for this error, the final hitting speed is obtained by multiplying the hitting speed by a preset empirical coefficient, so that the calculated final hitting speed is closer to the actual hitting speed.
[0117] The badminton hitting speed calculation method provided in this embodiment determines whether there are reconstructed three-dimensional coordinates of the badminton in each frame within the first preset time window. When there are reconstructed three-dimensional coordinates of the badminton, determine whether the three-dimensional coordinates of the badminton in each frame of the court image are the maximum or minimum values of the x coordinate, determine the potential hitting point, traverse the badminton three-dimensional coordinate set to obtain a potential hitting point set, and facilitate the subsequent use of the potential hitting point set to screen the hitting points, and then facilitate the fitting of the hitting speed. By determining whether the potential hitting point meets all preset hitting point screening rules, when the potential hitting point meets all preset hitting point screening rules, determine the potential hitting point as the hitting point, traverse the potential hitting point set to obtain the hitting point set, and facilitate the subsequent use of the hitting point to fit the hitting speed, further improving the accuracy of the hitting speed calculation. By determining the real hitting moment, fitting the incoming ball trajectory and the hitting trajectory, using the incoming ball trajectory and the hitting trajectory to determine the real hitting point, and using the real hitting moment and the real hitting point to calculate the badminton hitting speed, the real-time calculation of the badminton hitting speed is achieved, avoiding the difficulty in calculating the hitting speed caused by the poor quality of the reconstruction results of ordinary cameras. The badminton will roll within one frame after hitting the ball, which will cause a sharp drop in speed, and the speed estimated based on the motion state can only get the hitting speed after rolling. In order to compensate for this error, the final hitting speed is obtained by multiplying the hitting speed by the preset empirical coefficient, so that the calculated final hitting speed is closer to the real hitting speed.
[0118] In the present embodiment, a badminton hitting speed calculating device is also provided, and the device is used to realize the above-mentioned embodiment and preferred implementation mode, and the description has been made no further. As used below, the term "module" can realize the combination of software and / or hardware of the predetermined function. Although the device described in the following embodiments is preferably realized with software, the realization of hardware, or the combination of software and hardware is also possible and conceived.
[0119] This embodiment provides a badminton hitting speed calculation device, such as Figure 6 As shown, including:
[0120] The image acquisition module 601 is used to acquire the court image acquired by the image acquisition device, and the court image includes the badminton in the court. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0121] The 3D coordinate reconstruction module 602 is used to input the court image into the pre-trained object detection model, detect the position of the badminton in each frame of the court image, and reconstruct the 3D coordinates of the badminton corresponding to the badminton position using the internal and external parameters of the image acquisition device. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0122] The potential hitting point screening module 603 is used to determine the initial hitting time based on the three-dimensional coordinates of the badminton, and screen the three-dimensional coordinate set of the badminton in each frame between the first preset time window frame before the initial hitting time and the initial hitting time to obtain a potential hitting point set. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0123] The hitting point screening module 604 is used to screen the potential hitting point set based on the preset hitting point screening rules to obtain the hitting point set. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.
[0124] The hitting speed calculation module 605 is used to use the hitting point set and the first preset time window frame to fit the real hitting moment, the incoming ball trajectory and the hitting trajectory, determine the real hitting point based on the incoming ball trajectory and the hitting trajectory, and calculate the badminton hitting speed based on the real hitting point and the real hitting moment. For details, please refer to Figure 1 Step S105 of the illustrated embodiment will not be described in detail here.
[0125] In some optional implementations, the badminton hitting speed calculation device further includes:
[0126] The badminton three-dimensional coordinate screening unit is used to use a preset screening logic to screen out the only three-dimensional badminton coordinate in the current frame court image when reconstructing multiple three-dimensional badminton coordinates in the current frame court image.
[0127] In some optional implementations, the three-dimensional coordinates of the badminton at the initial hitting moment are the three-dimensional coordinates of the badminton with the smallest x coordinate or the largest x coordinate in the badminton three-dimensional coordinate set, and the potential hitting point screening module 603 includes:
[0128] The badminton three-dimensional coordinate judgment unit is used to judge whether the badminton three-dimensional coordinate exists in each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment.
[0129] The extreme point judgment unit is used to judge whether the badminton three-dimensional coordinates in the current frame are the badminton three-dimensional coordinates with the smallest x coordinate or the largest x coordinate in the badminton three-dimensional coordinate set of each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment when the badminton three-dimensional coordinates exist in the current frame.
[0130] The potential hitting point determination unit is used to determine that the current frame is a potential hitting point when the badminton three-dimensional coordinates in the current frame are the badminton three-dimensional coordinates with the smallest x coordinate or the largest x coordinate in the badminton three-dimensional coordinate set of each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment, and determine the hitting direction corresponding to the potential hitting point.
[0131] The potential hitting point set traversal unit is used to traverse the badminton three-dimensional coordinate set of each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment, until the badminton three-dimensional coordinate set traversal is completed to obtain the potential hitting point set.
[0132] In some optional implementations, the preset hitting point screening rules include that the interval between the current potential hitting point and the previous potential hitting point is greater than the second preset time window frame, the hitting direction of the current potential hitting point is opposite to the hitting direction of the previous potential hitting point, the height of the current potential hitting point from the ground is greater than the preset height, the current potential hitting point is in the court, there is at least one badminton three-dimensional coordinate between the second preset time window frame after the current potential hitting point and the current potential hitting point, and the second preset time window frame is half of the first preset time window frame; the hitting point screening module 604 includes:
[0133] The screening rule judgment unit is used to judge whether the current potential hitting point meets all preset hitting point screening rules.
[0134] The hitting point determination unit is used to determine the current potential hitting point as the hitting point when the current potential hitting point meets all preset hitting point screening rules, traverse the potential hitting point set until the traversal of the potential hitting point set is completed, and obtain the hitting point set.
[0135] In some optional implementations, the ball hitting speed calculation module 605 includes:
[0136] The hitting moment fitting unit is used to determine the first frame with three-dimensional coordinates of the badminton before the current hitting point and the second frame with three-dimensional coordinates of the badminton after the current hitting point based on the first preset time window frame, and determine the real hitting moment based on the fitting of the first frame and the second frame.
[0137] The incoming ball trajectory fitting unit is used to calculate the initial speed and initial position of the incoming ball by using the first frame and the third frame before the first frame in which the three-dimensional coordinates of the badminton exist, and to fit the incoming ball trajectory.
[0138] The hitting trajectory fitting unit is used to calculate the initial speed and initial position of the hitting ball by using the second frame and the fourth frame after the second frame in which the three-dimensional coordinates of the badminton exist, and to fit the hitting trajectory.
[0139] The real hitting point determination unit is used to determine the closest point between the incoming ball trajectory and the hitting ball trajectory as the real hitting point based on the incoming ball trajectory and the hitting ball trajectory.
[0140] The hitting speed calculation unit is used to calculate the badminton hitting speed based on the real hitting point and the real hitting moment by using the displacement / time difference method.
[0141] In some optional implementations, the badminton hitting speed calculation device further includes:
[0142] The speed correction unit is used to multiply the batting speed by a preset empirical coefficient to obtain a final batting speed.
[0143] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0144] The badminton hitting speed calculation device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0145] The embodiment of the present invention also provides a computer device having the above Figure 6 The badminton hitting speed calculating device shown.
[0146] See also Figure 7 , Figure 7 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 7As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.
[0147] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0148] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0149] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0150] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0151] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 7 The example of connecting through bus is taken in the following.
[0152] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0153] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0154] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0155] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A badminton hitting speed calculation method, characterized in that: The method comprises: Acquire a court image acquired by an image acquisition device, wherein the court image includes a badminton in the court; Input the court image into a pre-trained object detection model, detect the position of the badminton in each frame of the court image, and reconstruct the three-dimensional coordinates of the badminton corresponding to the position of the badminton using the internal and external parameters of the image acquisition device; Based on the three-dimensional coordinates of the badminton, an initial hitting moment is determined, and a set of three-dimensional coordinates of the badminton in each frame between a first preset time window frame before the initial hitting moment and the initial hitting moment is screened to obtain a set of potential hitting points; Based on a preset hitting point screening rule, the potential hitting point set is screened to obtain a hitting point set; The hitting point set and the first preset time window frame are used to fit the real hitting moment, the incoming ball trajectory and the hitting trajectory. The real hitting point is determined based on the incoming ball trajectory and the hitting trajectory. The badminton hitting speed is calculated based on the real hitting point and the real hitting moment.
2. The method according to claim 1, characterized in that After reconstructing the three-dimensional coordinates of the badminton corresponding to the position of the badminton using the internal and external parameters of the image acquisition device, the method further includes: When a plurality of three-dimensional coordinates of badminton balls are reconstructed in the court image of the current frame, a unique three-dimensional coordinate of the badminton ball in the court image of the current frame is screened using a preset screening logic.
3. The method according to claim 1, characterized in that The three-dimensional coordinates of the badminton at the initial hitting moment are the three-dimensional coordinates of the badminton with the smallest x coordinate or the largest x coordinate in the three-dimensional coordinate set of the badminton, and the three-dimensional coordinate set of the badminton in each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment is screened to obtain a set of potential hitting points, including: Determine whether there is a three-dimensional coordinate of the badminton in each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment; When the three-dimensional coordinates of the badminton exist in the current frame, determining whether the three-dimensional coordinates of the badminton in the current frame are the three-dimensional coordinates of the badminton with the smallest x coordinate or the largest x coordinate in the three-dimensional coordinate set of the badminton in each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment; The three-dimensional coordinates of the badminton in the current frame are the three-dimensional coordinates of the badminton with the smallest x coordinate or the largest x coordinate in the three-dimensional coordinate set of the badminton in each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment, determining the current frame as a potential hitting point, and determining the hitting direction corresponding to the potential hitting point; The badminton three-dimensional coordinate set of each frame between the first preset time window frame before the initial hitting moment and the initial hitting moment is traversed until the badminton three-dimensional coordinate set is traversed to obtain the potential hitting point set.
4. The method according to claim 3, characterized in that The preset hitting point screening rules include that the interval between the current potential hitting point and the previous potential hitting point is greater than the second preset time window frame, the hitting direction of the current potential hitting point is opposite to the hitting direction of the previous potential hitting point, the height of the current potential hitting point from the ground is greater than a preset height, the current potential hitting point is within the court, there is at least one three-dimensional coordinate of the badminton between the second preset time window frame after the current potential hitting point and the current potential hitting point, and the second preset time window frame is half of the first preset time window frame; The step of screening the potential hitting point set based on the preset hitting point screening rule to obtain the hitting point set includes: Determining whether the current potential hitting point satisfies all the preset hitting point screening rules; When the current potential hitting point satisfies all the preset hitting point screening rules, the current potential hitting point is determined to be the hitting point, and the potential hitting point set is traversed until the traversal of the potential hitting point set is completed to obtain the hitting point set.
5. The method according to claim 1, characterized in that: The method of fitting a real hitting moment, an incoming ball trajectory and a hitting trajectory by using the hitting point set and the first preset time window frame, determining a real hitting point based on the incoming ball trajectory and the hitting trajectory, and calculating a badminton hitting speed based on the real hitting point and the real hitting moment includes: Based on the first preset time window frame, determine a first frame before the current hitting point where the three-dimensional coordinates of the badminton exist and a second frame after the current hitting point where the three-dimensional coordinates of the badminton exist, and determine the real hitting moment based on fitting of the first frame and the second frame; Using the first frame and a third frame before the first frame in which the three-dimensional coordinates of the badminton are stored, the initial speed and initial position of the incoming ball are calculated, and the trajectory of the incoming ball is obtained by fitting; Using the second frame and the fourth frame after the second frame in which the three-dimensional coordinates of the badminton are present, the initial speed and initial position of the hitting ball are calculated, and the hitting trajectory is obtained by fitting; Based on the incoming ball trajectory and the hitting ball trajectory, determining the closest point between the incoming ball trajectory and the hitting ball trajectory as the real hitting point; The badminton hitting speed is calculated based on the real hitting point and the real hitting moment by using the displacement / time difference method.
6. The method according to claim 1, characterized in that The method further includes: multiplying the hitting speed by a preset empirical coefficient to obtain a final hitting speed.
7. A badminton hitting speed calculation device, characterized in that: The device comprises: An image acquisition module, used to acquire a court image acquired by an image acquisition device, wherein the court image includes a badminton in the court; A three-dimensional coordinate reconstruction module is used to input the court image into a pre-trained object detection model, detect the position of the badminton in each frame of the court image, and reconstruct the three-dimensional coordinates of the badminton corresponding to the position of the badminton using the internal and external parameters of the image acquisition device; A potential hitting point screening module is used to determine an initial hitting moment based on the three-dimensional coordinates of the badminton, and screen a set of three-dimensional coordinates of the badminton in each frame between a first preset time window frame before the initial hitting moment and the initial hitting moment to obtain a set of potential hitting points; A hitting point screening module, used for screening the potential hitting point set based on a preset hitting point screening rule to obtain a hitting point set; The hitting speed calculation module is used to use the hitting point set and the first preset time window frame to fit the real hitting moment, the incoming ball trajectory and the hitting trajectory, determine the real hitting point based on the incoming ball trajectory and the hitting trajectory, and calculate the badminton hitting speed based on the real hitting point and the real hitting moment.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the badminton hitting speed calculation method according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the badminton hitting speed calculation method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to enable a computer to execute the badminton hitting speed calculation method according to any one of claims 1 to 6.
Citation Information
Cited By
Real-time tennis ball speed calculation method and system based on sliding window
CN121074080A