1

I have N 3D observations taken from an optical motion capture system in XYZ form. The motion that was captured was just a simple circle arc, derived from a rigid body with fixed axis of rotation. I used the princomp function in matlab to get all marker points on the same plane i.e. the plane on which the motion has been done.

(See a pic representing 3D data on the plane that was found, below)

http://i.imgur.com/ea9Pz20.png

What i want to do after the previous step is to look the fitted data on the plane that was found and get the curve of the captured motion in 2D. In the princomp how to, it is said that

The first two coordinates of the principal component scores give the projection of each point onto the plane, in the coordinate system of the plane.

(from "Fitting an Orthogonal Regression Using Principal Components Analysis" article on mathworks help site)

So i thought that if i just plot those pc scores -plot(score(:,1),score(:,2))- i'll get the motion curve. Instead what i got is this.

(See a pic representing curve data in 2D derived from pc scores, below)

enter image description here

The 2d curve seems stretched and nonlinear (different y values for same x values) when it shouldn't be. The curve that i am looking for, should be interpolated by just using simple polynomial (polyfit) or circle fit in matlab. Is this happening because the plane that was found looks like rhombus relative to the original coordinate system and the pc axes are rotated with respect to the basis of plane in such way that produce this stretch?

Then i thought that, this is happening because of the different coordinate systems of optical system and Matlab. Optical system's (ie cameras) co.sys. is XZY oriented and Matlab's default (i think) co.sys is XYZ oriented. I transformed my data to correspond to Matlab's co.sys through a rotation matrix, run again princomp but i got the same stretch in the 2D curve (the new curve just had different orientation now).

Somewhere else i read that

Principal Components Analysis chooses the first PCA axis as that line that goes through the centroid, but also minimizes the square of the distance of each point to that line. Thus, in some sense, the line is as close to all of the data as possible. Equivalently, the line goes through the maximum variation in the data. The second PCA axis also must go through the centroid, and also goes through the maximum variation in the data, but with a certain constraint: It must be completely uncorrelated (i.e. at right angles, or "orthogonal") to PCA axis 1.

I know that i am missing something but i have a problem understanding why i get a stretched curve. What i have to do so i can get the curve right?

Thanks in advance.

EDIT: Here is a sample data file (3 columns XYZ coords for 2 markers) w w w.sendspace.com/file/2hiezc

4

0 回答 0