Table tennis serve penalty auxiliary detection method and auxiliary detection system based on video recognition
Through high-speed camera acquisition and deep learning network analysis of the motion and rotation trajectories of table tennis balls, combined with computer vision technology, the problem of misjudgment under the influence of rotation speed in the existing technology is solved, and more accurate serve decisions are achieved.
Patent Information
- Application Number
- CN202410418873.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-09
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-04-09
Smart Images

Figure CN118097516B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of table tennis serve detection, and in particular to a table tennis serve penalty auxiliary detection method and auxiliary detection system based on video recognition. Background Art
[0002] As a competitive sport, the technical development of table tennis is closely related to the restrictions of rules. The techniques used in the game must comply with the legality requirements of the rules. As for whether the rules are met, table tennis, like most competitive sports such as tennis and football, relies heavily on the subjective judgment of the referee. The subjective judgment of the referee is mostly based on experience. Due to the uncertainty and inaccuracy of experience judgment, it will more or less lead to some misjudgments, which will have a great impact on the progress and psychology of the athletes.
[0003] In the prior art, publication number CN106853289B discloses a table tennis serve referee auxiliary system based on video recognition, including a high-speed camera, an image acquisition card electrically connected to the high-speed camera, a host computer electrically connected to the image acquisition card, and a display screen electrically connected to the host computer. The present invention is used to calculate the height and angle of the serve of the athlete, so as to determine the legality of the serve, provide a certain scientific reference for the referee's judgment, and also provide an auxiliary basis for the athlete to question the referee's judgment.
[0004] However, there are still the following deficiencies. It can be seen from the above statements that the above-mentioned judgment of whether a table tennis serve is illegal by tossing the ball height and the tossing angle requires that when serving, the table tennis ball must rise by no less than 16 cm and be perpendicular to the tossing angle after leaving the palm of the hand not holding the racket. However, when playing table tennis, the table tennis ball must not have a high rotation speed when serving. When the table tennis ball has a high rotation speed, especially when serving with topspin, the ball will show a phenomenon called the "Magnus effect" during the rising process due to the influence of rotation. This effect will cause the flight trajectory of the ball to deviate, making the rising height of the ball appear to be higher than the actual rising height. If the referee or judge only relies on measuring the rising height to determine whether the serve is illegal, there is a high probability that the wrong conclusion will be drawn.
[0005] Therefore, the present application designs and improves a table tennis serve penalty auxiliary detection method and auxiliary detection system based on video recognition to study the rising height and rotation speed of the table tennis ball when serving, comprehensively judge whether the serve complies with regulations, and ensure accurate judgment of the serving behavior.
[0006] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not constitute the prior art that is already known to one of ordinary skill in the art. Summary of the invention
[0007] The purpose of the present invention is to provide a table tennis serve penalty auxiliary detection method and auxiliary detection system based on video recognition to solve the problems raised in the above background technology.
[0008] To achieve the above object, the present invention provides the following technical solutions:
[0009] A table tennis serve penalty auxiliary detection method based on video recognition, the specific steps include:
[0010] S1. The motion trajectory and rotation trajectory of the table tennis ball during the Nth and N+1th serves are collected by a high-speed camera, the motion trajectory of the table tennis ball is analyzed, the height of the table tennis ball during the Nth and N+1th serves is obtained, and the rotation trajectory of the table tennis ball is analyzed to obtain the rotation speed of the table tennis ball during the Nth and N+1th serves;
[0011] S2. marking the heights of the table tennis ball when it is served N times and the rotation speed of the table tennis ball, marking the height of the table tennis ball when it is served lower than the preset lower limit of the height of the table tennis ball as the lower value range of the height, marking the height of the table tennis ball when it is served higher than the preset lower limit of the height of the table tennis ball as the upper value range of the height, marking the rotation speed of the table tennis ball when it is served higher than the preset upper limit of the rotation speed of the table tennis ball as the upper value range of the rotation speed, and marking the rotation speed of the table tennis ball when it is served lower than the preset upper limit of the rotation speed of the table tennis ball as the lower value range of the rotation speed;
[0012] S3. The lower value range of the height and the upper value range of the height, and the upper value range of the rotation speed and the lower value range of the rotation speed are used as training sets, and the corresponding N times of the violation scoring coefficients of the height and the violation scoring coefficients of the rotation speed are used as labels, and input into the deep learning network for training;
[0013] S4. Input the height of the N+1th table tennis ball rise and the rotation speed of the table tennis ball into the model to obtain the violation scoring coefficient of the height of the N+1th table tennis ball and the violation scoring coefficient of the rotation speed;
[0014] S5. Compare the violation scoring coefficient of the height of the N+1th table tennis ball with the preset violation scoring coefficient threshold of the height, and compare the violation scoring coefficient of the rotation speed of the N+1th table tennis ball with the preset violation scoring coefficient threshold of the rotation speed to determine the violation of the table tennis serve.
[0015] Furthermore, the movement trajectory of the table tennis ball is analyzed and processed to obtain the rising height of the table tennis ball when the ball is served N times as follows:
[0016] Video preprocessing: preprocess the captured video, including adjusting the image brightness;
[0017] Table tennis ball detection: Use computer vision technology and tracking algorithms to detect the shape, color and movement direction of the table tennis ball, and identify and track the movement trajectory of the table tennis ball in the video;
[0018] Motion trajectory analysis: Analyze the motion trajectory of the table tennis ball in the video, including the calculation of distance, speed and acceleration. Determine the motion state of the table tennis ball, including the height of its ascent, by mathematically modeling and analyzing the time series data of the table tennis ball's motion trajectory.
[0019] Furthermore, the process of adjusting the image brightness through histogram equalization is as follows:
[0020] Calculate the histogram of the image to get the number of pixels at each gray level in the image. Select a frame of image from the acquired video as the processing object. The histogram of the image represents the distribution of the number of pixels at each gray level in the image. By counting the number of pixels at each gray level in the image, the histogram of the image is obtained.
[0021] Calculate the cumulative distribution function: After obtaining the histogram of the image, calculate the cumulative distribution function of the image. The cumulative distribution function represents the cumulative distribution of pixels at each gray level in the image, that is, the cumulative sum of the number of pixels at all gray levels before the current gray level;
[0022] Remap the pixel values of the image: Remap the pixel values of the image according to the cumulative distribution function of the histogram, normalize the cumulative distribution function so that it ranges between 0 and 1, find the corresponding cumulative distribution function value for each pixel value in the image according to its original grayscale level, and multiply the cumulative distribution function value by the maximum grayscale level to get the new pixel value;
[0023] Apply new pixel values to the image: Apply the calculated new pixel values to the original image to complete the image equalization. The pixel values in the image will be adjusted according to the remapping rules.
[0024] Furthermore, in the table tennis ball detection, computer vision technology and tracking algorithms are used to detect the shape, color and movement direction characteristics of the table tennis ball, and the process of identifying and tracking the movement trajectory of the table tennis ball in the video is as follows:
[0025] Video frame segmentation: decompose the captured video into a series of continuous image frames, each frame is a still image;
[0026] Background modeling: In the video, the ping-pong ball is the moving target, while the background is static. Through background modeling technology, the background is extracted from the image to show the movement trajectory of the ping-pong ball.
[0027] Target tracking: When a ping-pong ball is detected, its trajectory in the video sequence is tracked, and its position in the next frame is predicted using a Kalman filter based on its position and appearance in consecutive frames.
[0028] Trajectory reconstruction: By tracking the continuous position of the ping-pong ball in the video, its temporal trajectory is reconstructed. The motion trajectory is used to analyze the motion state of the ping-pong ball.
[0029] Further, the process of analyzing the motion trajectory and determining the height of the table tennis ball is as follows;
[0030] Data acquisition: Obtain video data of table tennis, and mark the bounding box coordinates of the area where the table tennis ball is located in each frame. Based on the deep learning target detection algorithm, extract the motion trajectory data of the table tennis ball from the video;
[0031] Distance calculation: Based on the trajectory data, the position of the ping-pong ball at each time point is calculated by calculating the distance between the current position of the ping-pong ball and the previous position, and accumulating the calculation;
[0032] Speed calculation: Based on the calculated position data, the speed of the table tennis ball at each time point is calculated. The speed is obtained by calculating the displacement of the table tennis ball between adjacent time points and dividing it by the time interval.
[0033] Acceleration calculation: Based on the calculated velocity data, calculate the acceleration of the table tennis ball at each time point. The acceleration is obtained by calculating the velocity change rate of the table tennis ball between adjacent time points.
[0034] Height determination: By analyzing the motion trajectory data of the table tennis ball, the highest point of the table tennis ball's rise is found. The highest point is usually the position when the speed is zero, that is, the position where the table tennis ball reaches the maximum speed and begins to fall during the rise. By finding the zero speed point in the speed data and obtaining its corresponding position, the height of the highest point is determined.
[0035] Furthermore, the rotation trajectory of the table tennis ball is analyzed and processed to obtain the rotation speed of the table tennis ball during N serves as follows:
[0036] Video frame extraction: extract each frame of image from the captured video;
[0037] Ping-pong ball detection: In each frame, the position of the ping-pong ball is detected through a deep learning algorithm;
[0038] Rotation trajectory extraction: Based on the detection of the position of the table tennis ball, the rotation trajectory of the table tennis ball is extracted using image processing technology;
[0039] Rotation speed calculation: Based on the extracted rotation trajectory data, the rotation speed of the table tennis ball during N serves is calculated. The rotation speed is obtained by the angle change and time interval between adjacent time points.
[0040] Further, the height of the table tennis ball rising during the serve is lower than the preset lower limit of the height of the table tennis ball rising, which is marked as the lower value range of the height, and the height of the table tennis ball rising during the serve is higher than the preset lower limit of the height of the table tennis ball rising, which is marked as the upper value range of the height as follows:
[0041] Setting the lower limit of the height: Determine the lower limit of the height of the table tennis ball when serving. This value is pre-set according to table tennis rules and competition standards. The lower limit of the height is the minimum height that the table tennis ball must reach when serving.
[0042] Setting the lower range of height: Compare the obtained N times of table tennis ball rising height with the preset lower limit of height. When the height is lower than the set lower limit of height, mark it as the lower range of height. When the height is higher than the set lower limit of height, mark it as the upper range of height.
[0043] Setting the upper limit of the rotation speed: determining the upper limit of the rotation speed of the table tennis ball when serving. This value is pre-set according to table tennis rules and competition standards. The upper limit of the rotation speed is the maximum rotation speed that the table tennis ball must reach when serving.
[0044] Setting the lower range of rotation speed: Compare the rotation speeds of the ping-pong balls obtained N times with the preset lower limit of rotation speed. When the rotation speed is higher than the set upper limit of rotation speed, mark it as the upper range of rotation speed. When the rotation speed is lower than the set upper limit of rotation speed, mark it as the lower range of rotation speed.
[0045] Furthermore, the deep learning network is composed of a deep neural network based on a multilayer perceptron, and the deep neural network of the multilayer perceptron includes an input layer, a first hidden layer, a second hidden layer, a third hidden layer and an output layer. The first hidden layer, the second hidden layer and the third hidden layer each have at least two neurons, and each uses ReLU as an activation function.
[0046] Further, the violation scoring coefficient of the height of the N+1th table tennis ball is compared with the preset violation scoring coefficient threshold of the height, and the violation scoring coefficient of the rotation speed of the table tennis ball is compared with the preset violation scoring coefficient threshold of the rotation speed. The process of judging the violation of the table tennis serve is as follows:
[0047] When the high violation score coefficient Violation score factor threshold for height, violation score factor for rotation speed The threshold of the illegal scoring coefficient of the rotation speed is used to determine whether the height of the table tennis ball is illegal or the rotation speed of the table tennis ball is illegal;
[0048] When both the height violation and the rotation speed violation are in place, the table tennis serve is definitely in violation;
[0049] When the high violation score coefficient Violation score factor threshold for height or violation score factor for rotation speed The illegal scoring coefficient threshold of the rotation speed is used to determine whether the table tennis ball is in violation of the height or rotation speed;
[0050] When the height is violated, but the rotation speed is not violated, then the table tennis serve is definitely violated;
[0051] When the height is not in violation, but the rotation speed is in violation, it is not certain whether the table tennis serve is in violation;
[0052] When the high violation score coefficient Violation score factor threshold for height, violation score factor for rotation speed The violation scoring coefficient threshold of the rotation speed determines that the height of the table tennis ball is not in violation of the rules and the rotation speed of the table tennis ball is not in violation of the rules;
[0053] When neither the height violation nor the rotation speed violation occurs, then the table tennis serve is determined to be non-violation.
[0054] A table tennis serve penalty auxiliary detection system based on video recognition, the system executing any of the table tennis serve penalty auxiliary detection methods based on video recognition described above, comprising:
[0055] A data acquisition module is used to collect the motion trajectory and rotation trajectory of the table tennis ball during the Nth and N+1th serves through a high-speed camera, analyze the motion trajectory of the table tennis ball, obtain the height of the table tennis ball during the Nth and N+1th serves, and analyze the rotation trajectory of the table tennis ball to obtain the rotation speed of the table tennis ball during the Nth and N+1th serves;
[0056] a feature marking module, for marking the height of the table tennis ball when the table tennis ball is served N times and the rotation speed of the table tennis ball, marking the height of the table tennis ball when the table tennis ball is served lower than a preset lower limit of the height of the table tennis ball as a lower value range of the height, marking the height of the table tennis ball when the table tennis ball is served higher than a preset lower limit of the height of the table tennis ball as an upper value range of the height, marking the rotation speed of the table tennis ball when the table tennis ball is served higher than a preset upper limit of the rotation speed of the table tennis ball as an upper value range of the rotation speed, and marking the rotation speed of the table tennis ball when the table tennis ball is served lower than a preset upper limit of the rotation speed of the table tennis ball as a lower value range of the rotation speed;
[0057] A model building module, used to use the N times lower value range of the height and the upper value range of the height, and the N times upper value range of the rotation speed and the lower value range of the rotation speed as training sets, and the corresponding N times violation scoring coefficients of the height and the violation scoring coefficients of the rotation speed as labels, and input them into the deep learning network for training;
[0058] A coefficient acquisition module, used to input the height of the N+1th table tennis ball rise and the rotation speed of the table tennis ball into the model, and obtain the violation scoring coefficient of the height of the N+1th table tennis ball and the violation scoring coefficient of the rotation speed;
[0059] The judgment module is used to compare the violation scoring coefficient of the height of the N+1th table tennis ball with a preset violation scoring coefficient threshold of the height, and compare the violation scoring coefficient of the rotation speed of the N+1th table tennis ball with a preset violation scoring coefficient threshold of the rotation speed to judge the violation of the table tennis serve.
[0060] Compared with the prior art, the present invention has the following beneficial effects:
[0061] The present invention collects the motion trajectory and rotation trajectory of a table tennis ball when serving N times by a high-speed camera, analyzes the motion trajectory of the table tennis ball, obtains the height of the table tennis ball when serving N times, analyzes the rotation trajectory of the table tennis ball, obtains the rotation speed of the table tennis ball when serving N times, marks the height of the table tennis ball when serving N times and the rotation speed of the table tennis ball, respectively marking them as a lower value range of the height, an upper value range of the height, an upper value range of the rotation speed and a lower value range of the rotation speed, and demarcates the height and rotation speed of the table tennis ball when serving. Range, the lower value range of height, the upper value range of height, the upper value range of rotation speed and the lower value range of rotation speed are taken as training sets, and the violation scoring coefficients of rising height and rotation speed are taken as labels. Through the deep learning network, the violation scoring coefficients of rising height and rotation speed of table tennis are obtained, and the violation scoring coefficients of rising height and rotation speed are comprehensively analyzed to ensure the accuracy of the penalty of rising height when serving, provide assistance for the referee's penalty, and improve the accuracy of penalty for table tennis serve violations. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 It is a schematic diagram of the method flow of the present invention;
[0063] Figure 2 It is a block diagram of the module composition of the present invention; DETAILED DESCRIPTION
[0064] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.
[0065] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0066] Example:
[0067] See also Figure 1 to Figure 2 , the present invention provides a technical solution:
[0068] A table tennis serve penalty auxiliary detection method based on video recognition, such as Figure 1 As shown, the specific steps include:
[0069] S1. The motion trajectory and rotation trajectory of the table tennis ball during the Nth and N+1th serves are collected by a high-speed camera, the motion trajectory of the table tennis ball is analyzed, the height of the table tennis ball during the Nth and N+1th serves is obtained, and the rotation trajectory of the table tennis ball is analyzed to obtain the rotation speed of the table tennis ball during the Nth and N+1th serves;
[0070] S2. marking the heights of the table tennis ball when it is served N times and the rotation speed of the table tennis ball, marking the height of the table tennis ball when it is served lower than the preset lower limit of the height of the table tennis ball as the lower value range of the height, marking the height of the table tennis ball when it is served higher than the preset lower limit of the height of the table tennis ball as the upper value range of the height, marking the rotation speed of the table tennis ball when it is served higher than the preset upper limit of the rotation speed of the table tennis ball as the upper value range of the rotation speed, and marking the rotation speed of the table tennis ball when it is served lower than the preset upper limit of the rotation speed of the table tennis ball as the lower value range of the rotation speed;
[0071] S3. The lower value range of the height and the upper value range of the height, and the upper value range of the rotation speed and the lower value range of the rotation speed are used as training sets, and the corresponding N times of the violation scoring coefficients of the height and the violation scoring coefficients of the rotation speed are used as labels, and input into the deep learning network for training;
[0072] S4. Input the height of the N+1th table tennis ball rise and the rotation speed of the table tennis ball into the model to obtain the violation scoring coefficient of the height of the N+1th table tennis ball and the violation scoring coefficient of the rotation speed;
[0073] S5. Compare the violation scoring coefficient of the height of the N+1th table tennis ball with the preset violation scoring coefficient threshold of the height, and compare the violation scoring coefficient of the rotation speed of the N+1th table tennis ball with the preset violation scoring coefficient threshold of the rotation speed to determine the violation of the table tennis serve.
[0074] In this embodiment, the motion trajectory and rotation trajectory of the table tennis ball during the Nth and N+1th serves are collected, where N is greater than or equal to 1.
[0075] When playing table tennis, on the one hand, when serving, the table tennis ball must rise no less than 16 cm after leaving the palm of the non-racquet hand, otherwise it will be penalized for serving illegally; on the other hand, when serving, the ball needs to be thrown up almost vertically by hand, and the ball must not be rotated. When the table tennis ball has a high rotation speed, especially when serving with topspin, the ball will show a phenomenon called "Magnus effect" due to the influence of rotation during the rising process. This effect will cause the flight trajectory of the ball to deviate, making the ball appear to rise higher than the actual rise height. If the referee or judge only relies on measuring the rise height to determine whether the serve is illegal, he may come to the wrong conclusion that the serve is legal because the measured height meets the regulations, while the actual rise height is lower than the 16 cm stipulated in the competition.
[0076] Therefore, in this case, the referee or judge needs to consider the impact of the rotation speed of the table tennis ball on the measurement of the rising height to comprehensively judge whether the serve complies with the regulations, which can ensure a more accurate judgment on the serve behavior.
[0077] On the basis of the above embodiment, the motion trajectory of the table tennis ball is analyzed and processed to obtain the height of the table tennis ball when the ball is served N times as follows:
[0078] Video preprocessing: preprocess the captured video, including adjusting the image brightness;
[0079] Table tennis ball detection: Use computer vision technology and tracking algorithms to detect the shape, color and movement direction of the table tennis ball, and identify and track the movement trajectory of the table tennis ball in the video;
[0080] Motion trajectory analysis: Analyze the motion trajectory of the table tennis ball in the video, including the calculation of distance, speed and acceleration. By mathematically modeling and analyzing the time series data of the table tennis ball's motion trajectory, the motion state of the table tennis ball, including the height of its rise, can be determined.
[0081] Among them, the image brightness adjustment of the collected video can be performed through histogram equalization, and the process is as follows:
[0082] Calculate the histogram of the image to get the number of pixels at each gray level in the image. Select a frame of image from the acquired video as the processing object. The histogram of the image represents the distribution of the number of pixels at each gray level in the image. By counting the number of pixels at each gray level in the image, the histogram of the image can be obtained.
[0083] Calculate the cumulative distribution function of the histogram: After obtaining the histogram of the image, calculate the cumulative distribution function of the image. The cumulative distribution function represents the cumulative distribution of pixels at each gray level in the image, that is, the cumulative sum of the number of pixels at all gray levels before the current gray level;
[0084] Remap the pixel values of the image: Remap the pixel values of the image according to the cumulative distribution function of the histogram, normalize the cumulative distribution function so that it ranges between 0 and 1, find the corresponding cumulative distribution function value for each pixel value in the image according to its original grayscale level, and multiply the cumulative distribution function value by the maximum grayscale level to get the new pixel value;
[0085] Apply new pixel values to the image: Finally, the calculated new pixel values are applied to the original image to complete the image equalization. The pixel values in the image will be adjusted according to the remapping rules, making the brightness distribution of the overall image more uniform and the brightness is also improved.
[0086] In table tennis detection, computer vision technology and tracking algorithms can be used to identify and track the movement trajectory of table tennis in the video by detecting the shape, color and movement direction characteristics of the table tennis ball. The process is as follows:
[0087] Video frame segmentation: First, the captured video is decomposed into a series of continuous image frames, each of which is a still image;
[0088] Background modeling: In the video, the ping-pong ball is the moving target, while the background is static. Through background modeling technology, the background can be extracted from the image to highlight the movement trajectory of the ping-pong ball.
[0089] Object tracking: Once the ping-pong ball is detected, its trajectory in the video sequence needs to be tracked. Based on the position and appearance information of the ping-pong ball in consecutive frames, its position in the next frame is predicted through the Kalman filter.
[0090] Trajectory reconstruction: By tracking the continuous position of the ping-pong ball in the video, its temporal trajectory can be reconstructed. These trajectories can be used to analyze the motion state of the ping-pong ball, such as speed, acceleration, and rotation.
[0091] The process of analyzing the motion trajectory and determining the height to which the table tennis ball rises is as follows;
[0092] Data acquisition: Obtain video data of table tennis, and mark the bounding box coordinates of the area where the table tennis ball is located in each frame. Based on the deep learning target detection algorithm, extract the motion trajectory data of the table tennis ball from the video;
[0093] Distance calculation: Based on the trajectory data, the position of the ping-pong ball at each time point is calculated by calculating the distance between the current position of the ping-pong ball and the previous position, and accumulating the calculation;
[0094] Speed calculation: Based on the calculated position data, calculate the speed of the table tennis ball at each time point. The speed can be obtained by calculating the displacement of the table tennis ball between adjacent time points and dividing it by the time interval;
[0095] Acceleration calculation: Based on the calculated velocity data, calculate the acceleration of the table tennis ball at each time point. The acceleration can be obtained by calculating the velocity change rate of the table tennis ball between adjacent time points.
[0096] Height determination: By analyzing the motion trajectory data of the ping-pong ball, the highest point of the ping-pong ball's rise is found. The highest point is usually the position when the speed is zero, that is, the position where the ping-pong ball reaches the maximum speed and begins to fall during the rise. By finding the zero speed point in the speed data and obtaining its corresponding position, the height of the highest point can be determined.
[0097] On the basis of the above embodiment, the rotation trajectory of the table tennis ball is analyzed and processed to obtain the rotation speed of the table tennis ball during N serves as follows:
[0098] Video frame extraction: extract each frame of image from the captured video;
[0099] Ping-pong ball detection: In each frame, the position of the ping-pong ball is detected through a deep learning algorithm;
[0100] Rotation trajectory extraction: Based on the detection of the position of the table tennis ball, the rotation trajectory of the table tennis ball is extracted using image processing technology;
[0101] Rotation speed calculation: Based on the extracted rotation trajectory data, the rotation speed of the table tennis ball during N serves is calculated. The rotation speed can be obtained by analyzing the angle change between adjacent time points in the rotation trajectory of the table tennis ball and dividing it by the time interval.
[0102] On the basis of the above embodiment, the process of marking the height of the table tennis ball rising when serving is lower than the preset lower limit of the height of the table tennis ball rising as the lower value range of the height, and marking the height of the table tennis ball rising when serving is higher than the preset lower limit of the height of the table tennis ball rising as the upper value range of the height is as follows:
[0103] Setting the lower limit of height: First, determine the lower limit of the height of the table tennis ball when serving. This value can be pre-set according to table tennis rules and competition standards. It is usually a fixed value, indicating the minimum height that the table tennis ball must reach when serving to be considered a legal serve;
[0104] Setting the lower range of height: Compare the obtained N times of table tennis ball rising height with the preset lower limit of height. When the height is lower than the set lower limit of height, mark it as the lower range of height. When the height is higher than the set lower limit of height, mark it as the upper range of height.
[0105] Setting the upper limit of the rotation speed: First, determine the upper limit of the rotation speed of the table tennis ball when serving. This value can be pre-set according to table tennis rules and competition standards. It is usually a fixed value, indicating that the rotation speed of the table tennis ball when serving must be lower than this minimum speed to be considered a legal serve;
[0106] Setting the lower range of rotation speed: Compare the rotation speeds of the ping-pong balls obtained N times with the preset lower limit of rotation speed. When the rotation speed is higher than the set upper limit of rotation speed, mark it as the upper range of rotation speed. When the rotation speed is lower than the set upper limit of rotation speed, mark it as the lower range of rotation speed.
[0107] Based on the above embodiment, the deep learning network is composed of a deep neural network based on a multilayer perceptron, and the deep neural network of the multilayer perceptron includes an input layer, a first hidden layer, a second hidden layer, a third hidden layer and an output layer. The first hidden layer, the second hidden layer and the third hidden layer each have at least two neurons, and each uses ReLU as an activation function.
[0108] In this embodiment, the input features of the deep neural network of the multilayer perceptron include: a lower range of height and an upper range of height: 2 features, an upper range of rotation speed and a lower range of rotation speed: 2 features;
[0109] The structure of a deep neural network with a multilayer perceptron is:
[0110] Input layer**: receives input of 4 features;
[0111] The first hidden layer has 16 neurons and uses ReLU as the activation function.
[0112] The second hidden layer has 32 neurons and also uses the ReLU activation function.
[0113] The third hidden layer has 16 neurons and uses the ReLU activation function.
[0114] Output layer: has 2 neurons, outputs the violation score coefficient of the height of the ping-pong ball and the violation score coefficient of the rotation speed.
[0115] On the basis of the above embodiment, the illegal scoring coefficient of the height of the table tennis ball for the N+1th time is compared with the preset illegal scoring coefficient threshold of the height, and the illegal scoring coefficient of the rotation speed of the table tennis ball for the N+1th time is compared with the preset illegal scoring coefficient threshold of the rotation speed, and the process of judging the illegal situation of the table tennis serve is as follows:
[0116] When the high violation score coefficient Violation score factor threshold for height, violation score factor for rotation speed The threshold of the illegal scoring coefficient of the rotation speed is used to determine whether the height of the table tennis ball is illegal or the rotation speed of the table tennis ball is illegal;
[0117] When both the height violation and the rotation speed violation are in place, the table tennis serve is definitely in violation;
[0118] When the high violation score coefficient Violation score factor threshold for height or violation score factor for rotation speed The illegal scoring coefficient threshold of the rotation speed is used to determine whether the table tennis ball is in violation of the height or rotation speed;
[0119] When the height is violated, but the rotation speed is not violated, then the table tennis serve is definitely violated;
[0120] When the height is not in violation, but the rotation speed is in violation, it is not certain whether the table tennis serve is in violation;
[0121] When the high violation score coefficient Violation score factor threshold for height, violation score factor for rotation speed The violation scoring coefficient threshold of the rotation speed determines that the height of the table tennis ball is not in violation of the rules and the rotation speed of the table tennis ball is not in violation of the rules;
[0122] When neither the height violation nor the rotation speed violation occurs, then the table tennis serve is determined to be non-violation.
[0123] A table tennis serve penalty auxiliary detection system based on video recognition, the system executes any of the table tennis serve penalty auxiliary detection methods based on video recognition described above, such as Figure 2 As shown, including:
[0124] A data acquisition module is used to collect the motion trajectory and rotation trajectory of the table tennis ball during the Nth and N+1th serves through a high-speed camera, analyze the motion trajectory of the table tennis ball, obtain the height of the table tennis ball during the Nth and N+1th serves, and analyze the rotation trajectory of the table tennis ball to obtain the rotation speed of the table tennis ball during the Nth and N+1th serves;
[0125] a feature marking module, for marking the height of the table tennis ball when the table tennis ball is served N times and the rotation speed of the table tennis ball, marking the height of the table tennis ball when the table tennis ball is served lower than a preset lower limit of the height of the table tennis ball as a lower value range of the height, marking the height of the table tennis ball when the table tennis ball is served higher than a preset lower limit of the height of the table tennis ball as an upper value range of the height, marking the rotation speed of the table tennis ball when the table tennis ball is served higher than a preset upper limit of the rotation speed of the table tennis ball as an upper value range of the rotation speed, and marking the rotation speed of the table tennis ball when the table tennis ball is served lower than a preset upper limit of the rotation speed of the table tennis ball as a lower value range of the rotation speed;
[0126] A model building module, used to use the N times lower value range of the height and the upper value range of the height, and the N times upper value range of the rotation speed and the lower value range of the rotation speed as training sets, and the corresponding N times violation scoring coefficients of the height and the violation scoring coefficients of the rotation speed as labels, and input them into the deep learning network for training;
[0127] A coefficient acquisition module, used to input the height of the N+1th table tennis ball rise and the rotation speed of the table tennis ball into the model, and obtain the violation scoring coefficient of the height of the N+1th table tennis ball and the violation scoring coefficient of the rotation speed;
[0128] The judgment module is used to compare the violation scoring coefficient of the height of the N+1th table tennis ball with a preset violation scoring coefficient threshold of the height, and compare the violation scoring coefficient of the rotation speed of the N+1th table tennis ball with a preset violation scoring coefficient threshold of the rotation speed to judge the violation of the table tennis serve.
[0129] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product. Those skilled in the art may appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software methods depends on the specific application and design constraints of the technical solution.
[0130] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0131] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A table tennis serve penalty auxiliary detection method based on video recognition, characterized in that: The specific steps include: S1. The motion trajectory and rotation trajectory of the table tennis ball during the Nth and N+1th serves are collected by a high-speed camera, the motion trajectory of the table tennis ball is analyzed, the height of the table tennis ball during the Nth and N+1th serves is obtained, and the rotation trajectory of the table tennis ball is analyzed to obtain the rotation speed of the table tennis ball during the Nth and N+1th serves; S2. marking the heights of the table tennis ball when it is served N times and the rotation speed of the table tennis ball, marking the height of the table tennis ball when it is served lower than the preset lower limit of the height of the table tennis ball as the lower value range of the height, marking the height of the table tennis ball when it is served higher than the preset lower limit of the height of the table tennis ball as the upper value range of the height, marking the rotation speed of the table tennis ball when it is served higher than the preset upper limit of the rotation speed of the table tennis ball as the upper value range of the rotation speed, and marking the rotation speed of the table tennis ball when it is served lower than the preset upper limit of the rotation speed of the table tennis ball as the lower value range of the rotation speed; S3. The lower value range of the height and the upper value range of the height, and the upper value range of the rotation speed and the lower value range of the rotation speed are used as training sets, and the corresponding N times of the violation scoring coefficients of the height and the violation scoring coefficients of the rotation speed are used as labels, and input into the deep learning network for training; S4. Input the height of the N+1th table tennis ball rise and the rotation speed of the table tennis ball into the model to obtain the violation scoring coefficient of the height of the N+1th table tennis ball and the violation scoring coefficient of the rotation speed; S5. Compare the violation scoring coefficient of the height of the N+1th table tennis ball with the preset violation scoring coefficient threshold of the height, and compare the violation scoring coefficient of the rotation speed of the N+1th table tennis ball with the preset violation scoring coefficient threshold of the rotation speed to determine the violation of the table tennis serve.
2. The table tennis serve penalty auxiliary detection method based on video recognition according to claim 1, characterized in that: The process of analyzing and processing the motion trajectory of the table tennis ball and obtaining the height of the table tennis ball when the ball is served N times is as follows: Video preprocessing: preprocess the captured video, including adjusting the image brightness; Table tennis ball detection: Use computer vision technology and tracking algorithms to detect the shape, color and movement direction of the table tennis ball, and identify and track the movement trajectory of the table tennis ball in the video; Motion trajectory analysis: Analyze the motion trajectory of the table tennis ball in the video, including the calculation of distance, speed and acceleration. Determine the motion state of the table tennis ball, including the height of its ascent, by mathematically modeling and analyzing the time series data of the table tennis ball's motion trajectory.
3. The table tennis serve penalty auxiliary detection method based on video recognition according to claim 2 is characterized in that: The process of adjusting the image brightness through histogram equalization is as follows: Calculate the histogram of the image to get the number of pixels at each gray level in the image. Select a frame of image from the acquired video as the processing object. The histogram of the image represents the distribution of the number of pixels at each gray level in the image. By counting the number of pixels at each gray level in the image, the histogram of the image is obtained. Calculate the cumulative distribution function: After obtaining the histogram of the image, calculate the cumulative distribution function of the image. The cumulative distribution function represents the cumulative distribution of pixels at each gray level in the image, that is, the cumulative sum of the number of pixels at all gray levels before the current gray level; Remap the pixel values of the image: Remap the pixel values of the image according to the cumulative distribution function of the histogram, normalize the cumulative distribution function so that it ranges between 0 and 1, find the corresponding cumulative distribution function value for each pixel value in the image according to its original grayscale level, and multiply the cumulative distribution function value by the maximum grayscale level to get the new pixel value; Apply new pixel values to the image: Apply the calculated new pixel values to the original image to complete the image equalization. The pixel values in the image will be adjusted according to the remapping rules.
4. The table tennis serve penalty auxiliary detection method based on video recognition according to claim 2, characterized in that: In the table tennis ball detection, computer vision technology and tracking algorithms are used to detect the shape, color and movement direction characteristics of the table tennis ball, and the process of identifying and tracking the movement trajectory of the table tennis ball in the video is as follows: Video frame segmentation: decompose the captured video into a series of continuous image frames, each frame is a still image; Background modeling: In the video, the ping-pong ball is the moving target, while the background is static. Through background modeling technology, the background is extracted from the image to show the movement trajectory of the ping-pong ball. Target tracking: When a ping-pong ball is detected, its trajectory in the video sequence is tracked, and its position in the next frame is predicted using a Kalman filter based on its position and appearance in consecutive frames. Trajectory reconstruction: By tracking the continuous position of the ping-pong ball in the video, its temporal trajectory is reconstructed. The motion trajectory is used to analyze the motion state of the ping-pong ball.
5. The table tennis serve penalty auxiliary detection method based on video recognition according to claim 2, characterized in that: The process of analyzing the motion trajectory and determining the height to which the table tennis ball rises is as follows; Data acquisition: Obtain video data of table tennis, and mark the bounding box coordinates of the area where the table tennis ball is located in each frame. Based on the deep learning target detection algorithm, extract the motion trajectory data of the table tennis ball from the video; Distance calculation: Based on the trajectory data, the position of the ping-pong ball at each time point is calculated by calculating the distance between the current position of the ping-pong ball and the previous position, and accumulating the calculation; Speed calculation: Based on the calculated position data, the speed of the table tennis ball at each time point is calculated. The speed is obtained by calculating the displacement of the table tennis ball between adjacent time points and dividing it by the time interval. Acceleration calculation: Based on the calculated velocity data, calculate the acceleration of the table tennis ball at each time point. The acceleration is obtained by calculating the velocity change rate of the table tennis ball between adjacent time points. Height determination: By analyzing the motion trajectory data of the table tennis ball, the highest point of the table tennis ball's rise is found. The highest point is usually the position when the speed is zero, that is, the position where the table tennis ball reaches the maximum speed and begins to fall during the rise. The height is determined by finding the zero speed point in the speed data and obtaining its corresponding position.
6. The table tennis serve penalty auxiliary detection method based on video recognition according to claim 1, characterized in that: The process of analyzing and processing the rotation trajectory of the table tennis ball and obtaining the rotation speed of the table tennis ball during N serves is as follows: Video frame extraction: extract each frame of image from the captured video; Ping-pong ball detection: In each frame, the position of the ping-pong ball is detected through a deep learning algorithm; Rotation trajectory extraction: Based on the detection of the position of the table tennis ball, the rotation trajectory of the table tennis ball is extracted using image processing technology; Rotation speed calculation: Based on the extracted rotation trajectory data, the rotation speed of the table tennis ball during N serves is calculated. The rotation speed is obtained by the angle change and time interval between adjacent time points.
7. The table tennis serve penalty auxiliary detection method based on video recognition according to claim 1, characterized in that: The process of marking the height of the table tennis ball rising when serving as the ball is lower than the preset lower limit of the height of the table tennis ball rising as the lower value range of the height, and marking the height of the table tennis ball rising when serving as the ball is higher than the preset lower limit of the height of the table tennis ball rising as the upper value range of the height is as follows: Setting the lower limit of the height: Determine the lower limit of the height of the table tennis ball when serving. This value is pre-set according to table tennis rules and competition standards. The lower limit of the height is the minimum height that the table tennis ball must reach when serving. Setting the lower range of height: Compare the obtained N times of table tennis ball rising height with the preset lower limit of height. When the height is lower than the set lower limit of height, mark it as the lower range of height. When the height is higher than the set lower limit of height, mark it as the upper range of height. Setting the upper limit of the rotation speed: determining the upper limit of the rotation speed of the table tennis ball when serving. This value is pre-set according to table tennis rules and competition standards. The upper limit of the rotation speed is the maximum rotation speed that the table tennis ball must reach when serving. Setting the lower range of rotation speed: Compare the rotation speeds of the ping-pong balls obtained N times with the preset lower limit of rotation speed. When the rotation speed is higher than the set upper limit of rotation speed, mark it as the upper range of rotation speed. When the rotation speed is lower than the set upper limit of rotation speed, mark it as the lower range of rotation speed.
8. The table tennis serve penalty auxiliary detection method based on video recognition according to claim 1, characterized in that: The deep learning network is composed of a deep neural network based on a multilayer perceptron, and the deep neural network of the multilayer perceptron includes an input layer, a first hidden layer, a second hidden layer, a third hidden layer and an output layer. The first hidden layer, the second hidden layer and the third hidden layer each have at least two neurons, and each uses ReLU as an activation function.
9. The table tennis serve penalty auxiliary detection method based on video recognition according to claim 1, characterized in that: The process of comparing the illegal scoring coefficient of the height of the N+1th table tennis ball with the preset illegal scoring coefficient threshold of the height, and comparing the illegal scoring coefficient of the rotation speed of the N+1th table tennis ball with the preset illegal scoring coefficient threshold of the rotation speed, and judging the illegal situation of the table tennis serve is as follows: When the high violation score coefficient Violation score factor threshold for height, violation score factor for rotation speed The threshold of the illegal scoring coefficient of the rotation speed is used to determine whether the height of the table tennis ball is illegal or the rotation speed of the table tennis ball is illegal; When both the height violation and the rotation speed violation are in place, the table tennis serve is definitely in violation; When the high violation score coefficient Violation score factor threshold for height or violation score factor for rotation speed The illegal scoring coefficient threshold of the rotation speed is used to determine whether the table tennis ball is in violation of the height or rotation speed; When the height is violated, but the rotation speed is not violated, then the table tennis serve is definitely violated; When the height is not in violation, but the rotation speed is in violation, it is not certain whether the table tennis serve is in violation; When the high violation score coefficient Violation score factor threshold for height, violation score factor for rotation speed The violation scoring coefficient threshold of the rotation speed determines that the height of the table tennis ball is not in violation of the rules and the rotation speed of the table tennis ball is not in violation of the rules; When neither the height violation nor the rotation speed violation occurs, then the table tennis serve is determined to be non-violation.
10. A table tennis serve penalty auxiliary detection system based on video recognition, the system executing the table tennis serve penalty auxiliary detection method based on video recognition according to any one of claims 1 to 9, comprising: A data acquisition module is used to collect the motion trajectory and rotation trajectory of the table tennis ball during the Nth and N+1th serves through a high-speed camera, analyze the motion trajectory of the table tennis ball, obtain the height of the table tennis ball during the Nth and N+1th serves, and analyze the rotation trajectory of the table tennis ball to obtain the rotation speed of the table tennis ball during the Nth and N+1th serves; a feature marking module, for marking the height of the table tennis ball when the table tennis ball is served N times and the rotation speed of the table tennis ball, marking the height of the table tennis ball when the table tennis ball is served lower than a preset lower limit of the height of the table tennis ball as a lower value range of the height, marking the height of the table tennis ball when the table tennis ball is served higher than a preset lower limit of the height of the table tennis ball as an upper value range of the height, marking the rotation speed of the table tennis ball when the table tennis ball is served higher than a preset upper limit of the rotation speed of the table tennis ball as an upper value range of the rotation speed, and marking the rotation speed of the table tennis ball when the table tennis ball is served lower than a preset upper limit of the rotation speed of the table tennis ball as a lower value range of the rotation speed; A model building module, used to use the N times lower value range of the height and the upper value range of the height, and the N times upper value range of the rotation speed and the lower value range of the rotation speed as training sets, and the corresponding N times violation scoring coefficients of the height and the violation scoring coefficients of the rotation speed as labels, and input them into the deep learning network for training; A coefficient acquisition module, used to input the height of the N+1th table tennis ball rise and the rotation speed of the table tennis ball into the model, and obtain the violation scoring coefficient of the height of the N+1th table tennis ball and the violation scoring coefficient of the rotation speed; The judgment module is used to compare the violation scoring coefficient of the height of the N+1th table tennis ball with a preset violation scoring coefficient threshold of the height, and compare the violation scoring coefficient of the rotation speed of the N+1th table tennis ball with a preset violation scoring coefficient threshold of the rotation speed to judge the violation of the table tennis serve.
