ORIGINAL RESEARCH article

Front. Sports Act. Living, 15 August 2025

Sec. Biomechanics and Control of Human Movement

Volume 7 - 2025 | https://doi.org/10.3389/fspor.2025.1635581

Development of a MediaPipe-based framework for biomechanical quantification of table tennis forehand strokes

  • 1. School of Sport and Health Science, Nanjing Sport Institute, Nanjing, China

  • 2. School of Table Tennis and Badminton, Nanjing Sport Institute, Nanjing, China

  • 3. Information Affairs Office, Nanjing Sport Institute, Nanjing, China

Abstract

Introduction:

This study aimed to quantify kinematic relationships across body segments during forehand strokes to provide interpretable metrics for single-camera based lightweight table tennis diagnostics.

Methods:

We analyzed 34 female players (aged 9.1–21.7 years) from provincial teams, recording a total of 340 strokes (10 per player). An SVM model was used to predict ball speed, after which 320 strokes (8–10 per player) were retained by removing outliers in ball speed. From MediaPipe position time series, we calculated velocity, angle and angular velocity time series, and extracted kinematic parameters from these time series, including range, mean/peak/impact values. Within-subject correlation coefficients (rws) were calculated to identify key biomechanical parameters that contribute to the ball speed, while between-subject correlation coefficients (rbs) were used to detect the relationship between age/height and ball speed.

Results:

Ball speed increased with greater playing-side arm linear movement at the shoulder (rws = 0.51 to 0.63), elbow (rws = 0.63 to 0.70) and wrist (rws = 0.50 to 0.60), as well as with enhanced rotational motion at the playing-side upper arm (rws = 0.65 to 0.71), shoulder line (rws = 0.54 to 0.57), and hip line (rws = 0.51 to 0.59). Conversely, ball speed decreased with excessive contralateral shoulder horizontal flexion/extension (rws = −0.44 to −0.62) and playing-side elbow flexion-extension (rws = −0.35). At the population-level, ball speed increases with age before 14.3 years (rbs = 0.68) but plateaus thereafter (rbs = 0.17).

Discussion:

This MediaPipe-based framework demonstrates potential for efficient biomechanical analysis in table tennis, providing a promising foundation for lightweight real-time analysis solutions.

1 Introduction

Table tennis requires precise whole-body coordination and accurate stroke timing, creating unique biomechanical analysis challenges. Biomechanical analysis reveals underlying technique patterns and improves player training and performance. Researchers employ various devices to study motion characteristics: optical systems (), pressure and force sensors (, ), electromyography (EMG) (), and inertial measurement units (IMUs) attached to the body or racket ().

Optical devices serve as primary tools, used alone or combined with other sensors. They capture precise three-dimensional spatial data while allowing players to move freely without interference. Researchers examine movement patterns across skill levels, identifying subtle joint and muscle dynamics invisible to the naked eye. Wang et al. used optical systems and EMG to compare elite and amateur players. Elite players showed greater ankle eversion and larger knee and hip flexion angles during backswing and follow-through phases (). He et al. employed a VICON optical system to study driving leg kinematics during topspin forehand loops. They found significant ankle movement differences between elite and intermediate players, recommending that intermediate players enhance lower limb muscle response to improve energy transfer (). Qian et al. compared superior and intermediate players using VICON, finding that superior players exhibited greater hip flexion and knee external rotation at stroke initiation, plus increased hip internal rotation and extension at stroke completion (). However, these optical systems require controlled environments, expensive multi-camera setups, high-frequency capabilities, time-consuming marker placement, large laboratories, and skilled technicians. These limitations restrict widespread use in practical training.

Researchers have adopted lightweight machine learning-based pose estimation models (e.g., OpenPose, MediaPipe Pose, PoseNet, AlphaPose, DeepLabCut, HRNet, BlazePose, EfficientPose, MoveNet) as alternatives to complex optical motion analysis systems (). These models provide human body landmarks for further development (, ). In sports and exercise, these models analyze movements (e.g., running, jumping, squatting) to optimize technique (, , ), detect injury-prone postures, and provide real-time form feedback via mobile apps (). They also assess team dynamics, monitor exercise quality in fitness apps, and enable remote training guidance (). Compared to other models requiring complex configurations, MediaPipe provides easy-to-use APIs and comprehensive documentation, lowering the development barrier. Developers can quickly integrate it into existing projects (, , ). These advantages make MediaPipe Pose the preferred solution suitable for scenarios requiring real-time performance and cross-platform deployment.

While lightweight machine learning-based pose estimation models exhibit lower precision compared to high-fidelity motion capture systems like VICON (, , ), recent advances in machine learning have significantly enhanced the utilization of keypoint data from lightweight pose estimation models (, ). Machine learning includes classical approaches and deep learning architectures. Integrating these methods with pose estimation data creates new opportunities for automated movement quality assessment (AQA) in athletic and rehabilitative applications.

Classical machine learning approaches include Decision Trees, Random Forest, SVM, Naive Bayes, K-NN, and Linear/Logistic Regression (). These methods address classification (), regression (), clustering tasks, and feature importance ranking (). Naive Bayes offers mathematical robustness and efficiency but relies on independence assumptions (). Decision Trees are capable of identifying contributing factors in biomechanical analyses, with applications including knee biomechanical asymmetry (). Random Forest combines multiple trees to improve prediction accuracy and reduce overfitting (, ), successfully predicting joint angles and moments (). Linear regression predicts continuous outcomes, such as running stride temporal variables and peak vertical ground reaction force (), while logistic regression addresses classification problems, such as binary musculoskeletal disorder classification (, ). Linear and logistic regression can work together to identify key predictors and examine high vs. low knee abduction moments (). Support Vector Machines (SVM) provide nonlinear classification and regression capabilities through kernel methods, making them well-suited for complex biomechanical tasks among classical machine learning approaches. Applications of SVM include predicting athlete aerobic fitness (), analyzing running gait (), and predicting fastball speed using kinetic and kinematic predictors ().

