I want to find the end point coordinates of the major axis of a 3D object?

조회 수: 5 (최근 30일)
Naim
Naim 2017년 8월 11일
답변: Binu 2017년 8월 11일
I know how to find the major axis of a 2D object (with region props) but I'm having a hard time extending this to 3D objects. I want the coordinates (i.e x,y,z) of the end points as well. Any ideas how I might be able to achieve this?

채택된 답변

Binu
Binu 2017년 8월 11일
There is no 3D equivalent of regionprops to find major and minor axis. You could find the eigenvalues of your 3D point cloud which gives you the largest magnitudes in each axis(3 values if in 3D). Check documentation for the functions eigs or eig. If you do not know how to create a point cloud from a binary mask, try the boundary function
If you are looking for a quick solution, try fitting an ellipsoid fit(file exchange code) on your 3D point cloud using least squares. The radii this function returns will be your major, middle and minor axis. Ellipsoid fit
You can find the centroid by using a mean of your coordinates.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Point Cloud Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by