Introduction

In recent years, the use of optical motion capture systems (MOCAPs) has focused on digital animation of human activity of characters for the film and video game industry. Therefore, this technology has made rapid inroads in the field of human motion analysis and measurement because it provides accurate and reliable spatiotemporal measurements, versatile testing schemes, high spatial measurement resolution, and relative ease of implementation [1,2,3,4]. MOCAPs employ a single camera (measurement 2-D) or more cameras (measurement 3-D) and sophisticated computer algorithms, which allow for a detailed assessment of anthropic activities [5,6,7,8,9]. In the case of human gait, compared to traditional methods such as wearable sensors or force plates, optical systems offer non-invasive tracking, allowing for a more natural and unconstrained physical motion analysis [10,11,12]. This non-intrusive approach is particularly beneficial in the analysis of the dynamic interaction of human gait with civil structures [13,14,15,16,17,18], where it is important to capture and analyze motion patterns in a manner that does not disrupt the natural gait of the test subject (TSs) while transiting structures.

The accuracy of MOCAP systems is outstanding because of advanced algorithms and calibration techniques, which achieve millimeter accuracy in tracking the position and orientation of body segments, enabling a detailed understanding of the kinematics and kinetics of human gait. This level of accuracy is important for acquiring subtle movements and biomechanical parameters during gait analysis. Accurate measurements are essential for detecting abnormalities, assessing rehabilitation progress, and designing customized interventions. By providing highly reliable data, MOCAP systems offer researchers and clinicians valuable tools for studying and evaluating human gait dynamics. Numerous MOCAPs technologies have been developed and are widely used today [19,20,21,22]. Marker-based systems, often considered the gold-standard method to quantify human activities, involve the attachment of retroreflective markers to specific body landmarks, allowing the precise tracking of their positions. These markers reflect the light emitted by the environment, thereby enabling accurate position and orientation calculations [23,24,25]. On the other hand, Markerless systems use computer algorithms to identify and track anatomical features without the need for markers. These markerless approaches leverage pattern recognition and machine-learning techniques to analyze captured video data and estimate joint positions and movements [9, 19, 21, 26]. Examples of popular marker-based systems used for the assessment of human gait include Vicon [15, 27,28,29], CODA [15, 18, 30, 31], and OptiTrack [32,33,34,35,36,37,38,39], whereas markerless systems such as Kinect [24, 40,41,42,43] and OpenPose [19, 44,45,46,47,48,49] have gained prominence in recent years.

The market prices of MOCAP systems are often very expensive [27]. These systems are frequently tailored for specific applications and offer advanced features and capabilities. However, the high costs associated with these systems make them inaccessible in many research and clinical settings, thereby limiting their widespread adoption and implementation. To address this problem, there is an increasing need to develop low-cost optical technologies that can provide accurate motion capture capabilities, while remaining affordable. By developing cost-effective and reliable solutions, researchers and clinicians can access motion analysis tools and promote their integration into various human gait analysis fields [11, 12, 19, 41, 42]. Smartphones are potential devices for integrating the MOCAP systems. Smartphones are equipped with high-resolution cameras, substantial computational power, and portability, making them attractive platforms for implementing motion capture technologies [50,51,52,53]. In addition, the general accessibility of smartphones to society allows researchers to develop low-cost solutions that utilize built-in cameras and combine them with computer vision algorithms to capture and analyze the human gait. The versatility of smartphones allows for real-time data processing [54,55,56], immediate feedback [51, 57, 58], and seamless integration with other applications for data visualization and analysis [52, 53, 57, 59].