These classical machine learning approaches offer significant advantages in interpretability (, ) and computational efficiency (, ), making them well-suited for clinical applications and scenarios with limited data availability. However, their dependency on manual feature engineering (), limited capacity for processing high-dimensional data structures (), constrained nonlinear modeling capabilities, and insufficient handling of temporal sequences () restrict their effectiveness in advanced analytical tasks (). In contrast, deep learning architectures—including Convolutional Neural Networks (CNNs), Recurrent Neural Networks/Long Short-Term Memory networks (RNNs/LSTMs), and Transformers—provide superior accuracy and automation capabilities for complex spacial or temporal movement analysis. Nevertheless, these approaches require substantial computational resources and large training datasets to achieve optimal performance ().

CNNs excel at processing visual data through hierarchical structures and have been successfully applied to performance classification and kinetic parameter prediction (, ). While CNNs effectively extract spatial features, they struggle with temporal sequence modeling, prompting researchers to integrate CNNs with RNNs to achieve comprehensive spatial and temporal analysis (, ). RNNs handle time-series prediction effectively () but suffer from vanishing and exploding gradient problems (). LSTM units address these limitations as a specialized RNN component (, , ). LSTMs have predicted joint reaction forces (), segmented jump phases (), and modeled stress evolution in skeletal muscle tissue (). Transformers extend RNN capabilities by overcoming LSTM’s long-range dependency limitations. Their attention mechanisms capture relationships across entire sequences simultaneously, providing superior sequence modeling and interpretability through attention weights while enabling efficient parallelization.

Recent advances in table tennis research have leveraged lightweight machine learning models and pose estimation techniques to analyze player performance. Chen et al. enhanced swing recognition through an improved OpenPose framework integrated with MobileNet v3-small and InceptionTime architectures (). Building on pose estimation approaches, Llanos et al. developed a comprehensive assessment system using OpenPose and SVM-RBF classifiers to differentiate four key postural elements: upper body lean, knee bend, forehand/backhand strokes, and footwork patterns (). For real-time applications, He et al. combined YOLOv5 and MediaPipe for stroke and posture assessment, implementing dynamic time warping algorithms to compare temporal sequences of joint angles (elbow-shoulder-hip) between player motions and reference techniques ().Similarly, Huang and colleagues employed OpenPose for skeleton extraction combined with SVM for real-time swing recognition, incorporating Dynamic Time Warping (DTW) algorithms to evaluate technique through keypoint trajectory comparison and identification of suboptimal joint movements (). Transformer-based approaches have also shown promise, with Dong and colleagues utilizing MediaPipe for human keypoint extraction and employing Transformer models for stroke recognition across six distinct stroke types ().

Despite advances in lightweight pose estimation for table tennis, existing methods focus primarily on stroke classification without quantifying how multi-segment body kinematics influence ball impact outcomes. These approaches have not yet established measurable relationships between whole-body movement patterns and performance metrics, limiting their utility for diagnostic applications in sports training.

This study aimed to quantify kinematic relationships across body segments during forehand strokes to provide interpretable metrics for lightweight table tennis diagnostics. Using single-camera whole-body landmark detection and ball speed measurement, we employed statistical analysis to identify key kinematic factors influencing ball performance. This research bridges lightweight human motion capture with actionable biomechanical insights for practical sports training applications.

2 Methods

The research method consists of the following steps: (1) Pre-train a Support Vector Machine (SVM) model to serve as a tool for direct ball speed measurement from video footage. (2) Participants perform forehand strokes while MediaPipe captures the 3D position series of human body landmarks. (3) Calibrate the position series to compute velocity, angle, and angular velocity sequences, from which kinematic summaries are extracted. (4) Apply the pre-trained SVM model to predict ball speed based on the ball trajectory. (5) Conduct statistical analysis to examine correlations between kinematic summaries and ball velocity, as well as relationships between participant demographics (age and height) and ball speed.

2.1 SVM ball speed model

A Support Vector Machine (SVM) regression model was pre-trained on ball coordinates (x and y values) extracted from video frames to predict ball speed. This model was then employed in the main experiment to streamline the measurement process, ensuring efficiency for practical applications.

Ball speed specifically denotes average horizontal ball speed, which critically measures offensive performance in table tennis. The table surface was divided into squares using fine lines to accurately identify ball landing spots and determine horizontal flight distance. A centrally positioned audio recorder captured sounds from ball-racket and ball-table contact. These sound waves were analyzed using Adobe Audition, which provides 1 millisecond temporal resolution, enabling precise measurement of impact time intervals. Corrections were applied based on sound velocity at 20°C (343 m/s) to account for varying sound travel times caused by different distances between impact points, drop points, and the recorder. Ball speed was calculated by dividing horizontal flight distance by travel time.

The SVM regression model was developed using 517 preliminary stroke measurements from standardized ball trajectories at controlled speeds. Manually annotated (, ) coordinates from six consecutive video frames created 12-dimensional feature vectors capturing ball movement immediately before screen exit.

Using six-frame coordinates with SVM regression rather than simple two-point measurement offers several advantages: (1) Table tennis ball trajectories are inherently nonlinear due to air resistance, spin effects, and gravitational forces. SVM’s ability to find optimal decision boundaries in high-dimensional space makes it particularly suitable for processing multi-frame coordinate data and learning complex velocity patterns that simple kinematic equations cannot capture. (2) Six frames provide finer temporal sampling of ball motion, effectively filtering random noise and measurement errors common in single-frame coordinate detection. (3) If ball detection fails in one or two frames, SVM can still make accurate predictions using remaining frames, whereas two-point methods would fail completely.

The 517 preliminary measurements were split into training (80%) and test (20%) sets, with the test set remaining independent throughout the training process. Hyperparameter optimization employed 5-fold cross-validation with grid search across parameters [0.1, 1, 10, 100, 1,000, 10,000, 100,000] and values [1, 0.1, 0.01, 0.001, 0.0001, 0.00001]. This strategy ensured robust parameter selection while preventing overfitting. The optimal configuration achieved and , yielding best cross-validation score (R2) and test set R2 (Figure 1).

Figure 1

Bland–Altman analysis demonstrated excellent agreement between predicted and measured speeds in the test set. Most data points fell within 95% confidence limits with minimal systematic bias of 0.02 km/h (Figure 2). This validated SVM model was employed for lightweight ball speed prediction.

Figure 2

2.2 Participants and protocol

