Editing method and device for wonderful round video in table tennis playing process
Through binocular camera and multi-dimensional data analysis, the wonderful rounds of table tennis are identified, combined with YOLO and stereoscopic vision algorithms, and the problem of single dimensions and insufficient real-time performance in table tennis game analysis is solved, efficient and accurate video editing is achieved, and the viewing and editing efficiency of the video is improved.
Patent Information
- Application Number
- CN202510601804.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-08-12
AI Technical Summary
In the analysis of table tennis matches, the existing technology has problems such as single dimensions, insufficient real-timeness, lack of automatic generation of exciting round clips, and relying on manual annotation to lead to less dimensional information and low viewing of video data.
A binocular camera is used to collect left and right views of the table tennis match, combine the YOLO deep learning model and stereo vision algorithm to calculate the motion parameters, identify exciting rounds through multi-dimensional competition data, and record timestamp information, and finally extract the exciting round video from the original video.
It realizes efficient and accurate identification and editing of table tennis exciting round videos, improves the viewing and editing efficiency of the video, ensures the accuracy and completeness of clip extraction, and avoids the dependence of artificial experience.
Smart Images

Figure CN120475221A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of table tennis video editing, and in particular to a method and device for editing videos of exciting rounds in a table tennis match. Background Art
[0002] As a highly competitive sport, table tennis generates highly dynamic, complex, and real-time data during training and competition. Traditional table tennis training and match analysis relies primarily on manual observation and simple video replays. This not only relies on the director's experience, is inefficient and highly subjective, but also limits the replays to a single angle, making it difficult to provide multi-dimensional data analysis and hindering post-match analysis and review. While controversial shots can be reproduced using high-precision systems like the Hawk-Eye system, the high computing power required means each player has limited opportunities to request a replay. Furthermore, systems like the Hawk-Eye system are expensive, making them difficult to apply to low-level competitions.
[0003] In the prior art, patent CN 114862900 A proposes a table tennis motion analysis method that uses a monocular camera to capture table tennis match videos in real time. A detection network generates a ball position heat map, which is then interpolated and smoothed to obtain the ball's 2D trajectory. Patent CN 112085761 A proposes a table tennis motion trajectory identification, positioning, and tracking system and method. This system performs target recognition and spatial positioning on the captured images to generate data, which is then filtered and tracked to obtain the ball's trajectory information. Patent CN 213965069 U proposes a table tennis entertainment service system based on target detection and single-view scoring. This patent uses a high-speed industrial camera and monocular vision technology to detect the position of the table tennis ball in real time and generate match scores and timely voice broadcasts. While these solutions have achieved some success in table tennis training and match analysis, they still have drawbacks, primarily: a single dimensional approach focusing solely on the ball's trajectory, insufficient real-time performance, a response delay exceeding 200ms for traditional filtering algorithms, and an inability to automatically generate highlights.
[0004] Among other existing technologies, patent CN 110969133 A provides an intelligent data collection method for table tennis videos. It detects the game score / round score based on the pixel changes of the scoreboard, uses a convolutional neural network to construct a partial order relationship of the score, cuts the video into round segments, and then uses a convolutional neural network to further segment it into stages such as the game in progress and playback, and extracts the player skeleton. And uses background sound to identify the moment of hitting the ball. Patent CN110996178A provides an interactive data collection system for table tennis videos, which requires manual auxiliary data annotation, aiming to improve the accuracy of data annotation and the efficiency of data collection. The above method relies on manual, scoreboard, background sound and other elements for video annotation and segmentation, which has limitations, and the obtained video data has little dimensional information and cannot further purify the exciting round segments, so the obtained video is not very enjoyable. Patent CN109587518A provides a video editing method that can be used for table tennis video editing. However, this patent detects the motion trajectory and shot switching frequency in the video based on preset rules, and extracts clips that meet the threshold conditions as exciting clips. It only relies on fixed rules and simple visual features, lacks in-depth semantic understanding of complex scenes, and is prone to missing exciting rounds. Summary of the Invention
[0005] Purpose of the invention: In order to overcome the deficiencies in the prior art, the present invention provides a method and device for editing videos of exciting rounds in table tennis matches that have high processing efficiency and high editing accuracy, and the resulting videos are both entertaining and technical.
[0006] Technical solution: To achieve the above-mentioned purpose, the present invention provides a method for editing a video of a wonderful round in a table tennis match, the method comprising the following steps S101-S104:
[0007] Step S101, capturing left and right views of the table tennis game using a binocular camera. In this step, the binocular camera is an industrial camera with a frame rate of no less than 60 fps and a resolution of no less than 1280 × 720, and synchronous capture is achieved through hardware triggering.
[0008] Step S102, calculating motion parameters of the table tennis ball based on the left and right views, wherein the motion parameters include position coordinates and ball speed; the motion parameters may also include a motion trajectory;
[0009] Step S103, identifying highlight rounds based on one or more dimensions of match data, where the dimensions of the match data include table tennis kinematic data (including but not limited to position coordinates and speed), match round feature data (including but not limited to round duration, number of strokes, attack-defense transition frequency, tension characteristics, and landing point distribution), and player performance data (including but not limited to player movement amplitude, stroke action, and technique and tactics).
[0010] Step S104, recording the timestamp information of the exciting round, and saving the timestamp in a CSV file;
[0011] Step S105: Based on the timestamp information, a video clip is obtained from the original video to obtain the wonderful round video.
[0012] Furthermore, the calculation of the motion parameters of the table tennis ball based on the left and right views in step S102, wherein the motion parameters include position coordinates and ball speed, includes the following steps S201-S203:
[0013] Step S201: Using the YOLO deep learning model to detect the position of the ping-pong ball in the left and right views, preferably using a dynamic region of interest mechanism to determine the detection area based on the position or trajectory prediction of the previous frame to improve detection efficiency and real-time performance. This deep learning model has been specially trained for table tennis scenes and has a recognition accuracy rate of no less than 95%.
[0014] Step S202: Calculate the three-dimensional spatial position of the ping-pong ball using a stereo vision algorithm based on the position of the ping-pong ball in the left and right views. In this solution, the three-dimensional spatial position of the ping-pong ball is calculated using the principle of epipolar geometry.
[0015] Step S203 , calculating the speed of the table tennis ball based on the historical position of the table tennis ball, preferably using a Savitzky-Golley filter to smooth the historical position data to improve the accuracy and stability of the speed calculation.
[0016] Furthermore, the calculation of the speed of the table tennis ball based on the historical position of the table tennis ball in the above step S203 includes the following steps S301-S303:
[0017] Step S301, creating a ball position history record queue to record the ball's position coordinates and timestamp;
[0018] Step S302, when the new position coordinates of the table tennis ball are calculated, the position coordinates and the corresponding timestamp are recorded in the ball position history record queue;
[0019] Step S303: Calculate the velocity vector and velocity magnitude of the table tennis ball based on the historical data in the ball position history record queue. In this step, the velocity calculation adopts the finite difference method, taking into account the changes in position and time.
[0020] Furthermore, the identification of exciting rounds based on the game data of one or more dimensions in the above step S103 specifically includes the following steps S401-S402:
[0021] Step S401, determining a wonderful moment based on at least one dimension of game data; when determining a wonderful moment based on a single dimension of data, if it can be determined whether the ball speed is greater than a preset ball speed threshold, then it is determined as a wonderful moment;
[0022] Step S402, check whether the time interval between the current time and the previous wonderful moment is greater than the preset minimum interval. If so, the newly determined wonderful moment is included in a new wonderful round; otherwise, the newly determined wonderful moment is included in the previously constructed wonderful round; if the next wonderful moment is not generated within a time greater than the minimum interval after a certain wonderful moment, the current wonderful round is determined to be over.
[0023] Subsequently, the start time and end time of the highlight round are determined based on the time of the first highlight moment and the last highlight moment in the highlight round. It can be seen that a highlight round is composed of at least one highlight moment. When a highlight round includes multiple highlight moments, these highlight moments are continuous; the information of the highlight round is saved in a CSV file, and the information includes: start time, end time, ball speed and position coordinates.
[0024] In the above steps, the judgment logic of ball speed and time interval is used to ensure accurate identification and complete recording of exciting rounds.
[0025] Furthermore, when identifying exciting rounds based on game data of multiple dimensions in the above step S401, the following steps S501-S504 are specifically included:
[0026] Step S501: Collect multi-dimensional game data and perform feature extraction. For example, feature extraction based on ball speed includes: establishing a ball speed change curve and identifying explosive acceleration, such as a smash speed > 15m / s and an acceleration > 20m / s. 2 Feature extraction based on match round feature data includes calculating the number of effective shots through trajectory endpoint detection and calculating the distance between the impact point and the table boundary to form a landing point heat map. Feature extraction based on athlete performance data includes using the OpenPose model to extract changes in athlete joint angles. For example, an arm swing angle greater than 60° is considered a powerful shot.
[0027] Step S502: Determine the weight of each dimension data through the analytic hierarchy process. The weight is dynamically adjusted based on expert ratings and user feedback. Specifically, the initial weight of each dimension is determined through a coach questionnaire, and the weight parameters are automatically optimized based on user feedback.
[0028] Step S503: Calculate the comprehensive wonderfulness score using the linear weighted method. The scoring formula is Score = ∑(w i ×f i ), where w iis the weight of the i-th dimension data, f i is the characteristic value of the i-th dimension data;
[0029] Step S504: Determine the round segments whose comprehensive excitement scores are greater than the adaptive threshold as exciting rounds.
[0030] In actual implementation, the threshold can be dynamically adjusted according to the level of the competition. For example, the threshold for amateur competitions can be lowered by 30%. In specific judgments, exciting rounds can be determined through a multi-level judgment process, including two stages: primary screening and final judgment. During the primary screening, rounds with single-dimensional game data exceeding a hard threshold (such as a ball speed greater than 20m / s) are initially screened out. In the final judgment stage, whether it constitutes an exciting round is finally determined based on the comprehensive excitement score.
[0031] Furthermore, in the above step S103, when identifying the exciting round based on the pulling force feature in the match round feature data, the following steps S601-S604 are specifically included:
[0032] Step S601, tracking the continuous appearance of the table tennis ball, and determining whether the ball is continuously in the field of view and has a continuous movement trajectory;
[0033] Step S602: When the ball disappears for more than a preset time or the position jump exceeds a threshold, it is determined that the pulling force ends;
[0034] Step S603, recording the start and end time and duration of the tension;
[0035] Step S604: If the rally duration exceeds a preset minimum duration and contains a wonderful moment, the entire rally phase is marked as a wonderful round.
[0036] Furthermore, when identifying the highlight rounds based on the athlete performance data in the above step S103, the following steps S701-S704 are specifically included:
[0037] Step S701, capturing the athlete's swing trajectory in real time based on the left and right views and key point detection algorithm, and extracting the swing speed, acceleration and joint angle data;
[0038] Step S702, identifying the type of hitting technique through a classification model based on the swing trajectory characteristics and the ball speed mutation threshold;
[0039] Step S703, constructing a batting sequence timeline, and counting the frequency of offensive batting and the complexity of technical combinations;
[0040] Step S704: When at least three offensive shots occur consecutively within a preset time window and the technique type contains differentiated features, a combination skill bonus item is triggered, and the scoring weight of the athlete's performance data is dynamically increased.
[0041] Furthermore, the recording of the timestamp information of the exciting round in the above step S104 includes the following steps S801-S803:
[0042] Step S801, determining the start time and end time of a highlight round, wherein the start time is the time of the first highlight moment in the highlight round minus the preset pre-highlight segment retention time, and the end time is the time of the last highlight moment in the highlight round plus the preset post-highlight segment retention time;
[0043] Step S802, recording the start time, end time and metadata of the highlight round into a CSV file, wherein the metadata includes ball speed, number of strokes, round duration, etc.;
[0044] Step S803: back up and store the CSV file.
[0045] Furthermore, the step S105 described above of obtaining a video segment from the original video based on the timestamp information specifically includes the following steps S901-S904:
[0046] Step S901, reading the start time and end time of the exciting round from the CSV file;
[0047] Step S902, calculating the corresponding start and end frame indexes according to the video frame rate;
[0048] Step S903: Use FFmpeg to extract video clips of a specified time period from the original video. In this step, the left and right views can be synchronized and aligned. In addition, the two views can be merged into a dual-view video or kept separate for subsequent processing.
[0049] Step S904: Image enhancement, subtitle addition, and video effects are performed on the extracted video clips. Image enhancement includes color adjustment and contrast enhancement, subtitle addition includes technical indicators such as ball speed and time, and video effects include slow motion effects.
[0050] In addition, you can add smooth transition effects to each highlight clip, sort the highlights by chronological order or ball speed, synthesize the final highlight video, and optionally add background music and opening and ending credits.
[0051] A device for editing videos of exciting rounds in a table tennis match, comprising:
[0052] Image acquisition module 1001, which is used to capture left and right views of the table tennis game through a binocular camera; the binocular camera adopts an industrial camera with a frame rate of not less than 60fps and a resolution of not less than 1280×720, and synchronizes the acquisition through hardware triggering;
[0053] A motion parameter calculation module 1002 is configured to calculate motion parameters of the table tennis ball based on the left and right views. The motion parameters include position coordinates and ball speed. The motion parameters may also include a motion trajectory.
[0054] A highlight round identification module 1003 identifies highlight rounds based on one or more dimensions of match data, wherein the dimensions of the match data include table tennis kinematic data (including but not limited to position coordinates and speed), match round characteristic data (including but not limited to round duration, number of shots, attack-defense transition frequency, tension characteristics, and landing point distribution), and player performance data (including but not limited to player movement amplitude, shot movement, and technique and tactics);
[0055] A timestamp recording module 1004 records the timestamp information of the exciting round;
[0056] The video generation module 1005 obtains a video clip from the original video based on the timestamp information to obtain the wonderful round video.
[0057] Beneficial effects: The method and device for editing videos of exciting rounds during table tennis matches of the present invention have the following beneficial effects:
[0058] (1) In the present invention, multi-dimensional game data such as table tennis kinematics data, game round feature data, and athlete performance data are integrated to automatically identify exciting rounds and automatically and accurately record timestamps, thereby overcoming the limitations of single-dimensional judgment in the existing technology and greatly improving recognition accuracy, ensuring that the fragment extraction is unbiased, and guaranteeing the quality of the obtained exciting round video. The finally obtained exciting round video is highly enjoyable and has a unified standard, does not rely on the experience of manual editing, and greatly improves the editing efficiency.
[0059] (2) The YOLO deep learning model is used to achieve high-precision positioning of the table tennis ball in the left and right views (with an accuracy rate of no less than 95%). The three-dimensional spatial position is accurately calculated using a stereo vision algorithm, and the ball speed is then calculated in real time using a historical position record queue and the finite difference method. This method ensures the accuracy of position detection and the real-time and stability of speed calculation, significantly improving the calculation accuracy of table tennis motion parameters. This provides a reliable data foundation for the identification of subsequent exciting rounds and overcomes the defects of inaccurate position detection and delayed speed calculation in traditional methods.
[0060] (3) When identifying exciting rounds based on multi-dimensional game data, the accuracy and objectivity of exciting round identification are significantly improved through multi-dimensional data and comprehensive scoring mechanism, ensuring the quality and viewing experience of the edited video.
[0061] (4) By detecting the tension characteristics, the integrity of the exciting rounds is ensured, the fragmentation of the clips is avoided, and the coherence and viewing experience of the video are improved.
[0062] (5) Through precise frame index calculation and video enhancement processing, the quality and information richness of the exciting round video are ensured. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 A flowchart of a method for editing a video of a wonderful round in a table tennis match;
[0064] Figure 2 This is a schematic diagram of the structure of a device for editing videos of exciting rounds in a table tennis match. DETAILED DESCRIPTION
[0065] The present invention will be further described below with reference to the accompanying drawings.
[0066] like Figure 1 The method for editing a video of a wonderful round in a table tennis match shown includes the following steps S101-S104:
[0067] Step S101, capturing left and right views of the table tennis game using a binocular camera. In this step, the binocular camera is an industrial camera with a frame rate of no less than 60 fps and a resolution of no less than 1280 × 720, and synchronous capture is achieved through hardware triggering.
[0068] Step S102, calculating motion parameters of the table tennis ball based on the left and right views, wherein the motion parameters include position coordinates and ball speed; the motion parameters may also include a motion trajectory;
[0069] The method further comprises the following steps S103-S105:
[0070] Step S103, identifying exciting rounds based on one or more dimensions of match data, wherein the dimensions of the match data include table tennis kinematic data including but not limited to position coordinates and speed, match round characteristic data including but not limited to round duration, number of shots, attack-defense transition frequency, tension characteristics, landing point distribution, and player performance data including but not limited to player movement amplitude, shot movement, and technique and tactics;
[0071] Step S104, recording the timestamp information of the exciting round, and saving the timestamp in a CSV file;
[0072] Step S105: Based on the timestamp information, a video clip is obtained from the original video to obtain the wonderful round video.
[0073] In the present invention, multi-dimensional game data such as table tennis kinematics data, game round feature data, and athlete performance data are integrated to automatically identify exciting rounds and automatically and accurately record timestamps, overcoming the limitations of single-dimensional judgment in existing technologies and greatly improving recognition accuracy, ensuring that fragment extraction is unbiased, and guaranteeing the quality of the obtained exciting round videos. The final exciting round videos are highly enjoyable and have unified standards, do not rely on the experience of manual editing, and greatly improve editing efficiency.
[0074] Preferably, the calculation of the motion parameters of the table tennis ball based on the left and right views in step S102, wherein the motion parameters include position coordinates and ball speed, includes the following steps S201-S203:
[0075] Step S201: Using the YOLO deep learning model to detect the position of the table tennis ball in the left and right views; the deep learning model has been specially trained for table tennis scenes, and the recognition accuracy rate is not less than 95%;
[0076] In order to improve the detection efficiency of the YOLO model in high-resolution images, the present invention introduces a dynamic region of interest (ROI) mechanism, which reduces the amount of calculation by focusing on the area where the ping-pong ball may appear, and supports higher frame rate and real-time requirements. In the specific implementation, the system dynamically determines the ROI of the current frame based on the detection results of the previous frame or trajectory prediction. If the ball is detected in the previous frame, a certain range is expanded with its detection frame as the center as the ROI; if trajectory prediction is used, the position of the ball in the current frame is predicted based on the smoothed historical position and speed and mapped to the image plane to generate the ROI. During detection, the system crops the ROI and adjusts it to the YOLO model input size for detection, and the resulting coordinates are converted back to the original image coordinate system. If the target is not detected in the ROI, it can be processed by strategies such as expanding the range or full-image detection. Through this mechanism, the system reduces the input image size, improves processing efficiency, and maintains high-precision positioning effects.
[0077] Step S202: Calculate the three-dimensional spatial position of the ping-pong ball using a stereo vision algorithm based on the position of the ping-pong ball in the left and right views. In this embodiment, the three-dimensional spatial position of the ping-pong ball is calculated using epipolar geometry principles.
[0078] Step S203: Calculate the speed of the table tennis ball based on the historical position of the table tennis ball.
[0079] In order to improve the stability and reliability of velocity calculation, the present invention smoothes the original three-dimensional position coordinate sequence before calculating the velocity to remove high-frequency noise and ensure that the motion parameters reflect the true trend. Specifically, the Savitzky-Golay filtering method is adopted to smooth the coordinate sequence by performing local polynomial least squares fitting in a fixed-length data window while retaining the trajectory shape characteristics (such as peak height and width). In the implementation, the system maintains a history queue that stores several recent three-dimensional coordinate points (in the format of MU::Point3f), extracts data of a window size (for example, 5 or 7 points), and applies a one-dimensional SG filtering algorithm to the X, Y, and Z coordinate components respectively to generate the smoothed center point coordinates. The window size and polynomial order (for example, 2 or 3) can be adjusted according to the noise level and real-time requirements. The smoothed coordinates are used for subsequent velocity calculations, thereby reducing the jitter problem caused by noise and improving the stability of the results.
[0080] Preferably, the calculation of the speed of the table tennis ball based on the historical position of the table tennis ball in step S203 includes the following steps S301-S303:
[0081] Step S301, creating a ball position history record queue to record the ball's position coordinates and timestamp;
[0082] Step S302, when the new position coordinates of the table tennis ball are calculated, the position coordinates and the corresponding timestamp are recorded in the ball position history record queue;
[0083] Step S303: Calculate the velocity vector and velocity magnitude of the table tennis ball based on the historical data in the ball position history record queue. In this step, the velocity calculation adopts the finite difference method, taking into account the changes in position and time.
[0084] The YOLO deep learning model achieves high-precision positioning of the ping-pong ball in both left and right views with an accuracy of at least 95%. Combined with a stereo vision algorithm, it precisely calculates the ball's position in three dimensions. This method then uses a historical position record queue and the finite difference method to calculate the ball's speed in real time. This approach ensures accurate position detection and the real-time and stable speed calculation, significantly improving the accuracy of the ball's motion parameters. This provides a reliable data foundation for identifying subsequent exciting rounds and overcomes the shortcomings of traditional methods, such as inaccurate position detection and delayed speed calculation.
[0085] Preferably, the step S103 of identifying exciting rounds based on the match data of one or more dimensions specifically includes the following steps S401-S402:
[0086] Step S401, determining a wonderful moment based on at least one dimension of game data; when determining a wonderful moment based on a single dimension of data, if it can be determined whether the ball speed is greater than a preset ball speed threshold, then it is determined as a wonderful moment;
[0087] Step S402, check whether the time interval between the current time and the previous wonderful moment is greater than the preset minimum interval. If so, the newly determined wonderful moment is included in a new wonderful round; otherwise, the newly determined wonderful moment is included in the previously constructed wonderful round; if the next wonderful moment is not generated within a time greater than the minimum interval after a certain wonderful moment, the current wonderful round is determined to be over.
[0088] Subsequently, the start time and end time of the wonderful round are determined based on the time of the first wonderful moment and the last wonderful moment in the wonderful round respectively; the information of the wonderful round is saved in a CSV file, and the information includes: start time, end time, ball speed and position coordinates.
[0089] In the above steps, the judgment logic of ball speed and time interval is used to ensure accurate identification and complete recording of exciting rounds.
[0090] Preferably, when identifying exciting rounds based on game data of multiple dimensions in step S401, the following steps S501-S504 are specifically included:
[0091] Step S501: Collect multi-dimensional game data and perform feature extraction. For example, feature extraction based on ball speed includes: establishing a ball speed change curve and identifying explosive acceleration, such as a smash speed > 15m / s and an acceleration > 20m / s. 2 Feature extraction based on match round feature data includes: calculating the number of effective hits through trajectory endpoint detection, and counting the distance between the landing point of the hit and the boundary of the table to form a landing point heat map; feature extraction based on athlete performance data includes: using the OpenPose model to extract changes in athlete joint angles, such as an upper arm swing angle >60° is judged as a powerful hit; feature extraction based on athlete performance data also includes offensive hitting frequency, combination skill complexity score (based on the number of technical types and interval time) and joint movement amplitude standard deviation (reflecting technical stability).
[0092] Step S502: Determine the weight of each dimension data through the analytic hierarchy process. The weight is dynamically adjusted based on expert ratings and user feedback. Specifically, the initial weight of each dimension is determined through a coach questionnaire, and the weight parameters are automatically optimized based on user feedback.
[0093] Step S503: Calculate the comprehensive wonderfulness score using the linear weighted method. The scoring formula is Score = ∑(w i ×f i ), where wi is the weight of the i-th dimension data, f i is the characteristic value of the i-th dimension data;
[0094] Step S504: Determine the round segments whose comprehensive excitement scores are greater than the adaptive threshold as exciting rounds.
[0095] In actual implementation, the threshold can be dynamically adjusted based on the level of competition. For example, the threshold for amateur competitions can be lowered by 30%. In specific judgments, the identification of outstanding rounds can be carried out through a multi-level assessment process, including two stages: primary screening and final assessment. During the primary screening, rounds with single-dimensional match data exceeding a hard threshold, such as a ball speed greater than 20m / s, are initially screened out. In the final assessment stage, whether a round constitutes an outstanding round is finally determined based on the comprehensive excitement score.
[0096] When identifying exciting rounds based on multi-dimensional game data, the accuracy and objectivity of exciting round identification are significantly improved through multi-dimensional data and comprehensive scoring mechanism, ensuring the quality and viewing experience of the edited video.
[0097] Preferably, in the above step S103, when identifying the wonderful round based on the pulling force feature in the match round feature data, the following steps S601-S604 are specifically included:
[0098] Step S601, tracking the continuous appearance of the table tennis ball, and determining whether the ball is continuously in the field of view and has a continuous movement trajectory;
[0099] Step S602: When the ball disappears for more than a preset time or the position jump exceeds a threshold, it is determined that the pulling force ends;
[0100] Step S603, recording the start and end time and duration of the tension;
[0101] Step S604: If the rally duration exceeds a preset minimum duration and contains a wonderful moment, the entire rally phase is marked as a wonderful round.
[0102] By detecting the tension characteristics, the integrity of the exciting rounds is ensured, the fragmentation of the clips is avoided, and the coherence and viewing experience of the video are improved.
[0103] Preferably, when identifying the highlight rounds based on the athlete performance data in step S103, the following steps S701-S704 are specifically included:
[0104] Step S701, capturing the athlete's swing trajectory in real time based on the left and right views and key point detection algorithm, and extracting the swing speed, acceleration and joint angle data;
[0105] In this step, swing trajectory detection uses a YOLO model or keypoint detection algorithm (such as MediaPipe) to track the racket's position in real time, generating a 3D trajectory coordinate sequence. Joint angle data is extracted using the OpenPose model to extract the athlete's shoulder, elbow, and wrist joint angles and calculate the upper arm swing angular velocity (e.g., >60° / s indicates a powerful swing).
[0106] Step S702, identifying the type of hitting technique through a classification model based on the swing trajectory characteristics and the ball speed mutation threshold;
[0107] In this step, the pre-established batting technique feature templates (such as smash: short and steep swing trajectory, racket speed peak> 8m / s; rub: long and smooth trajectory, racket acceleration< 3m / s) are used to identify the target ball. 2 )Identify the type of hitting technique.
[0108] Step S703, constructing a batting sequence timeline, and counting the frequency of offensive batting and the complexity of technical combinations;
[0109] In this step, an offensive shot can be determined if any of the following conditions are met: (1) the ball speed is greater than 18 m / s and the racket angular velocity is greater than 70° / s; (2) the ball landing point is within 10 cm of the table edge; (3) the racket acceleration peak is greater than 15 m / s 2 .
[0110] Step S704: When at least three offensive shots occur consecutively within a preset time window (e.g., 3 seconds), and the technical type contains differentiated features (e.g., "smash → forward loop → quick tear"), the combination skill bonus item is triggered, and the scoring weight of the athlete's performance data is dynamically increased.
[0111] In this step, the weight of the combo is dynamically adjusted based on the time between shots and the complexity of the technique (e.g., if the interval is < 0.5 seconds and includes rotation changes, an additional 10% weight is added).
[0112] In the above method, by identifying the shot type, the judgment dimension of exciting rounds is enriched, the depth of tactical analysis and the viewing experience of the video are improved.
[0113] Preferably, the step S104 of recording the timestamp information of the exciting round includes the following steps S801-S803:
[0114] Step S801, determining the start time and end time of a highlight round, wherein the start time is the time of the first highlight moment in the highlight round minus the preset pre-highlight segment retention time, and the end time is the time of the last highlight moment in the highlight round plus the preset post-highlight segment retention time;
[0115] Step S802, recording the start time, end time and metadata of the highlight round into a CSV file, wherein the metadata includes ball speed, number of strokes, round duration, etc.;
[0116] Step S803: back up and store the CSV file.
[0117] Preferably, the step S105 of obtaining a video segment from the original video based on the timestamp information specifically includes the following steps S901-S904:
[0118] Step S901, reading the start time and end time of the exciting round from the CSV file;
[0119] Step S902, calculating the corresponding start and end frame indexes according to the video frame rate;
[0120] Step S903: Use FFmpeg to extract video clips of a specified time period from the original video. In this step, the left and right views can be synchronized and aligned. In addition, the two views can be merged into a dual-view video or kept separate for subsequent processing.
[0121] Step S904: Image enhancement, subtitle addition, and video effects are performed on the extracted video clips. Image enhancement includes color adjustment and contrast enhancement, subtitle addition includes technical indicators such as ball speed and time, and video effects include slow motion effects.
[0122] In addition, you can add smooth transition effects to each highlight clip, sort the highlights by chronological order or ball speed, synthesize the final highlight video, and optionally add background music and opening and ending credits.
[0123] Through precise frame index calculation and video enhancement processing, the quality and information richness of the exciting round video are ensured.
[0124] In order to facilitate users to view, edit and set thresholds and other operations, a system control and user interface module is specially designed to enhance the interactivity and operational flexibility of the system. Through the three core functions of keyboard control interface, operation parameter setting and visual feedback, this module enables users to efficiently control the system, monitor the game data in real time, and adjust the processing effect according to needs. Users can quickly perform multiple operations through keys, such as turning on or off the recording of highlights, adjusting the ball speed threshold in real time to adapt to different game scenes or personal preferences, manually marking highlights to ensure that key moments are not missed, switching the table tennis trajectory display mode to observe and analyze the ball's movement path, resetting the coordinate origin and combining the "X", "Y" and "Z" keys to select the coordinate axis to flexibly adjust the coordinate system to adapt to different game environments and analysis needs.
[0125] In terms of operating parameter settings, the system supports a variety of flexible configuration methods. If no parameters are passed in at startup, the system will enter real-time processing mode, which is suitable for real-time editing of live games. If a CSV file is specified, it will enter offline generation mode, which is suitable for batch processing of post-match videos. Users can also set camera parameters, detection parameters and highlight judgment criteria through configuration files to ensure the system achieves optimal performance in different environments. At the same time, the system allows dynamic adjustment of key parameters during operation, and settings can be optimized without restarting, greatly improving operational convenience and system adaptability.
[0126] To enable users to grasp the progress of the game and the system's processing effects in real time, the visual feedback function provides rich real-time information. Users can intuitively view the left and right views captured by the binocular camera and the position of the table tennis ball detected by the YOLO model to ensure accurate detection. The system also displays the three-dimensional coordinates and speed data of the table tennis ball in real time to help users understand the ball's motion state. It also supports multiple trajectory display modes to allow users to clearly observe the movement path of the table tennis ball for tactical analysis and exciting round judgment. When the system recognizes an exciting round, the interface will highlight it and issue a prompt to ensure that the user does not miss any important moments. Through the above design, the system control and user interface module of the present invention significantly improves the system's ease of use and interactivity. Users can not only monitor game data and processing results in real time, but also flexibly adjust parameters according to actual needs, thereby achieving efficient and accurate video editing of exciting rounds in a variety of scenarios.
[0127] The present invention also provides a device for editing videos of exciting rounds in a table tennis match. The editing device may include or be divided into one or more program modules. One or more program modules are stored in a storage medium and executed by one or more processors to complete the present invention and implement the above-mentioned editing method. The program module referred to in the embodiment of the present invention refers to a series of computer program instruction segments that can perform specific functions. It is more suitable for describing the execution process of the editing device in the storage medium than the program itself. Figure 2 As shown, it includes:
[0128] Image acquisition module 1001, which is used to capture left and right views of the table tennis game through a binocular camera; the binocular camera adopts an industrial camera with a frame rate of not less than 60fps and a resolution of not less than 1280×720, and synchronizes the acquisition through hardware triggering;
[0129] A motion parameter calculation module 1002 is configured to calculate motion parameters of the table tennis ball based on the left and right views. The motion parameters include position coordinates and ball speed. The motion parameters may also include a motion trajectory.
[0130] A highlight round identification module 1003 identifies highlight rounds based on one or more dimensions of match data, wherein the dimensions of the match data include table tennis kinematic data including but not limited to position coordinates and speed, match round characteristic data including but not limited to round duration, number of shots, attack-defense transition frequency, tension characteristics, landing point distribution, and player performance data including but not limited to player movement amplitude, shot movement, and technique and tactics;
[0131] A timestamp recording module 1004 records the timestamp information of the exciting round;
[0132] The video generation module 1005 obtains a video clip from the original video based on the timestamp information to obtain the wonderful round video.
[0133] Other contents of implementing the above-mentioned editing method based on the editing device have been introduced in detail in the previous embodiments. Please refer to the corresponding contents in the previous embodiments and will not be repeated here.
[0134] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for editing a video of a wonderful round in a table tennis match, the method comprising: Capture left and right views of a table tennis game using a binocular camera; Calculate motion parameters of the table tennis ball based on the left and right views, wherein the motion parameters include position coordinates and ball speed; Characterized in that the method further comprises: Identifying exciting rounds based on one or more dimensions of match data, wherein the dimensions of the match data include table tennis kinematics data, match round feature data, and player performance data; Recording the timestamp information of the exciting round; Based on the timestamp information, a video clip is obtained from the original video to obtain the wonderful round video.
2. The method for editing a video of a wonderful round in a table tennis match according to claim 1, characterized in that: The calculating of motion parameters of the table tennis ball based on the left and right views, wherein the motion parameters include position coordinates and ball speed, includes: Use the YOLO deep learning model to detect the position of the ping-pong ball in the left and right views, preferably using a dynamic region of interest mechanism to determine the detection area based on the previous frame position or trajectory prediction; Based on the position of the ping-pong ball in the left and right views, the three-dimensional spatial position of the ping-pong ball is calculated using a stereo vision algorithm; The speed of the table tennis ball is calculated based on the historical position of the table tennis ball, and preferably a Savitzky-Golley filter is used to smooth the historical position data.
3. The method for editing a video of a wonderful round in a table tennis match according to claim 2, characterized in that: The method of calculating the speed of the table tennis ball based on the historical position of the table tennis ball includes: Create a ball position history queue to record the ball's position coordinates and timestamps. When the new position coordinates of the table tennis ball are calculated, the position coordinates and the corresponding timestamp are recorded in the ball position history record queue; Based on the historical data in the ball position history record queue, the velocity vector and velocity magnitude of the table tennis ball are calculated.
4. The method for editing a video of a wonderful round in a table tennis match according to claim 1, characterized in that: The identifying of exciting rounds based on the match data of one or more dimensions specifically includes: Determine highlights based on at least one dimension of match data; Check whether the time interval between the current time and the previous wonderful moment is greater than the preset minimum interval. If so, the newly determined wonderful moment will be included in the new wonderful round; otherwise, the newly determined wonderful moment will be included in the previously constructed wonderful round. If the next wonderful moment is not generated within a time greater than the minimum interval after a certain wonderful moment, the current wonderful round will be determined to be over.
5. The method for editing a video of a wonderful round in a table tennis match according to claim 4, characterized in that: When identifying exciting rounds based on multiple dimensions of game data, it specifically includes: Collect multi-dimensional game data and perform feature extraction; The weight of each dimension of data is determined by the hierarchical analysis method, and the weight is dynamically adjusted based on expert ratings and user feedback; The linear weighted method is used to calculate the comprehensive wonderfulness score, and the scoring formula is Score=∑(w i ×f i ), where w i is the weight of the i-th dimension data, f i is the characteristic value of the i-th dimension data; The round segments whose comprehensive wonderfulness score is greater than the adaptive threshold are determined as wonderful rounds.
6. The method for editing a video of a wonderful round in a table tennis match according to claim 1, characterized in that: When identifying a wonderful round based on the pull feature in the match round feature data, the method specifically includes: Track the continuous appearance of the ping-pong ball to determine whether the ball remains in view and its trajectory is continuous; When the ball disappears for more than a preset time or its position jumps beyond a threshold, the pulling is determined to be over; Record the start and end times and duration of the pull; If the rally duration exceeds the preset minimum duration and contains a highlight moment, the entire rally phase will be marked as a highlight round.
7. The method for editing a video of a wonderful round in a table tennis match according to claim 1, characterized in that: When identifying exciting rounds based on the athlete performance data, it specifically includes: Capture the athlete's swing trajectory in real time based on left and right views and key point detection algorithms, extracting swing speed, acceleration, and joint angle data; Based on the swing trajectory characteristics and ball speed mutation threshold, the hitting technique type is identified through the classification model; Construct a timeline of the batting sequence and count the frequency of offensive batting and the complexity of technical combinations; When there are at least three consecutive offensive shots within the preset time window and the technical type contains differentiated characteristics, the combination skill bonus item will be triggered, dynamically increasing the scoring weight of the athlete's performance data.
8. The method for editing a video of a wonderful round in a table tennis match according to claim 1, characterized in that: The timestamp information for recording the exciting round includes: Determine the start time and end time of the highlight round, wherein the start time is the time of the first highlight moment in the highlight round minus the preset retention time before the highlight segment, and the end time is the time of the last highlight moment in the highlight round plus the preset retention time after the highlight segment; Record the start time, end time, and metadata of the highlight rounds into a CSV file; Back up and save CSV files.
9. The method for editing a video of a wonderful round in a table tennis match according to claim 8, characterized in that: The obtaining of the video clip from the original video based on the timestamp information specifically includes: Read the start time and end time of the exciting round from the CSV file; Calculate the corresponding start and end frame indexes according to the video frame rate; Use FFmpeg to extract video clips of a specified time period from the original video. Perform image enhancement, subtitle addition, and video effects on the extracted video clips.
10. A device for editing videos of exciting rounds in table tennis matches, characterized in that: It includes: An image acquisition module, which is used to capture left and right views of a table tennis game through a binocular camera; A motion parameter calculation module, which is used to calculate the motion parameters of the table tennis ball based on the left and right views, wherein the motion parameters include position coordinates and ball speed; The device is characterized in that it further comprises: A highlight round identification module is configured to identify highlight rounds based on one or more dimensions of match data, wherein the dimensions of the match data include table tennis kinematics data, match round feature data, and player performance data; A timestamp recording module, for recording the timestamp information of the exciting round; The video generation module obtains video clips from the original video based on the timestamp information to obtain the wonderful round video.
Citation Information
Patent Citations
Image transmission device, method for operating same, and on-chip system
CN109587518A
Intelligent data acquisition method for table tennis match video
CN110969133A
Intelligent interactive data collection system for table tennis match videos
CN110996178A
Ping-pong ball track capture analysis method and system
CN112085761A
Table tennis entertainment service system based on target detection and single-view scoring
CN213965069U