Raport - System wraz z bibliotekÄ moduÅów dla zaawansowanej ...
Raport - System wraz z bibliotekÄ moduÅów dla zaawansowanej ...
Raport - System wraz z bibliotekÄ moduÅów dla zaawansowanej ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Raport</strong><br />
<strong>Raport</strong><br />
„<strong>System</strong> <strong>wraz</strong> z biblioteką modułów <strong>dla</strong> <strong>zaawansowanej</strong> analizy i<br />
interaktywnej syntezy ruchu postaci ludzkiej.”<br />
Projekt współfinansowany przez Unię Europejską ze środków Europejskiego Funduszu Rozwoju<br />
Regionalnego w ramach Programu Operacyjnego Innowacyjna Gospodarka 2007-2013.
Działanie nr 4.6 <strong>Raport</strong> nr: 4.6<br />
Tytuł: Segmentacja ruchu postaci<br />
Tytuł Projektu:<br />
„<strong>System</strong> <strong>wraz</strong> z biblioteką modułów <strong>dla</strong> <strong>zaawansowanej</strong> analizy i<br />
interaktywnej syntezy ruchu postaci ludzkiej”<br />
Data rozpoczęcia Projektu: 01/04/2009<br />
Czas trwania Projektu<br />
Koordynator Projektu:<br />
36 miesięcy<br />
Polsko Japooska Wyższa Szkoła Technik Komputerowych<br />
Termin przedłożenia <strong>Raport</strong>u 31/05/2011<br />
Autorzy:<br />
Akceptujący<br />
Dostępne na:<br />
Poziom rozpowszechniania<br />
Kamil Lebek, Jakub Stępieo<br />
prof. dr hab. inż. Konrad Wojciechowski<br />
ftp://83.230.112.38/opi/raporty<br />
PP<br />
str. 2
Summary<br />
Our aim was to provide flexible method of joint's limits estimation, employing PCA-based<br />
methods (essentially QuTEM model, which is a statistical model, containing probability densities of a<br />
joint's possible configurations). We believe that QuTEM addresses some of the problems of analyzing<br />
and interpreting joint motion data acquired using numerous available devices. The theoretical<br />
introduction is followed by a measurement noise robustness test and two usage scenarios describing<br />
actual, practical applications of this procedure.<br />
For testing purposes we implemented these procedures as MatLab scripts (with C3D files<br />
parsing handled through MatLab-compatible plugin written in C++/MEX) and ran offline on C3D files.<br />
Each of the aforementioned files contained motion data (inverse kinematics/dynamics) of a walking<br />
individual; every trial was recorded in our laboratory using Vicon Nexus with Plug-In-Gait postprocessing<br />
step. Final implementation was made in native C++, using the Eigen library - it allows user<br />
to access estimated joint limits, check an arbitrary joint configuration for a limit violation and<br />
generate random, valid joint configurations.<br />
str. 3
Document revision history<br />
Date Revision Author Change description<br />
20.06.20<br />
11<br />
1.0 Kamil Lebek Initial revision.<br />
str. 4
Table of contents<br />
Summary ............................................................................................................................................3<br />
Document revision history ..................................................................................................................4<br />
Table of contents ................................................................................................................................5<br />
Index of figures ...................................................................................................................................6<br />
1. Introduction ................................................................................................................................7<br />
1.1 Abstract ............................................................................. Błąd! Nie zdefiniowano zakładki.<br />
2. QuTEM ........................................................................................................................................9<br />
3. Use cases .................................................................................................................................. 10<br />
3.1 Knee angular data dimensionality reduction ...................................................................... 12<br />
3.1.1 Preprocessing the data .............................................................................................. 12<br />
3.1.2 Mean flexion axis ....................................................................................................... 12<br />
3.1.3 Projection .................................................................................................................. 12<br />
3.1.4 Results ....................................................................................................................... 13<br />
4. Conclusions and future work ..................................................................................................... 15<br />
5. Bibliography .............................................................................................................................. 17<br />
str. 5
Index of figures<br />
Fig 1 Calibration of knee joint frame of reference: (a) lateral axis roughly coincides with knee fexion<br />
axis so angle changes will mostly occur in a single channel; (b) knee flexion axis is between lateral and<br />
anterior axes and thus Euler angle decomposition will have significant changes in two channels ...... 11<br />
Fig 2 Euler angle data series of a knee joint (subject X). ..................................................................... 13<br />
Fig 3 Rotation around the mean flexion axis calculated in the dimensionality reduction .................... 14<br />
Fig 4 Euler angle data series of a knee before (dashed) and after (solid) aligning - normal data (subject<br />
W). ................................................................................................................................................... 15<br />
str. 6
1. Introduction<br />
Nowadays, it is hard to imagine a state of the art orthopedic or biomechanical facility devoid<br />
of computer-aided diagnostic systems. However crucial the great variety of specialized devices, tools<br />
and software may be, one must not forget that precision and repeatability of performed<br />
measurements is paramount since they have an obvious direct impact on the quality of ensuing<br />
analysis and research. Therefore, continuous leveraging of tools and techniques applied to verify and<br />
correct the measured data is crucial for reliability of the clinical motion analysis based on it.<br />
In this work we are focused on the errors and interpretation difficulties caused by imprecise<br />
estimation of joint parameters (i.e. centers and axes [20]). The most common way of defining joint<br />
parameters is by positioning joint markers over anatomical landmarks and then following a number<br />
of ad hoc rules which introduce numerous sources of error. This common procedure, referred to as<br />
the standard protocol [20] or the anatomical method [26], is best represented by the well known<br />
works [4, 5]. An alternative trend is to extract joint parameters from the actual relative motion of the<br />
limbs/segments [16, 10, 18, 12, 20] which releases the anatomical landmarks constraints. These<br />
methods utilize a wide variety of techniques (combinations of kinematic constraints, optimization<br />
and non-parametric statistical methods) but often lack generality and robustness in the presence of<br />
factors such as noise in the data or small ranges of captured motion. What is also noteworthy is that<br />
not all of the cited procedures provide both joint centers and axes of rotation as their results. In this<br />
context the procedure presented in [20] stands out, since, as reported in [26], it copes best with the<br />
aforementioned di-culties, while providing both joint centers and axes of rotation.<br />
The precise estimation of joint parameters is vital not only to the analysis of motion<br />
kinematics but also in the course of determining its causative factors [7] using the procedure of<br />
Inverse Dynamics (ID), which is very sensitive to a number of factors, including poorly estimated joint<br />
parameters [21].<br />
The aim of this paper is to describe an alternative procedure for estimating actual joint axes.<br />
We propose to utilize QuTEM [17] (Quaternion Tangent Ellipsoid at the Mean) distribution of the<br />
given joint's quaternion series, which is essentially Principal Component Analysis performed on<br />
logarithmically mapped quaternion series in a tangent space at mean. To the best of our knowledge,<br />
so far QuTEM has not been used in the context of clinical gait/motion analysis.<br />
The natural applications of the proposed technique include:<br />
• estimating bases/coordinate frames in which the relative limb rotation introduced by a joint<br />
is expressed in anatomically justied and intuitive terms<br />
• reducing the dimensionality of joint angular data if the relative motion of a limb in certain<br />
dimensions/degrees of freedom can be neglected for specific experimental scenarios<br />
str. 7
Having described the theoretical foundations behind QuTEM, we shall prove its usefulness by<br />
providing two sample usage scenarios as well as proposing prospective development of this method<br />
to make it more reliable in the context of clinical motion measurement and analysis.<br />
str. 8
2. QuTEM<br />
QuTEM, as introduced by Johnson [17] in his thesis, is an abbreviation of Quaternion Tangent<br />
Ellipsoid at the Mean. Basically, it is a statistical model of an individual joint learnable from example<br />
motion data (e.g. motion capture). While QuTEM distribution might be mathematically similar to<br />
Bingham distribution [2], it employs wrapping approach [13] (tangential space) instead of being<br />
estimated directly in R4. The main idea of this particular approach can be summarized as wrapping<br />
zero-mean Gaussian distribution in R3 onto a hemisphere of S3 using the exponential map at the one<br />
of the modes (unit quaternion manifold (S3) embedded in R4). Full model consists of the mean joint<br />
coordinate frame, principal axes of joint variation (plus variances associated with them) and joint<br />
limits defined as isoprobability contour beyond which probability density is equal to zero (impossible<br />
joint configurations). It allows us to learn the probability density from motion data, sample new<br />
points from that density and test if arbitrary joint orientations violate estimated joint limits.<br />
str. 9
3. Use cases<br />
We will now present two scenarios in which we have found QuTEM particularly useful in the<br />
context of practical human gait analysis. These applications were inspired/provoked by the<br />
imperfections of the measurements performed using well known Vicon Motion Capture <strong>System</strong> and<br />
certain level of indetermination in anatomical measures of joint motion [8, 15].<br />
First scenario concerns the dimensionality reduction of knee angular data, which - although<br />
in fact acting as a 3DoF rotational joint (not to mention the translational movement [14]) - is<br />
commonly and intuitively simplied to a single-DoF joint because the fact that the knee exion axis is<br />
almost constant [14, 19, 9, 24]. The simplest way of extracting a single-axis of rotation is to observe<br />
only the sagittal plane motion of a limb [22, 14]. We claim, however, that important motion<br />
information may be lost by blindly defining the simplified joint with the mediolateral axis and thus<br />
propose to employ QuTEM to extract the actual dominant axis of rotation.<br />
The second scenario is focused on correcting the orientation of the joint/segment coordinate<br />
frames output from the Vicon software. The problem is that the exact orientations of these frames<br />
are random to some extent since the procedure of their estimation heavily depends on a number of<br />
factors which are hard to control in practice [25]. Obviously, the orientation of the reference frames<br />
directly inuences the Euler angles (rotation convention chosen by Vicon) describing the joint motion<br />
(Figure 1). The more flaws and imprecision occur in the measurement process, the further measured<br />
Euler angles float away from the actual anatomical angles making the nal output highly<br />
counterintuitive and extremely hard for clinicians to assess (visually). However, one should notice<br />
that it is possible to dramatically improve the quality of motion data stored as Euler angle series only<br />
by rotating local reference frames of adjacent segments (Figure 1). Therefore, we propose to use<br />
QuTEM to determine the dominant, orthogonal axes of rotation and use them as basis vectors for<br />
the segment reference frames in order to correct the joint angle data and thus enhance its<br />
readability.<br />
str. 10
Fig 1 Calibration of knee joint frame of reference: (a) lateral axis roughly coincides with knee fexion axis<br />
so angle changes will mostly occur in a single channel; (b) knee flexion axis is between lateral and anterior<br />
axes and thus Euler angle decomposition will have significant changes in two channels<br />
Additionally, the noise robustness of the method is tested by conducting the second scenario<br />
using noisy data.<br />
The proposed (or equivalent) post-processing procedures are not the only way of obtaining<br />
the goals of measured data correction or dimensionality reduction but the alternative is quite<br />
cumbersome. It boils down to employing the so called static trial step (mocap equipment calibration<br />
before performing data acquisition of each patient) - one can manipulate knee markers until knee<br />
exion axis "matches" (roughly) the real one. Despite giving acceptable results, the above-mentioned<br />
procedure is obviously very time consuming. Interestingly, Vicon seems to favor this approach by<br />
promoting a third party device called KAD (knee alignment device) making "knee calibration" faster.<br />
The detailed description of the proposed application scenarios is provided in the forthcoming<br />
sections. For testing purposes we implemented these procedures as MatLab scripts (with C3D files<br />
parsing handled through MatLab-compatible plugin written in C++/MEX) and ran offline on C3D files.<br />
Each of the aforementioned files contained motion data (inverse kinematics/dynamics) of a walking<br />
individual; every trial was recorded in our laboratory using Vicon Nexus with Plug-In-Gait postprocessing<br />
step. To avoid biased conclusions, the experiments were conducted using motion data of<br />
subjects with normal and impaired physical mobility. For convenience, the subjects chosen for this<br />
article are encoded (X - W) and rigidly assigned to specific experiments:<br />
• subject X (male, 66, left/right knee osteoarthritis) - scenario 1<br />
• subject Y (male, 26, healthy) - scenario 2<br />
• subject Z (female, 64, lumbar and cervical spine osteoarthritis) - scenario 2<br />
• subject W (female, 22, healthy) - noise robustness<br />
str. 11
3.1 Knee angular data dimensionality reduction<br />
3.1.1 Preprocessing the data<br />
The first step extracts quaternion time-series representing relative rotation at the knee joint.<br />
Vicon's C3D les, aside from the standard marker data, contain trajectories of artificial markers (virtual<br />
markers estimated by Plug-In-Gait). Their names are suffixed withO, A, L and P denoting origin,<br />
anterior, lateral and vertical axes of the given segment, respectively. In case of the knee joint the<br />
considered segments are RFE/LFE (right/left femur) and RTI/LTI (right/left tibia) which dene the two<br />
coordinate frames in the global coordinate system. Therefore, the virtual markers of interest are:<br />
RFEO/LFEO, RFEA/LFEA, RFEL/LFEL and so on, accordingly with the above-described naming<br />
convention.<br />
Knee orientation (or more precisely tibia segment orientation relative to femur segment) can<br />
be easily found by normalizing given basis vectors and treating them as rotation matrices. Having<br />
determined the rotation matrix expressing orientation of tibia segment relative to femur segment,<br />
we can compare our results with Vicon's Euler angles (proof of concept [11]) to ensure the<br />
correctness of the conversion or go straight to quaternion representation treating the matrix in<br />
question as a direction-cosine matrix [3].<br />
As a result of this initial processing we obtain inverse kinematics data of the given joint<br />
expressed as quaternion series, defining tibia segment orientation relative to femur segment.<br />
3.1.2 Mean flexion axis<br />
Intuitively, one may think of this step as finding the most common flexion axis by extracting<br />
an average rotation direction from a given quaternion sequence.<br />
In this processing stage we apply QuTEM to analyze the quaternion series in order to extract<br />
principal axes in the warped tangent space. These axes represent greatest variances ordered<br />
decreasingly. Properly processed data for a knee joint should exhibit a close correlation between<br />
joint exion axis and the extracted highest variance axis (later referred to as a mean exion axis).<br />
Therefore, this stage of the procedure requires taking an arbitrary non-zero point lying on the<br />
highest variance axis in the scaled tangent space (R3 space tangent to R4) with respect to QuTEM by<br />
employing SMT mapping.<br />
There resulting quaternion contains an arbitrary rotation (irrelevant in this stage) around the<br />
most common rotation axis. By extracting and re-normalizing the vector part of that quaternion, we<br />
can express the mean flexion axis as a R3-vector.<br />
3.1.3 Projection<br />
str. 12
Finally, thanks to the SMT, we can reduce the joint dimensionality by projecting (in the scaled<br />
tangent space) each quaternion in the sequence onto the previously determined mean flexion axis.<br />
Projection can be calculated directly in that space by extracting the rest component of the resulting<br />
3-component vectors (s) (SMT mapping with respect to the QuTEM aligns trial data to the principal<br />
axes).<br />
3.1.4 Results<br />
Figure 2 depicts the Euler angle data series of a knee joint. Calculating QuTEM model<br />
parameters for that particular motion data enabled us to estimate the mean flexion axis and describe<br />
the whole sequence of the orientations as a rotation around a single axis. As one can see in Figure 3,<br />
the aforementioned rotation can be expressed as one channel series (one-dimensional case) - yet it<br />
shares the specific features and shape of 3-dimensional Euler angle decomposition. We believe that<br />
presented dimensionality reduction method offers high quality results with a minimal amount of<br />
data loss, which is thanks to variance-based approach (low-variance direction components were<br />
projected on the highest variance direction).<br />
Fig 2 Euler angle data series of a knee joint (subject X).<br />
str. 13
Fig 3 Rotation around the mean flexion axis calculated in the dimensionality reduction<br />
process (subject X).<br />
str. 14
4. Conclusions and future work<br />
The presented usage scenarios have proven that QuTEM can be a very useful tool for motion<br />
analysis but along the process of implementation and testing we have come to the conclusion that it<br />
has a few limitations. Firstly, if the angle between femur and tibia segment in the coronal plane is<br />
large (more than 20-30 degrees) we might still have the impression of more than 1 DoF (basis vectors<br />
of femur and tibia reference frames will not be even roughly parallel in a neutral position). Another<br />
erroneous case involves misplaced markers causing twisting motion of a joint (along vertical axes) -<br />
statistically correct mean flexion axis placement might be quite unnatural from the anatomical point<br />
Fig 4 Euler angle data series of a knee before (dashed) and after (solid) aligning - normal data (subject<br />
W).<br />
of view.<br />
Currently, we plan on developing a similar solution for spherical joints (e.g. 3 DoF ankle or hip<br />
joints) enabling us to create a unified and robust algorithm to be used in medical diagnostics.<br />
Another step could involve creating a joint model incorporating translational element, thus providing<br />
a full joint model for the state of the art diagnostic environments.<br />
An interesting secondary conclusion drawn in the course of the research is that nonzero<br />
variances in QuTEM distribution of knee inverse kinematics data (expressed as a quaternion series)<br />
may confirm that knee flexion axis varies over time [14, 19]. However, additional research is required<br />
in order to clearly distinguish between the genuine movement of the knee flexion axis and<br />
str. 15
potentially misleading artifacts due to imperfect data acquisition method (markers placed on soft<br />
tissue) and intrinsic limitations of the model itself (constant CoR position assumed).<br />
str. 16
5. Bibliography<br />
[1] Mahalanobis P. C.: On the generalised distance in statistics. Proceedings of the National Institute<br />
of Sciences of India 2 (1): 49-55.<br />
[2] Bingham C.: An antipodally symmetric distribution on the sphere. Annals of Statistics, 2(6):1201-<br />
1225<br />
[3] Klumpp A. R.: Singularity-Free Extraction of a Quaternion from a Direction-Cosine Matrix. Journal<br />
of Spacecraft and Rockets. Vol. 13, p. 754-755<br />
[4] Kadaba M. P., Ramakrishnan H. K., Wootten M. E.: Measurement of lower extremity kinematics<br />
during level walking. Journal of Orthopaedic Research, 8(3), 383-92<br />
[5] Davis I., Ounpuu S., Tyburski D., Gage J. R: A gait analysis data collection and reduction technique.<br />
Human Movement Science, 10(5), 575-587<br />
[6] Stokes I. A. F., Blanchi J., Allard P.: Three-Dimensional Analysis of Human Movement. Human<br />
Kinetics Publishers, 92-94<br />
[7] Vaughan C. L.: Are joint torques the Holy Grail of human gait analysis?. Human Movement<br />
Science, 15(3), 423-443<br />
[8] Crawford N. R., Yamaguchi G. T., Dickman C. A.: Methods for determining spinal exion/extension,<br />
lateral bending, and axial rotation from marker coordinate data: Analysis and renement. Human<br />
Movement Science, 15(1), 55-78<br />
[9] Zhang L., Zeng K., Wang G., Nuber G.: Dynamic And Static Properties Of The Human Knee Joint In<br />
Axial Rotation, Proceedings of IEEE/EMBS Oct. 30 - Nov. 2, Chicago, USA<br />
[10] Halvorsen K., Lesser M., Lundberg A.: A new method for estimating the axis of rotation and the<br />
center of rotation. Journal of Biomechanics 32(), 1221-1227<br />
[11] Slabaugh G. G.: Computing Euler angles from a rotation matrix<br />
[12] O'Brien J., Bodenheimer R. J., Brostow G., Hodgins J.: Automatic joint parameter estimation from<br />
magnetic motion capture data. In: Proceedings of the Graphics Interface, 53-60<br />
[13] Mardia K. V., Jupp P. E.: Directional Statistics. JohnWiley and Sons, Ltd.<br />
[14] Moorehead J. D., Harvey D. M., Montgomery S. C.: A Surface-Marker Imaging <strong>System</strong> to Measure<br />
a Moving Knee's Rotational Axis Pathway in the Sagittal Plane. IEEE Transactions On Biomedical<br />
Engineering, Vol. 48, No. 3<br />
str. 17
[15] Schache A. G., Wrigley T. V, Blanch P. D., Starr R., Rath D. A., Bennell K. L.: The effect of differing<br />
Cardan angle sequences on three dimensional lumbo-pelvic angular kinematics during running.<br />
Medical Engineering & Physics, 23(7), 495-503<br />
[16] Gamage, S. S. H. U., Lasenby J.: New least squares solutions for estimating the average centre of<br />
rotation and the axis of rotation, Journal of Biomechanics 35(), 87-93<br />
[17] Johnson M. P.: Exploiting Quaternions to Support Expressive Interactive Character Motion.<br />
Thesis (Ph. D.), Massachusetts Institute of Technology.<br />
[18] Halvorsen, K.: Bias compensated least squares estimate of the center of rotation. Journal of<br />
Biomechanics 36(), 999-1008<br />
[19] Gil J. D., Stindel E., Guillard G., Hamitouche C., Roux C.: Detection Of The Functional Knee Center<br />
Using The Mean Helical Axis: Application In Computer Assisted High Tibial Osteotomy. In Proceedings<br />
of ISBI'2004. p.1557-1557<br />
[20] Schwartz M. H., Rozumalski A.: A new method for estimating joint parameters from motion data.<br />
Journal of Biomechanics, 38(1), 107-116<br />
[21] Robert T., Che`ze L., Dumas R., Verriest J.-P.: Validation of net joint loads calculated by inverse<br />
dynamics in case of complex movements: Application to balance recovery movements. Journal of<br />
Biomechanics, 40(11), 2450-2456<br />
[22] Blajer W., Dziewiecki K., Mazur Z.: Multibody modeling of human body for the inverse dynamics<br />
analysis of sagittal plane movements. Multibody <strong>System</strong> Dynamics, 18(2), 217-232<br />
[23] Ehrig, R. M., Taylor, W. R, Duda, G. N, Heller, M. O.: A survey of formal methods for determining<br />
functional joint axes. Journal of Biomechanics, 40(10), 21502157<br />
[24] Yu L., Tang X., Du L., Rao C.: Measurement-based Research on the Biomechanics Characteristics<br />
of a Knee Joint. 2nd International Conference on Bioinformatics and Biomedical Engineering<br />
[25] Gorton G. E., Hebert D. A., Gannotti M. E.: Assessment of the kinematic variability among 12<br />
motion analysis laboratories. Gait & Posture, 29(3), 398-402<br />
[26] Rusaw D., Ramstrand N.: Sagittal plane position of the functional joint centre of prosthetic<br />
foot/ankle mechanisms. Clinical Biomechanics, 25(7), 713-20<br />
[27] Kun L., Inoue Y., Shibata K., Enguo C.: Ambulatory Estimation of Knee-Joint Kinematics in<br />
Anatomical Coordinate <strong>System</strong> Using Accelerometers and Magnetometers. Transactions On<br />
Biomedical Engineering, Vol. 58, No. 2<br />
str. 18