Code covered by the BSD License  

Highlights from

5.0 | 1 rating Rate this file 27 Downloads (last 30 days) File Size: 3.51 KB File ID: #47578 Version: 1.3
image thumbnail



Joe Yeh (view profile)


16 Aug 2014 (Updated )

Measure geometric properties (e.g. long axis, eccentricity, etc.) of image objects in 3D.

| Watch this File

File Information

    This function measures geometrical properties of image objects in 3D, including directions of three principal axes, lengths of the axes, eccentricity and centroid. The input can be either unlabeled 3d binary image or the 3d array of double type generated by the bwlabeln function if user wishes to specify connectivity other than default value. Alternatively, the function can take pixel list in the form of an Mx3 matrix or a structured array of Mx3 matrices (such as the output of regionprops) as input.
    This function treats pixels contained in an image object as a 3-variable normally distributed dataset and identifies the major axis by finding the most significant eigenvector of the covariance matrix between the three cooridanates(x,y,z).

Required Products Image Processing Toolbox
MATLAB release MATLAB 8.3 (R2014a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
27 Nov 2014 Ilya Belevich

btw, could you please fix the function for the situations when the object consists of a single pixel.
For example,

L = zeros([5,5,5],'uint8');
L(3,3,3) = 1;
result = regionprops3(L, 'Eccentricity');
result = regionprops3(L, 'AllAxes');

thank you!

Comment only
26 Nov 2014 Ilya Belevich

Great function, thank you for sharing!

19 Aug 2014 1.1

Summary edited

07 Sep 2014 1.2

Correct a mistake in the previous version and add a few more outputs.

08 Sep 2014 1.3

Correct minor mistake in the function

Contact us