# What is the relation between eigen values and principal axes length for 3D data?

For a region in an binary image, I have calculated co-variance matrix using co-ordinates of region. Using co-variance matrix, I got two eigen values. Later I have calculated major axis length and minor axis length using the formula $4\sqrt{\lambda_i}$ where the $\lambda_i$ are the eigenvalues. This formula is mentioned in the below given link 3-sigma Ellipse, why axis length scales with square root of eigenvalues of covariance-matrix. I have verified lengths of major axis and minor axis with the output of 'regionprops' command in MATLAB. It is exactly matching for 2D object. Now, I want to calculate principal axes lengths (major, middle and minor axis lengths) for 3D object data. For that I want a relation between eigen values obtained from 3D object co-ordinates (using same procedure mentioned above) and principal axes lengths for 3D data. 'regionprops' command in MATLAB do not work for 3D object.

• What is "principal axes length" and where the formula 2*2*sqrt(eigenValue) comes from? – enzotib Jun 3 '15 at 6:01
• @enzotib: Three dimensional object will have major axis, middle axis and minor axis. These axes are called principal axes. Formula mentioned above is taken from [link] (math.stackexchange.com/questions/911792/…). I have verified lengths of axes using mentioned formula and using 'regionprops' from Matlab. – shrikant mehre Jun 3 '15 at 11:04
• So you're saying: "I have accomplished this in 2D, and now I'm wondering how I can do it for 3D images"? – GPerez Jun 3 '15 at 12:50
• @GPerez: Yes. Exactly. 'regionprops' from MATLAB will give axes length for 2D. I want to calculate it for 3D data. – shrikant mehre Jun 3 '15 at 13:11

In three dimensions the distribution of mass could be represented by the inertia ellipsoid, whose equation, in a principal frame is $$I_x x^2 + I_y y^2 + I_z z^2 = 1,$$ so that the length of the axes of the ellipsoid are $a_i = 1/\sqrt{I_i} = 1/\sqrt{\lambda_i}$ (the principal moments of inertia are the eigenvalues of the inertia matrix).