This study included 34 female table tennis players (aged 9.1–21.7 years) from provincial teams training at Nanjing Sport Institute in February 2023. Twenty-six were from the Jiangsu team and eight from the Shanghai team. (Table 1). Power analysis using PASS 2023 demonstrated adequate statistical power for within-subject correlations (93%, ICC 0.5) and between-subject correlations (87%, r 0.5) at 0.05. All participants were physically fit with no training contraindications. The Ethics Committee at Nanjing Sport Institute approved these procedures (Approval No. RT-2023-02). Participants or their guardians provided written informed consent before the study began.

Table 1

CharacteristicsParticipants
N34
Age (yr)
Height (cm)
Weight (kg)
Left-handed8 (23.5%)
Right-handed26 (76.5%)

Participant characteristics, meansSD or N (%).

An experienced coach delivered balls at slow speed (approximately 24 km/h) to allow players adequate physical and mental preparation based on her movements and optimal shot timing. Right-handed players positioned themselves on the table’s left side and executed forehand strokes toward the opposite corner, maintaining ball trajectory approximately 20 cm above the table surface. A single camera (SONY FDR-AX700) positioned 95 cm above ground level captured body movements and ball trajectories from a angle on the right front (Figure 3). The camera operated at pixel resolution and 100 fps frame rate. The experimental setup was mirrored across the net for left-handed players: participants stood on the table’s right side, and the camera position was correspondingly adjusted. The first ten valid strokes per player–excluding edge and net contacts–were recorded, resulting in a total of 340 strokes across 34 participants. Subsequent processing removed 20 strokes due to ball speed outliers, leaving 320 strokes (8–10 per player). The outlier was identified using the criterion of values exceeding or falling below , where and represent first and third quartiles, respectively, and denotes the interquartile range, reflecting the spread within the middle 50% of data. Finally, for correlation analysis, only the fastest and slowest two strokes per player (68 strokes in total) were selected.

Figure 3

2.3 Landmark tracking and data processing

2.3.1 Human landmark tracking

We tracked thirty-three landmark positions for each player using MediaPipe Pose (Version 0.10.14), as defined by Bazarevsky et al. () (Figure 4). Each landmark was represented by three-dimensional coordinates (, , ), where x and y indicate relative position in the 2D image, and z reflects regressed depth value. Data were stored as time series sampled at 100 Hz, matching the video frame rate. Left-handed players’ video frames were horizontally flipped before MediaPipe tracking to maintain consistency with right-handed movement patterns.

Figure 4

2.3.2 Ball trajectory and impact timing annotation

To ensure the progression of the main experiment, this study employed manual annotation to identify ball flight trajectories and racket-ball impact timing. Ball trajectories were determined by marking the coordinates of the ball in the final six frames before it exited the video frame boundaries. These trajectory data were subsequently used to predict ball speed using the pre-trained Support Vector Machine (SVM) model. Meanwhile, the manually identified racket-ball impact timing served as temporal reference points to extrac forward swing phase.

2.3.3 Position data filtering

Landmark position time series were filtered using a low-pass Finite Impulse Response (FIR) filter designed with a Hamming window and 31 taps, implemented through the function. The filter applied 100 Hz sampling rate and 0.08 normalized cutoff frequency, corresponding to 4 Hz actual cutoff.

2.3.4 Position data scaling

Two scaling factors converted landmark coordinates from video frames to actual positions. The first factor, calculated solely for the initial frame, addresses disparity between MediaPipe-estimated body dimensions and actual measurements. It compares cumulative lengths of bilateral shoulder-hip-knee-ankle segments calculated by MediaPipe with manually measured lengths. The second factor, computed for every subsequent frame, compensates for apparent size variations due to body movement, maintaining proportional consistency across frames. This factor adjusts landmark positions by comparing cumulative segment lengths in the current frame to those in the first frame. Each landmark position is then multiplied by both factors to obtain real-world coordinates.

2.3.5 Dynamic origin calibration

MediaPipe’s coordinate system is based on the camera coordinate system, which originally placed its origin between the hips, with the x-axis extending rightward, y-axis downward, and z-axis toward the camera. We still use the camera coordinate system, but repositioned the origin to the time-averaged midpoint between both feet across all frames during the current forehand stroke and redefined the y-axis to extend upward (Figure 3). Landmark coordinates were then transformed relative to this motion-adaptive origin.

2.3.6 Kinematic parameter calculation

Landmark velocities were computed from position time series using the central difference method. Velocity components in x-, y-, and z-directions were calculated from Equation 1:where , , and represent each landmark’s camera coordinates.

Body segments, defined as anatomical regions between two landmarks, were analyzed for orientation angles in the xy-, yz-, and zx-planes. Angles were computed from Equation 2:where , , and denote landmark’s camera coordinates. The -plane is perpendicular to the camera’s optical axis, the -plane is parallel to the camera’s optical axis, and the -plane is parallel to the floor.

Angular velocities in each plane (, , ) were derived using Equation 3:Joint angles were defined as angles between two adjacent body segments, determined by three landmarks (e.g., points A, B, and C, with B at the joint). Joint angle was calculated from vectors and using Equation 4:with corresponding angular velocity computed from Equation 5:

2.3.7 Forward swing phase extraction

A forehand stroke consists of three distinct phases: backswing, forward swing, and follow-through. This study focuses exclusively on the forward swing phase, defined as the interval during which players maximally accelerate the racket toward the ball to achieve precise contact. Forward swing duration was extracted from a duplicate playing-side wrist (Landmark 16) resultant velocity time series. The series was processed using the previously applied 31st-order FIR filter again, and its second derivative was calculated to identify inflection points. The inflection point immediately before ball impact marked phase start time, while the inflection point directly after impact defined its end time. All landmark position and velocity time-series data were then truncated based on calculated boundaries. Taking the playing-side wrist (Landmark 16) as an example, Figure 5 displays its position and velocity time series, with the shaded portion representing the truncated forward swing phase. The duration of the forward stroke phase across all players is frames or milliseconds.

Figure 5