Although continuous advancements in smartphone technology have enhanced their potential as MOCAPs devices, the evaluation of the accuracy, performance, and cost-effectiveness of motion capture using this type of low-cost device in comparison with gold-standard methods, such as marker-based systems, for assessing human gait is still in its early stages. This study compared the x-y trajectory in sagittal plane gait measured using two marker-based MOCAP systems: a custom low-cost MOCAP system using a smartphone device and a commercial MOCAP system known as OptiTrack. In order to evaluate human gait using a low-cost MOCAP system, cameras of Huawei Ascend G7 smartphones as devices within a Marker-based system were integrated to evaluated three TSs (65.00 ± 8.00 kg, and 1.65 ± 0.10 m) in the sagittal plane, subjected to three walking speeds (1.50, 1.90, and 2.30 \(m\bullet {s}^{-1}\)) on a treadmill. The obtained results were compared with those of tests using the OptiTrack system. The remainder of this paper is organized as follows. Section "ExperimentaL Methods" provides details of the experimental methods. In Section "Results", the results obtained for both the MOCAP systems are presented and evaluated. Finally, section "Discussion" presents a discussion of the results.

Experimental Methods

Investigation General Design

This investigation assessed the spatiotemporal behavior of human gait through two MOCAP systems: a Marker-based OptiTrack system and Low-cost Smartphone systems. Three TSs were selected for these gait tests and their general anthropometric information was recorded. Initially, TSs were equipped with passive-retro-reflective markers. The TSs then walked on the treadmill for at least 2.0 minutes to allow them to adapt to the testing environment. Subsequently, the TSs performed gait tests for 3.0 minutes, whereas body kinematics and smartphone videos were collected for both MOCAP systems. The data collected during the human gait tests were used in this investigation to compare the tracking performance of the OptiTrack system and marker-based motion capture with a smartphone camera for assessing gait kinematics.

Test Subjects (TSs)

Three TSs (2 female, 1 male, 24.6 ± 5.5 years, 172.3 ± 11.2 cm, and 71.6 ± 9.6 kg) were volunteers in this investigation. Basic anthropometric information on the TSs was obtained by physical measurements using a tape measure to provide relevant reference data for similar investigations. The anthropometric measurements of the TSs are shown in Table 1 according to the scheme shown in Fig. 1. All TSs were free of injuries for at least one month, had a body mass index (BMI) of less than 25.5 (Normal weight level), and were in the 20–30-year age range.

Table 1 Anthropometric information
Fig. 1
figure 1

Schematic anthropometric information

Assembly, Acquisition, and Calibration Setup

Assembly setup

The experimental setup, as shown in Fig. 2, was developed in the Laboratory of Seismic engineering and Structural at Universidad del Valle, Cali, Colombia, and consists of a SOLE F65 treadmill (belt length and width 1.40 × 0.55 m, 60 Hz belt speed update frequency, and 0.5–10 \(m\bullet {s}^{-1}\) speed range) on which the human gait of the three TSs in this study was performed. A rigid fame, set up at a horizontal distance of 2.25 m parallel to the sagittal plane of the treadmill, was used as a support for the six interconnected 3-D motion capture system with their acquisition integrated circuit (OptiTrack system) and a Huawei Ascend G7 smartphone system with a 13-megapixel main camera. Both video and motion capture data were recorded using both MOCAP systems. Each optical system transferred the information to laptops, which processed the data captured during human gait tests. A flash of light and an audible beep were used at the beginning and end of each human gait test, respectively, to synchronize the data from both systems.

Fig. 2
figure 2

Scheme setup: experimental assembly (left), and Schematic assembly (right)

Pinhole camera model calibration

The pinhole camera model is based on the model proposed by J. Bouguet [60], as presented in equation (1), where \({Depth}_{u}\) corresponds to approximated depth value to the sagittal plane, \(({x}_{u},{y}_{u})\) are undistorted depth pixel coordinates, and \({(f}_{x}{,f}_{y,}{c}_{x}{,c }_{y})\) are intrinsic parameters of the camera. This model requires camera calibration to calculate the intrinsic and extrinsic parameters of a smartphone camera. The extrinsic parameters represent the location of the camera in the 3-D scene and the intrinsic parameters represent the optical center and focal length of the camera. The world points are transformed into camera coordinates using extrinsic parameters, and the camera coordinates are mapped onto the image plane using intrinsics parameters. A special calibration pattern-type checkerboard of 9 squares on the x-axis and 13 squares on the y-axis, with a square size of 7.0 cm each, was used as the reference object for calibration. In this study, 66 images of the checkerboard at different positions with randomness and the highest resolution were selected, close to the sagittal plane of the gait zone, to estimate the pinhole camera model parameters of the camera smartphone with a mean reprojection error per image of less than 0.25 pixels.

