フィルターのクリア

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

1 回表示 (過去 30 日間)
Simone conigliaro
Simone conigliaro 2017 年 8 月 29 日
回答済み: Zhao Liu 2019 年 11 月 25 日
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

回答 (2 件)

Jim Joy
Jim Joy 2017 年 9 月 1 日
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 2019 年 11 月 25 日

カテゴリ

Help Center および File ExchangeLinear Algebra についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by