We compared the mathematically derived start and end points of the forward swing phase with manually annotated timepoints obtained through frame-by-frame expert analysis (n 320). The validation results demonstrate excellent agreement between the two methods. Bland–Altman analysis showed that of measurements fell within the limits of agreement for both start and end time detection. Both timepoint detections exhibited excellent reliability (ICC: 0.968 and 0.987) and strong correlations with manual annotation (r: 0.974 and 0.988, both ). The mathematical method showed minimal systematic bias with mean differences of ms for start time and ms for end time. Mean relative errors were low at 3.69% and 1.46% respectively (Table 2).

Table 2

Statistical measureStart timeEnd time
Sample size (n)320320
Mean difference (95% CI)1.016 (1.246, 0.785)0.278 (0.440, 0.116)
Limits of agreement (LoA)5.140 to 3.1093.182 to 2.625
Within LoA (%)96.295.3
ICC (95% CI)0.968 ()0.987 ()
Pearson correlation ()0.974 ()0.988 ()
Spearman correlation ()0.958 ()0.981 ()
MAE (frames, 1/100 s)1.7161.109
RMSE (frames, 1/100 s)2.3371.507
Mean relative error (%)3.691.46

Comparison of mathematical method and manual measurement for forward swing phase timing detection.

Note: Comparison between automated mathematical algorithm and manual expert measurement for forward swing phase timing detection. CI, confidence interval; LoA, limits of agreement (Bland–Altman analysis); ICC, intraclass correlation coefficient; MAE, mean absolute error; RMSE, root mean square error. Negative mean differences indicate earlier detection by the mathematical method. ICC interpretation: excellent (), good (0.75–0.90), moderate (0.50–0.75), poor (). All correlations are statistically significant ().

2.4 Data validation

2.4.1 Repeated measurement reliability

To compare the consistency and similarity of repeated position time series measurements, all position time series were truncated to a uniform duration of 0.8 s, which was slightly shorter than the minimum stroke length observed across all participants. Two strokes were randomly selected per player. Three metrics were employed for consistency and similarity validation: the intraclass correlation coefficient (ICC), normalized Dynamic Time Warping (DTW) similarity, and cosine similarity (CS). For each participant, these three similarity measures were computed for their stroke pairs, and overall similarity values were calculated as the mean across all participants.

The ICC measures reliability and consistency between repeated measurements, calculated as: where represents between-subjects mean square, represents within-subjects mean square, and represents the number of measurements per subject.

Normalized DTW similarity captures temporal alignment between sequences with potential time warping, computed as: where represents average sequence length and denotes data range.

Cosine similarity measures angular similarity between vectors, defined as: .

Table 3 demonstrate strong measurement consistency across different similarity metrics. Most landmarks achieved excellent reliability () in multiple dimensions, confirming the robustness of the motion capture model and the consistency of skilled athletic performance.

Table 3

LMICCNormalized DTW similarityCosine similarity
RxyzRxyzRxyz
00.982a0.909a0.978a0.8600.9000.985a0.953a0.987a1.000a0.8151.000a0.985a
110.983a0.907a0.982a0.8490.941a0.967a0.958a0.991a1.000a0.8951.000a0.936a
120.982a0.8430.978a0.8430.961a0.988a0.967a0.976a1.000a0.8741.000a0.963a
130.8950.8860.939a0.8310.981a0.976a0.984a0.992a0.998a0.8970.998a0.907a
140.952a0.8360.945a0.8660.989a0.993a0.989a0.982a0.999a0.944a0.998a0.957a
150.901a0.901a0.918a0.8540.983a0.982a0.985a0.991a0.991a0.8410.992a0.863
160.930a0.7980.911a0.8570.993a0.995a0.993a0.975a0.997a0.963a0.996a0.935a
230.982a0.8030.986a0.910a0.7820.976a0.7750.973a1.000a0.932a1.000a0.847
240.987a0.7120.984a0.926a0.8210.977a0.7720.976a1.000a0.976a1.000a0.990a
250.915a0.905a0.8930.8170.976a0.956a0.983a0.983a0.996a0.991a0.996a0.764
260.8850.8620.916a0.8470.980a0.983a0.975a0.971a0.998a0.904a0.999a0.991a
270.7960.8630.7380.7630.966a0.954a0.980a0.970a0.992a0.991a0.8890.978a
280.8350.8580.7310.8240.968a0.954a0.978a0.969a0.994a0.993a0.8510.966a

Consistency and similarity measures for repeated landmark position measurements: intraclass correlation coefficients (ICC), normalized DTW similarity, and cosine similarity.

Note: LM, landmark number; x, y, z, displacement components in camera coordinate system; ; ICC, intraclass correlation coefficient; DTW, dynamic time warping. a.

Figure 6 demonstrates a single player’s position trajectories across multiple trials, revealing high consistency, particularly in the dominant-side wrist’s x and y coordinates, while the z-coordinate shows greater variability. This consistent performance across trials reflects both the movement reliability of professionally trained players and MediaPipe’s consistency and similarity in repeated assessments.

Figure 6

2.4.2 Left-handed data validation

Left-handed video frames were horizontally flipped before MediaPipe processing to generate coordinate data comparable to right-handed players. Landmark position curve analysis employed multiple statistical approaches to assess group differences. Curves were preprocessed through cubic spline interpolation to achieve uniform temporal resolution. Eighteen kinematic features were extracted, including basic statistics (mean, standard deviation, maximum, minimum, range, median), distribution characteristics (skewness, kurtosis), peak properties (peak count, peak maximum, peak mean), temporal dynamics (mean velocity, maximum acceleration, zero crossings), spectral properties (dominant frequency, spectral centroid), and curve morphology (curve length, area under curve). Statistical comparisons utilized appropriate parametric or non-parametric tests based on normality and variance assessments. Bonferroni correction addressed multiple comparison issues. Multivariate analysis included dimensionality reduction and clustering for pattern recognition. Curve similarity was quantified using distance matrices comparing intra-group vs. inter-group variations.

Results demonstrated no significant differences in resultant position curves for all 33 landmarks between left-handed and right-handed players (corrected ), suggesting both groups originated from the same population. This finding validates the comparability of left-handed and right-handed player data. Figure 7 illustrates the consistent resultant position curves between groups for playing-side wrist, elbow, shoulder, and contralateral wrist, elbow, shoulder landmarks.

Figure 7

