how can i find the orientation of blobs in 3D?

1 visualización (últimos 30 días)
Simone conigliaro
Simone conigliaro el 29 de Ag. de 2017
Respondida: Zhao Liu el 25 de Nov. de 2019
hi all, i have a problem about orientation of blobs in 3D. i used" regionprops(CC,' orientation)" to find orientation of blobs in 2D. the problem is that property is supported only for 2-D input label matrices. could you suggest a function that works for it?
i used regionprops to get centroid and volume
for i=1:numFrames I(:,:,)= imread(filfolder, filesep, fileNames{i} CC=bwconncom(I,26); Centroid=regionprops(CC,'centroid): c=struct2cell(centroid); c=c': B=cell2mat(c);% i have found centroid from complex 3D
Volume=regionprops(CC,'area'): c1=struct2cell(centroid); c1=c1': B=1cell2mat(c1);% i have found volume
i would like to find orientation but doesn't work. could you suggest a function?
thanks in advance

Respuestas (2)

Jim Joy
Jim Joy el 1 de Sept. de 2017
Hi Simone,
If you look closely at the "regionprops" documentation, it mentions that the 'orientation' property is calculated by using the angle between the 2nd moment of the region, and the x-axis. More or less, this means that an ellipse is fit to surround the region, and the angle between the x-axis and the semi-major axis of the surrounding ellipse is calculated.
To generalize to three dimensions, you have to fit an ellipsoid around each region in your image. There is a utility on the file exchange that performs this: https://www.mathworks.com/matlabcentral/fileexchange/34104-image-ellipsoid-3d
Note that "imIntertiaEllipsoid" works in R2017a, but some of the examples require functions that are available at one of the author's github repositories, linked below: https://github.com/mattools/matImage
Note the the last three elements of the output of "imIntertiaEllipsoid" correspond to the Euler Angles that define the ellipsoid's orientation.
Best Regards,
Jim

Zhao Liu
Zhao Liu el 25 de Nov. de 2019

Categorías

Más información sobre Linear Algebra en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by