0
$\begingroup$

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.

$\endgroup$
  • 1
    $\begingroup$ What is "principal axes length" and where the formula 2*2*sqrt(eigenValue) comes from? $\endgroup$ – enzotib Jun 3 '15 at 6:01
  • $\begingroup$ @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. $\endgroup$ – shrikant mehre Jun 3 '15 at 11:04
  • $\begingroup$ So you're saying: "I have accomplished this in 2D, and now I'm wondering how I can do it for 3D images"? $\endgroup$ – GPerez Jun 3 '15 at 12:50
  • $\begingroup$ @GPerez: Yes. Exactly. 'regionprops' from MATLAB will give axes length for 2D. I want to calculate it for 3D data. $\endgroup$ – shrikant mehre Jun 3 '15 at 13:11
1
$\begingroup$

If I understand correctly your question, your formula seems to be wrong.

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).

See section 4.5 of http://www.eng.auburn.edu/~marghitu/MECH2110/C_4.pdf .

$\endgroup$
  • $\begingroup$ I have verified lengths of major axis and minor axis with the output of 'regionprops' command in MATLAB. It is exactly matching with the value obtained using mentioned formula for 2D object. $\endgroup$ – shrikant mehre Jun 7 '15 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.