2.5 Statistical analysis

The fastest and slowest strokes from each player were paired and analyzed using two correlation approaches: within-subject and between-subject. We chose correlation analysis over machine learning approaches for several reasons: (1) it provides direct, interpretable relationships between biomechanical variables that coaches and researchers can immediately understand and apply; (2) correlation analysis is statistically appropriate and robust for small sample sizes; and (3) this exploratory approach helps identify which biomechanical factors are most relevant before developing more complex predictive models.

2.5.1 Within-subject corrilation

Within-subject correlation is a statistical method used to assess association between paired measures across multiple occasions for each individual (). This technique examines whether an increase in one variable corresponds to change in another (). For example, it determines whether faster wrist movement correlates with higher ball speeds.

Statistical summaries of positional and angular changes are provided in Table 4. These kinematic parameters were extracted across three levels: (1) Landmark parameters including positional range (PR), mean velocity (MV), peak velocity (PV), and impact velocity (IV), decomposed into resultant components (subscript R) and axial components (subscripts x, y, z); (2) Segment parameters including angular range (AR), mean angular velocity (MAV), peak angular velocity (PAV), and impact angular velocity (IAV), analyzed as resultant components (subscript R) and planar components (subscripts xy, yz, zx); (3) Joint parameters including joint angular range (JAR), joint mean angular velocity (JMAV), joint peak angular velocity (JPAV), and joint impact angular velocity (JIAV), treated as scalar quantities without directional decomposition. Within-subject correlations (rws) between kinematic parameters and ball speeds were calculated using repeated measures correlation analysis ( function), following the rmcorr methodology of Bakdash and Marusich () (Equation 6).where represents the sum of squares for the measure (dependent variable), represents the sum of squares for error (residual variance), and represents the common regression slope coefficient estimated across all participants, estimated through analysis of covariance (ANCOVA).

Table 4

SummariesDescriptions
Positional/angular rangeTotal absolute positional or angular change during forward swing
Mean velocityAbsolute mean linear or angular velocity during forward swing
Peak velocityAbsolute peak linear or angular velocity during forward swing
Impact velocityAbsolute linear or angular velocity at racket-ball impact

Summary of kinematic variables during the forward swing phase.

For each player, the fastest stroke was compared with the slowest stroke to compute rws. This method aimed to identify key factors driving differences between fastest and slowest ball speeds.

2.5.2 Between-subject corrilation

Between-subject correlation evaluates whether individuals with higher values in one variable tend to exhibit higher values in another across subjects (). For example, it can assess whether age or height correlates with ball speed. The between-subject correlation coefficient (rbs) is calculated using Equation 7 proposed by Bland and Altman ():where is the number of measurements for subject (stroke count for a given player), and and are the means of two variables across multiple measurements for subject .

3 Results

3.1 Within-subject correlation between biomechanical kinematic characteristics and ball speed

3.1.1 Relationship between positional range, linear velocity of landmarks, and ball speed

The positional range and velocities (mean, peak, and at impact) of the head, playing-side shoulder (rws = 0.51, 0.63, 0.61 for PRx, MVx, PVx), elbow (rws = 0.63, 0.70, 0.69 for PRR, MVR, PVR), wrist (rws = 0.60, 0.56, 0.50 for MVR, PVR, IVR), fingers, and both hips show significant positive correlations with ball speed, particularly along the x-axis. The resultant peak and impact velocities of the legs reveal distinct patterns: the playing-side knee shows a weak positive correlation, while the contralateral knee and ankle display weak to moderate negative correlations with ball speed (Figure 8 and Table 5).

Figure 8

Table 5

LMPositional range (PR)Mean velocity (MV)Peak velocity (PV)Impact velocity (IV)
RxyzRxyzRxyzRxyz
00.47b0.52b0.060.300.53b0.62b0.020.48b0.38a0.56b0.200.220.42a0.46b0.040.22
110.210.080.070.210.35a0.150.090.40a0.270.140.44b0.240.240.050.040.22
120.50b0.51b0.170.030.45b0.63b0.280.010.51b0.61b0.300.270.39a0.46b0.220.11
130.120.300.040.180.250.230.140.38a0.050.260.010.030.110.43a0.170.22
140.63b0.59b0.230.150.70b0.68b0.35a0.100.69b0.65b0.230.100.50b0.44b0.270.10
150.120.41a0.110.120.300.300.210.250.050.330.120.020.160.36a0.020.16
160.46b0.52b0.060.210.60b0.64b0.220.160.56b0.55b0.170.120.50b0.46b0.200.10
170.150.40a0.150.130.320.290.240.250.070.36a0.140.020.180.36a0.070.16
180.43a0.49b0.040.210.56b0.61b0.190.150.53b0.52b0.150.130.49b0.45b0.170.09
190.160.40a0.170.130.34a0.280.250.250.100.36a0.160.040.190.35a0.100.16
200.41a0.48b0.020.190.57b0.62b0.170.150.53b0.52b0.130.130.50b0.46b0.180.04
210.130.41a0.130.130.320.300.220.250.070.330.130.030.170.36a0.050.16
220.45b0.51b0.050.210.59b0.63b0.210.160.55b0.54b0.160.110.50b0.46b0.200.07
230.49b0.51b0.190.36a0.49b0.59b0.140.49b0.38a0.50b0.130.140.38a0.37a0.030.32
240.49b0.51b0.320.37a0.48b0.60b0.220.48b0.40a0.50b0.060.160.38a0.38a0.100.32
250.040.140.080.270.36a0.040.020.34a0.36a0.240.220.230.330.35a0.110.05
260.280.310.100.040.290.38a0.080.160.270.270.040.170.240.330.140.00
270.280.160.37a0.160.40a0.090.320.170.45b0.260.37a0.300.42a0.230.47b0.17
280.260.44b0.110.140.260.49b0.110.200.270.41a0.030.280.170.310.130.05
290.280.200.37a0.150.41a0.140.310.170.45b0.270.37a0.300.41a0.210.43a0.14
300.270.38a0.080.130.270.42a0.070.200.260.42a0.040.280.180.280.100.05
310.170.230.330.090.240.200.300.080.210.33a0.150.110.250.260.43b0.11
320.300.49b0.210.110.310.52b0.180.160.210.41a0.110.190.210.50b0.130.09

