Code covered by the BSD License  

Highlights from
image ellipsoid 3D

5.0

5.0 | 1 rating Rate this file 19 Downloads (last 30 days) File Size: 55 KB File ID: #34104
image thumbnail

image ellipsoid 3D

by

 

Inertia ellipsoid of a 3D grayscale image

| Watch this File

File Information
Description

The function "imInertiaEllipsoid" computes inertia coefficients of the 3D image, and returns the associated equivalent 3D ellipsoid. The function "drawEllipsoid" can be used to display result.

The package also contains function imInertiaEllipse, that returns equivalent ellipse for 2D images. Results is similar to that obtained with IPT function regionprops, but with different output format. The result can be used directly with function 'drawEllipse'.

Display of 3D image in the example requires the "slicer" contribution, also on FileExchange (ID 27983).

Package includes functions from geom2d and geom3d contributions.

Acknowledgements

Geom2d and Geom3d inspired this file.

MATLAB release MATLAB 7.9 (R2009b)
Other requirements I've tried to pack all necessary functions within the package. Only functions for 3D image display are not included.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
30 Apr 2013 David Legland

For Kim (small update to my previous comment):
actually the coefficient of 2 produces an ellipsoid that encloses most of the image voxels. This can be seen as an analogy to the computation of the interval containing 95% of the values of a random variable following gaussian distribution: the interval is given by +/-1.96 times the square root of the variance around the mean.

Regards,
David

15 Apr 2013 David Legland

Hi Kim,
well, actually I do not remember where does the factor 2 comes from... I suppose I have adjusted manually such that the size of the resulting ellipsoid better fit the original image.

12 Apr 2013 Kim

I'm just wondering why you multiplied 2 by square root of eigenvalues (for covariance matrix of points) (i.e., singular values that means scaling factors in each dimension) when caculating lengths of semi-axes (radii) of an elllipsoid at the imInertiaEllipsoid.m

23 Jul 2012 Muhammad Mhajna  

Contact us