how can i find the orientation of blobs in 3D?
1 回表示 (過去 30 日間)
古いコメントを表示
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
0 件のコメント
回答 (2 件)
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
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Image Segmentation and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!