Within-subject correlation coefficients (rws) between landmark kinematic variables (positional range and velocities) and ball speed.

x, y, z are displacement components in the camera coordinate system: x-axis points right, y-axis points up, and z-axis points toward the camera (Figure 3), . “LM” refers to Landmark (Figure 4). a. b.

3.1.2 Relationship between angular range, angular velocity of body segments, and ball speed

The resultant angular range and mean angular velocity of the shoulder line (11–12) (rws = 0.57, 0.54 for MAVR, MAVzx) and hip line (23–24) (rws = 0.51, 0.59 for ARR, MAVzx) show moderate correlation with ball speed. The playing-side upper arm (12–14) demonstrates significant positive correlations in both angular range and angular velocities with ball speed (rws = 0.65, 0.71, 0.70 for ARxy, MAVxy, PAVxy), while the contralateral upper arm (11–13) shows no significant relationship. In the lower limbs, the playing-side segments (24–26, 26–28) present weak to moderately positive correlations, whereas the contralateral segments (23–25, 25–27) display weak to moderate negative correlations (Figure 9, Table 6).

Figure 9

Table 6

SegmentAngular range (AR)Mean angular velocity (MAV)Peak angular velocity (PAV)Impact angular velocity (IAV)
RxyyzzxRxyyzzxRxyyzzxRxyyzzx
2–90.46b0.38a0.060.160.48b0.52b0.130.53b0.320.270.220.40a0.34a0.300.060.40a
5–100.52b0.46b0.080.250.60b0.54b0.35a0.56b0.41a0.42a0.120.43a0.320.320.050.32
7–80.49b0.250.290.39a0.330.280.37a0.58b0.130.260.030.290.310.280.190.44b
11–120.41a0.46b0.36a0.330.57b0.36a0.48b0.54b0.45b0.320.44b0.150.37a0.38a0.320.27
23–240.51b0.060.160.47b0.43b0.050.300.59b0.240.090.020.37a0.41a0.090.230.39a
11–130.150.200.120.160.200.240.000.190.240.080.070.240.190.37a0.010.25
12–140.55b0.65b0.140.050.52b0.71b0.39a0.38a0.36a0.70b0.290.250.46b0.46b0.280.31
13–150.030.140.150.160.270.050.36a0.010.040.040.170.070.090.130.330.17
14–160.130.080.180.100.200.230.150.160.140.020.080.330.180.040.120.27
15–190.34a0.010.42a0.38a0.44b0.300.45b0.020.43b0.40a0.50b0.070.35a0.42a0.40a0.02
16–200.38a0.150.44b0.100.180.170.36a0.190.34a0.34a0.52b0.120.030.190.34a0.02
11–230.160.050.150.38a0.160.37a0.310.130.030.220.150.030.180.100.140.18
12–240.330.47b0.35a0.270.35a0.59b0.080.34a0.300.52b0.110.300.41a0.46b0.080.41a
23–250.240.330.120.45b0.42a0.220.030.070.46b0.270.310.37a0.35a0.54b0.250.27
24–260.230.190.030.320.40a0.250.250.39a0.210.270.000.190.40a0.210.070.39a
25–270.290.36a0.260.130.320.210.140.180.38a0.36a0.330.280.40a0.290.250.21
26–280.050.030.330.43a0.37a0.050.38a0.46b0.41a0.080.090.41a0.270.020.050.31
29–310.130.170.150.160.41a0.300.260.280.38a0.220.38a0.200.110.070.040.12
30–320.34a0.180.090.41a0.290.210.000.46b0.250.180.120.34a0.240.150.100.33

Within-subject correlation coefficients (rws) between segment kinematic variables (angular range and velocities) and ball speed.

Segment denotes the anatomical connection between two MediaPipe landmarks (Figure 4). R represents the resultant angular value (position or velocity), with xy, yz, and zx as planar components relative to the camera coordinate system (Figure 3): the xy-plane (perpendicular to the optical axis), yz-plane (parallel to the optical axis), and zx-plane (parallel to the floor). a. b.

3.1.3 Relationship between angular range, angular velocity of joint, and ball speed

Negative correlations with ball speed are observed for the contralateral shoulder’s horizontal flexion-extension (rws = −0.44, −0.62 for joint JAR and JPAV), the playing-side elbow’s flexion-extension (rws = −0.35 for joint JPAV), and both knees’ flexion-extension (Figure 10, Table 7).

Figure 10

Table 7

Joint angleAngular range(JAR)Mean angular velocity (JMAV)Peak angular velocity (JPAV)Impact angular velocity (JIAV)
11-12-140.020.230.030.22
12-11-130.44b0.35a0.62b0.21
12-14-160.320.170.35a0.33
11-13-150.030.42a0.010.05
14-16-200.070.110.060.12
13-15-190.260.160.310.37a
12-24-260.140.210.39a0.00
11-23-250.280.320.260.44b
24-26-280.260.130.320.05
23-25-270.34a0.070.47b0.28
25-27-310.130.150.060.25
26-28-320.070.000.030.18

Within-subject correlation coefficients (rws) between joint kinematic variables (angular range and velocities) and ball speed.

Joint angles are calculated using three consecutive landmarks (Figure 4), with the middle keypoint defining the joint center. a. b.

3.2 Between-subject correlation coefficients of age and height with ball speed

Ball speed correlates significantly with age (rbs = 0.62), particularly in younger participants (9.1–14.3 years, rbs = 0.68). Height also shows positive correlations with ball speed. However, among female adolescents (14.3–21.7 years), age shows weak correlation (rbs = 0.17) while height shows slight negative correlation (rbs = −0.29) with ball speed (Table 8, Figure 11).

Table 8

Participant characteristicsTotal (9.1–21.7 yr)
AgeHeightBSAgeHeightBSAgeHeightBS
Age0.61a0.62a0.87a0.68a−0.140.17
Height0.61a0.55a0.87a0.63a−0.14−0.29
BS0.62a0.55a0.68a0.63a0.17−0.29

Between-subject correlation matrix showing relationships among age, height, and ball speed across age groups.

BS, ball speed.

a.

Figure 11

