필터 지우기
필터 지우기

detect the centerline of 3D data points

조회 수: 8 (최근 30일)
Penny
Penny 2017년 12월 8일
댓글: ng 2019년 8월 20일
Hello, everyone. I am trying to detect the centerline of a set of 3D points. These 3D points are plotted and the figure is attached.
Does anybody know how to detect the centerline of these 3D data points. The equation of this centerline may be z = k1*x+k2*y+b; The coordinates of the 3D points are stored in X, Y, Z.
  댓글 수: 3
Matt J
Matt J 2017년 12월 8일
Do the points lie on the surface of a circular cylinder, or some more general surface?
Penny
Penny 2017년 12월 8일
Yes, the points lie on the surface of a circular cylinder. But not a regular cylinder

댓글을 달려면 로그인하십시오.

채택된 답변

Matt J
Matt J 2017년 12월 8일
편집: Matt J 2017년 12월 8일
If the parametric equations for the line is L(t)=m+t*d, the following should give a good estimate of m and d, as long as the sampling of the surface is uniformly distributed,
A=[X(:),Y(:),Z(:)];
m=mean(A,1).';
A=A-m.';
[~,~,V]=svd(A,0);
d=V(:,1);
  댓글 수: 8
Matt J
Matt J 2019년 8월 20일
편집: Matt J 2019년 8월 20일
I am beginning to think it could be because the top and bottom edges of the cylinder are not perpendicular to the expected axis which is why there is the slight angle.
That would definitely contribute, but even more generally than that, we don't expect exact results when fitting noisy data.
ng
ng 2019년 8월 20일
That is a fair point. Thank you for taking a look.

댓글을 달려면 로그인하십시오.

추가 답변 (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