$$X=\left({x}_{u}-{c}_{x}\right)\bullet \frac{{Depth({x}_{u},{y}_{u})}_{u}}{{f}_{x}}$$
(1)
$$Y=\left({y}_{u}-{c}_{y}\right)\bullet \frac{{Depth\left({x}_{u},{y}_{u}\right)}_{u}}{{f}_{y}}$$

The intrinsic and extrinsic pinhole camera model parameters of the camera smartphone were calculated using the MATLAB function estimateCameraParameters, which uses images of the checkerboard at different positions. The intrinsic parameters are presented in Table 2.

Table 2 Smartphone Imaging Sensor Calibration Parameters

Data Collection Procedures

Initially, the MOCAP systems were calibrated using the procedure outlined in Section "ExperimentaL Methods"c for low-cost smartphone and the procedure recommended by the manufacturer for OptiTrack. Nine passive retroreflective adhesive markers, with a diameter of 12.0 mm were attached to specific joints of the human body, as shown in Fig. 3. Prior to each gait test, the TSs were adapted to the gait velocity by walking on the treadmill for two-minutes. Tests were conducted at three velocities: 1.50, 1.90, and 2.30 \(m\bullet {s}^{-1}\), which were chosen as they are representative of the slow, normal, and fast velocities of human gait [61]. Marker-based MOCAP system data were simultaneously collected during all human gait tests and used for assessment in this investigation. In addition, the mean sample rate of the smartphone camera was determined in 29.85 ± 0.89 fps. Similarly, an average capture rate of 100.0 fps was reported for the OptiTrack system.

Fig. 3
figure 3

Example images from one test subject in the test set showing the identified landmarks with OptiTrack and low-cost smartphone systems

Marker-based OptiTrack and Low-Cost Smartphone System Data Processing

Gait kinematics were acquired using a middle-body sagittal model (human middle body, compound of seven rigid body segments generated by nine passive retroreflective markers), and the output was processed using custom algorithms in MATLAB to extract the joint coordinates. The anatomical joints were then labelled as the head, shoulder, elbow, wrist, hip, knee, ankle, heel, and metatarsus, as shown in Fig. 3. Although the OptiTrack system tracks and computes gait kinematics using its own hardware and software, the low-cost MOCAP system tracks each of the nine passive retroreflective markers in each video frame. The spatial position of each marker in the gait-plane was determined using the calibration parameters and the custom algorithms developed in MATLAB. The x-y positions of the nine reflective markers of the TSs were acquired and processed for all the test times. On the other hand, when a measurement contained incorrect data or empty data owing to non-redundancy capture or occluded marker (Figure , right), the gaps were filled with a combination of splines and estimated from previous data. The biomechanical results of marker-based motion capture were compared based on their potential relevance for acquiring kinematic data for human gait [6, 7, 13, 24, 25, 48]. Only the right side of the body was used for assessment as it was closest to the sagittal view in the MOCAP system. In addition, the length of the gait period acquired from the tests will be able to support the statistical analysis of performance between both MOCAP systems in subsequent studies, positioning these records as reference data.

Motion Capture Systems Performance Evaluation

The tracking accuracy of the low-cost smartphone system in comparison with the tracking realized by the gold standard system (OptiTrack) was performed using the coefficients of Normalized Root Mean Square Error (nRMSE) and goodness-of-FIT (FIT), as described in equations (2) and (3), for the assessed joint angles, which were generated by a passive retroreflective marker across all temporal assessments and all TSs. Both acquired data systems were resampled at a rate of 100.0 Hz for their comparison.