4 Discussion

4.1 MediaPipe-based motion capture reveals critical kinematic parameters

Our MediaPipe-based analysis revealed specific kinematic metrics that correlate with ball speed in table tennis forehand strokes. Ball speed increased with greater playing-side arm linear movement at the shoulder, elbow and wrist (Figure 8 and Table 5), as well as with enhanced rotational motion at the playing-side upper arm, shoulder line, and hip line (Figure 9 and Table 6). Conversely, ball speed decreased with excessive contralateral shoulder horizontal flexion/extension and playing-side elbow flexion-extension (Figure 10 and Table 7). These features, derived from 33 landmarks, 19 inter-keypoint segments, and 12 joint angles, comprehensively characterize forward stroke mechanics in table tennis. They reveal biomechanical principles for optimizing body segment activation to achieve peak ball speed.

Our findings align with prior studies (, ), confirming that playing-side arm linear velocity and positional range directly enhance ball speed (Figure 8). Racket speed, the direct determinant of ball speed, originates from the upper limb’s kinetic chain through sequential joint velocity propagation from shoulder to wrist (, ). The playing-side shoulder serves as the proximal driver, generating angular momentum that transmits distally to the elbow and wrist (). These results support previous evidence linking playing-side shoulder motion to racket speed (, 46, ) (Figure 10, Table 7).

The contralateral shoulder showed negative correlations between horizontal flexion-extension range and velocity and ball speed. This suggests that minimizing non-playing-side arm motion relative to the torso improves stroke efficiency. Stabilizing the contralateral shoulder through scapular muscles anchors the upper arm during forehand strokes, enhancing whole-body power transfer and movement consistency.

Researchers disagree about elbow angular velocity. Xiao et al. reported positive correlations between elbow angular velocity and ball speed (), while Zheng et al. found no significant correlation between playing-side elbow angular velocity and ball speed (). Chen et al. found that elite players had smaller elbow flexion angles but greater elbow flexion angular velocities at impact (). We found weak negative correlations between playing-side elbow angular range, angular velocities and ball speed (rws = −0.35 to −0.17) (Table 7, Figure 10). This difference may result from different motion phase divisions compared to other studies. Further experiments are needed to validate these findings.

Hip motion critically influences trunk rotation, which forms the foundation of kinetic chain initiation. Racket speed at impact was related to the hip axial rotation torque at the playing side (). While previous studies established the importance of hip kinematics (, 46), our analysis provides higher-resolution evidence that hip positional range and velocity (particularly along the x-axis) and inter-hip angular dynamics in the xz-plane positively correlate with ball speed (Figures 8, 9).

Force transmission begins with lower limb engagement, where playing-side leg activity (positive correlations) contrasts with contralateral leg stabilization (negative correlations) (Figures 8, 9). During forward swing, weight shifts toward the playing-side leg, positioning it closer to the rotational axis to bear load, while the contralateral leg balances and stabilizes rotation. Knee flexion-extension range and velocity negatively correlated with ball speed (Figure 10), indicating that minimizing knee movement during forward swing helps maintain efficient trunk rotation. Excessive knee motion appears to compromise this rotation, likely by introducing unnecessary vertical displacement that disrupts kinetic transfer.

Previous table tennis kinematic studies used keypoint positions and linear velocities (), body segment angles and angular velocities (, , , 50), and joint angles and angular velocities (, , 50). These metrics included mean values (), peak values (, ), and kinematic or racket movement characteristics at impact (, , , ). We comprehensively applied these metrics within the MediaPipe lightweight framework and provided more intuitive analysis of these kinematic features and their relationships with ball speed. Players with extensive professional training not only generate high-speed balls but also maintain excellent body movement stability and consistency (, , , 50). This stability is crucial for continuous, stable, high-speed striking in high-level competition.

Beyond individual performance assessment, MediaPipe-based analysis enables population-level insights into developmental trends. Between-subject correlations reveal that female players’ forehand speed increases with age and height before 14.3 years but plateaus after 14.3 years (Table 8, Figure 11). This analysis provides valuable guidance for athletes at different developmental stages. For example, young players from pre-adolescence to early adolescence should balance fundamental technical training with strength and speed development to improve ball velocity and enhance attacking capabilities. In contrast, during middle to late adolescence, players must prioritize technical, tactical, psychological, and fitness factors over reliance on physical growth to advance performance.

4.2 MediaPipe-based table tennis analysis solution

MediaPipe is an open-source framework created by Google that provides cross-platform machine learning solutions for real-time perception tasks including human pose tracking, body keypoint detection, hand tracking, facial analysis, face detection, object detection, and augmented reality applications. The framework offers superior computational efficiency with lower latency and cross-platform compatibility across Linux, macOS, Windows, Android, and iOS platforms, making it highly suitable for practical applications (). Its vision-based approach eliminates dependency on specialized hardware, enabling flexible deployment with consumer-grade cameras while maintaining computational efficiency. The system tracks 33 anatomical landmarks across consecutive frames to model temporal kinematics of human motion, effectively balancing accuracy with low computational overhead.

Researchers investigated MediaPipe’s reliability by comparing it with widely recognized accurate optoelectronic systems (e.g., VICON and Qualisys). Hii et al. used MediaPipe 3D for gait analysis and reported good to excellent agreement across spatiotemporal parameters, with good (ICC(2,1) ) to excellent (ICC(2,1) ) agreement in all temporal gait parameters except right-to-left leg transition time (ICC(2,1) ), attributed to the very short duration (0.20 s) (51). Roggio et al. applied MediaPipe to obtain 3D joint angles (shoulder adduction, hip adduction) from 250 healthy volunteers, confirming high reliability of ML-driven posture analysis (ICC 0.67–0.95), with hip adduction showing the highest ICC (0.95) and knee valgus showing the lowest (0.67) (52). Latreche et al. compared 3D measurements with goniometer and digital inclinometer results, finding MediaPipe shoulder motion measurements all showed ICC : shoulder abduction ICC 0.968, adduction 0.99, extension 0.99, flexion 0.992, indicating excellent reliability. Mean differences were compared to goniometer and compared to digital inclinometer, with 95% limits of agreement confirming good validity (53).