$$nRMSE= \frac{100}{x}\sqrt{\frac{1}{n}\sum_{j=1}^{n}{\left({y}_{OptiTrack}-{\widehat{y}}_{Smartphone}\right)}^{2}}$$
(2)
$$FIT= \left(1-\Vert {y}_{OptiTrack}-{\widehat{y}}_{Smartphone}\Vert /\Vert {y}_{OptiTrack}-promedio({y}_{OptiTrack})\Vert \right)$$
(3)

Where \({{\text{y}}}_{{\text{OptiTrack}}}\) and \({\widehat{{\text{y}}}}_{{\text{Smartphone}}}\) are the measurement signals (x-y trajectory) with the OptiTrack and low-cost smartphone systems, \(x\) is the normalization factor, which is equal to the difference between the maximum and minimum values in the required range of the reference signal and \(n\) is the data number.

Results

The x-y positions of the head, shoulder, elbow, wrist, hip, knee, ankle, heel, and metatarsus were acquired, according to the arrangement of the retroreflective markers in Fig. 4. The low-cost smartphone system performed an acceptable spatiotemporal tracking compared to that of the commercial OptiTrack system, as shown in Figure. In this figure, three representative gait cycles at a velocity of 1.90 \(m\bullet {s}^{-1}\) are shown for illustrative purposes and all other gait cycle data is included in the shaded bands. Likewise, hip, knee, and ankle relative angle in the sagittal plane were calculated with low-cost smartphone system data show joint extensions with minimal differences from those calculated with the OptiTrack system data for the gait velocities of 1.50, 1.90 and 2.30 \(m\bullet {s}^{-1}\), are shown in Fig. 5. The relative angles were selected in this comparative study because of their major contribution to the mechanical energy expenditure during gait tests, relevant to human gait models [62]. In these figures, the blue area is the size of the retroreflective marker calculated by the low-cost smartphone system, which for the x-y positions cover the trajectory determined by the OptiTrack system, evidencing the high accuracy in the tracking of this low-cost marker-based system.

Fig. 4
figure 4

Measured x-y trajectory of Subject No.1 at a gait velocity of 1.90 \({\text{m}}\bullet {{\text{s}}}^{-1}\) with OptiTrack and low-cost smartphone systems. The blue area is the size of the retroreflective marker calculated by the low-cost smartphone system

Fig. 5
figure 5

Relative angle calculated hip (θ1, left column), knee (θ2, middle column), and ankle (θ3, right column) with OptiTrack (red) and low-cost smartphone (blue) systems at gait velocities of 1.50 (top), 1.90 (middle), and 2.30 \({\text{m}}\bullet {{\text{s}}}^{-1}\) (bottom). The blue area is the size of the retroreflective marker calculated by the low-cost smartphone system

The nRMSE and FIT for the assessed joint relative angles, across all temporal assessments and all TSs for the low-cost smartphone system and OptiTrack system are reported in Table 3 at 1.50, 1.90 and 2.30 \(m\bullet {s}^{-1}\).

Table 3 Goodness of FIT and nRMSE for relative angles of the test subjects at 1.50, 1.90, and 2.30 \({\text{m}}\bullet {{\text{s}}}^{-1}\)

Discussion

The relative hip (\({\theta }_{1}\)) and knee (\({\theta }_{2}\)) angles, calculated from OptiTrack and low-cost smartphone system data, demonstrate a high level of accuracy in estimating human gait kinematics across all tested velocities. The goodness-of-fit averages above 88.93%, with an nRMSE average below 2.71%. This accuracy surpasses rates reported in previous studies for gait velocities between 2.5-3.4 \(m\bullet {s}^{-1}\) [63,64,65,66], as illustrated in Fig. 6. According to the resources to post-process data collected using the MOCAP systems described in Section "ExperimentaL Methods"e and the results in Section "Results", the low-cost smartphone system was more cost-effective than OptiTrack because of the simple calibration requirement and open-access algorithms. However, in the case of angle ankle (θ3), a lower performance was obtained, with an average goodness-of-FIT of 72.07% and nRMSE of 2.86%. This decrease in accuracy was due to the speed of angular movement of the ankle and the low capture rate of the low-cost smartphone system (≈30.0 fps) compared to the OptiTrack system (≈100 fps). These factors produced a deformation of the marker in the acquired frame-propagating error in the calculation of the marker centroid, as shown in Figure (right). This causes a decrease in the estimation of the ankle angle (θ3) and an increase in the noise of the calculated data; this situation has been previously reported in other studies [67]. In addition, the maximum peaks of the relative angles evaluated by both MOCAP systems were determined for all the TSs and velocities in this study, as shown in Table 4. These analyses demonstrated differences between the maximum relative angles calculated by both systems of less than 3.40% for speeds of 1.50-1.90 \(m\bullet {s}^{-1}\) and differences of less than 12.20% for speeds of 2.50 \(m\bullet {s}^{-1}\), which demonstrating the robustness and accuracy of the low-cost smartphone system for calculating kinematics for typical gait speeds.

Fig. 6
figure 6

Goodness of FIT calculated for Relative angle acquired with OptiTrack and low-cost smartphone systems at gait velocities of 1.50, 1.90, and 2.30 \({\text{m}}\bullet {{\text{s}}}^{-1}\) for TS1 (left), TS2 (middle), and TS3 (right)

Table 4 Maximum of relative angles of the test subjects at 1.50, 1.90, and 2.30 \({\text{m}}\bullet {{\text{s}}}^{-1}\)

Despite the optical redundancy demonstrated by the OptiTrack system (3D view) in the experimental setup (Fig. 2), there is a clear need for improvement in the spatial distribution of the optical devices around the TS to prevent the loss of kinematic data, even when only data in the sagittal plane of the gait are desired. In contrast, low-cost smartphone system uses a single optical device (2D view) and exhibits the inherent limitations of optical redundancy and spatial distribution, which can be overcome by combining the vision from multiple cameras to approach a three-dimensional view, as demonstrated in other studies [45, 53, 67,68,69]. However, based on the obtained results, the MOCAP system with smartphones achieves optimal performance with minimal errors compared with the commercial OptiTrack system, positioning it as a low-cost motion capture system with the potential for further development because of the rapid advancement of technical specifications in smartphones and their accessibility to the general population.

Limitations and Future Work

Overall, the results and discussion show that the low-cost smartphone system used as MOCAP systems exhibit a difference less than 3.40% in the maximum peak relative angles of the joints in the sagittal plane during treadmill gait compared to the commercial OptiTrack system for velocities less or equal than 1.90 \({\text{m}}\bullet {{\text{s}}}^{-1}\). However, the low capture rate of the smartphone device, combined with the lack of inherent redundancy, resulted in markers that moved at a higher relative speed during the gait cycles, experienced deformation during optical capture, generated noise in the estimation of the x-y trajectories, as shown in Figure (right), and consequently in the calculation of the relative angle of the ankle (θ3). To overcome these limitations, smartphones with higher capture rates and a greater number of strategically placed devices can be used to provide optical redundancy, thereby enabling more precise and reliable estimations. Additionally, this low-cost smartphone-based motion capture system is expected to be accurate and cost-effective, which can easily be achieved owing to the increasing technical specifications of this technology and its easy accessibility. The findings of this study establish a smartphone-based motion capture system as a precise, reliable, and cost-effective technology for the study and assessment of human gait. In addition, although these marker-based systems utilize paid software (e.g., MATLAB) for some of the data processing, further steps are necessary to implement these processing steps in free software (e.g., Python) without the need for coding to facilitate usage by practitioners. In this regard, the integration of real-time analysis is expected to provide an important tool for professionals and researchers, which can be achieved using recent tools focused on real-time pose estimation [58].