Despite questions about MediaPipe 3D measurement accuracy, particularly at specific angles or during occlusion (), MediaPipe 2D measurements have proven accurate and reliable (, ). Hamilton et al. compared MediaPipe 2D joint angles and range of motion with 3D motion capture systems (Qualisys), finding mean CV below 10% and CC 0.95, demonstrating MediaPipe 2D accuracy (). Some researchers compute 3D coordinates through post-processing of 2D measurements using multiple cameras (, 55). Ceriola et al. used two cameras to acquire 2D keypoints and estimated 3D coordinates through stereo triangulation, reporting minimum absolute errors of () and () for hip joints and () and () for knee joints (55). We did not map MediaPipe’s camera-based 3D coordinates to anatomical coordinate systems but preserved the original coordinates. This approach retains MediaPipe’s relatively accurate x and y values, while z-axis depth variations do not affect accuracy in the plane perpendicular to the camera axis (xy-plane).

4.3 Limitations and future works

The study has several limitations. First, despite including 8–10 forehand strokes per player, only the fastest and slowest strokes were paired to calculate within-subject correlation coefficients. Elite participants exhibited highly consistent stroke patterns, leaving minimal variations in body motions and ball speeds. Measurement errors occasionally blurred speed distinctions, misclassifying fast strokes as slow and vice versa. Prioritizing extreme-speed strokes mitigated overlap effects but reduced statistical power. Two solutions could resolve this issue: (1) integrating high-speed cameras for precise measurements, albeit at the cost of practicality, or (2) recruiting lower-skilled players, who inherently display broader ball speed variations. Future work will refine the ball speed measurement model for higher precision, expand the participant pool to include diverse skill levels.

Second, this study recruited female provincial athletes, which limits the generalizability of findings to other populations. For example, male athletes may display different kinematic characteristics due to variations in movement patterns and skill levels. Future research should include mixed-gender cohorts or develop population-specific feature models for different demographics, including gender, age, and training level.

Real-time systems offer greater value for technical diagnosis. However, implementing real-time solutions requires addressing several technical challenges: (1) Action segmentation: Deep learning models must classify continuous time-series data into discrete stroke types (e.g., forehand strokes, backhand strokes, forehand chops, and backhand chops). (2) Success/failure classification: The system must distinguish successful shots from faults by analyzing ball trajectories and automatically detecting net contacts or boundary violations. (3) Automated ball speed measurement: Current ball trajectory calibration relies on manually annotated video coordinates. Real-time automation requires machine learning approaches, such as Ji et al.’s framework (56), which integrates VOCUS-based image segmentation, LGP+Adaboost classification for smear detection, and dynamic ROI optimization to address environmental noise, motion blur, and computational delays. (4) Accurate racket-ball impact timing is essential for movement phase segmentation. Machine learning models must automatically detect trajectory discontinuities to precisely calibrate impact moments based on ball flight path changes. (5) Player movement tracking: Players move rapidly during rallies, causing partial occlusion or frame exit. Wide-angle lenses expand the field of view, while advanced deep learning algorithms can reduce occlusion effects.

5 Conclusions

This study scanned 33 skeletal landmarks, 19 segments, and 12 joints using MediaPipe to identify kinematic features linked to ball speed in table tennis forehand strokes. These features may enable lightweight technical evaluation. Ball speed increased with greater playing-side arm linear movement at the shoulder, elbow and wrist, as well as with enhanced rotational motion at the playing-side upper arm, shoulder line, and hip line. Conversely, ball speed decreased with excessive contralateral shoulder horizontal flexion/extension and playing-side elbow flexion-extension. These kinematic patterns comprehensively characterize forward stroke mechanics, providing critical metrics for technical assessment and improvement. MediaPipe demonstrated robust performance, showing high consistency during repetitive motions. Its low-cost, cross-platform compatibility, high computational efficiency, minimal hardware dependency, and open-source nature position it as a promising tool for real-time biomechanical analysis in table tennis training systems.

Statements

Data availability statement

The datasets presented in this study can be found in online repositories. The names of the repository/repositories and accession number(s) can be found below: https://doi.org/10.6084/m9.figshare.28881086.

Ethics statement

The studies involving humans were approved by The Ethics Committee of Nanjing Sport Institute. The studies were conducted in accordance with the local legislation and institutional requirements. Written informed consent for participation in this study was provided by the participants’ legal guardians/next of kin.

Author contributions

YL: Writing – original draft, Formal analysis, Software, Project administration, Writing – review & editing, Methodology, Validation, Conceptualization, Supervision, Investigation, Data curation. XD: Formal analysis, Methodology, Resources, Writing – review & editing, Investigation. CY: Writing – review & editing, Data curation, Methodology, Resources, Formal analysis, Investigation. QY: Conceptualization, Project administration, Supervision, Formal analysis, Writing – review & editing, Methodology, Validation, Software, Investigation, Resources, Data curation.

Funding

The author(s) declare that financial support was received for the research and/or publication of this article. This research is supported by the Ministry of Education of Humanities and Social Science project of China (Grant No. 19YJA890032).

Acknowledgments

We express our sincere gratitude to the female athletes who participated in this study, and to Coach Fengyu Jin and Coach Haijin He for their invaluable support of this research.

Conflict of interest

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Generative AI statement

The author(s) declare that no Generative AI was used in the creation of this manuscript.

Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.

Publisher’s note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

References

Summary

Keywords

motion analysis, MediaPipe, table tennis, forehand stroke, biomechanics

Citation

Lyu Y, Duan X, Yang C and Ye Q (2025) Development of a MediaPipe-based framework for biomechanical quantification of table tennis forehand strokes. Front. Sports Act. Living 7:1635581. doi: 10.3389/fspor.2025.1635581

Received

26 May 2025

Accepted

28 July 2025

Published

15 August 2025

Volume

7 - 2025

Edited by

Lei Zhao, Shandong Jianzhu University, China

Reviewed by

Datao Xu, Ningbo University, China

Guoxin Zhang, The Hong Kong Polytechnic University, Hong Kong SAR, China

Updates

Copyright

*Correspondence: Qiang Ye

Disclaimer

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.

Outline

Figures

Cite article

Copy to clipboard


Export citation file


Share article

Article metrics