필터 지우기
필터 지우기

SVD line fitting or ransac line fitting in multidimensionl image

조회 수: 5 (최근 30일)
prashant singh
prashant singh 2017년 12월 26일
편집: Matt J 2017년 12월 28일
i have a multidimensional image of size 1024*512*128. For each slice(1024*512), I have single point from the mid slice of an image say from slice 40 to 128. So, i have 89 points in my multidimensional (volumetric) image. how can i fit the straight line using svd/ ransac or any other method and then extrapolate that line to the end of the volumetric image?

채택된 답변

Matt J
Matt J 2017년 12월 27일
편집: Matt J 2017년 12월 27일
This will give you the equations Aeq*x=beq for the line,
Q=[X(:),Y(:),Z(:)];
m=mean(Q,1).';
Q=Q-m.';
[~,~,Z]=svd(Q,0);
Aeq=Z(:,2:3).';
beq=Aeq*m;
Because you know the vertices of the volume's bounding box (put them in the rows of a matrix V), you can then use intersectionHull (download here) to find the intersection points of the line with the box,
I=intersectionHull('vert',V,'lcon',[],[],Aeq,beq);
  댓글 수: 10
prashant singh
prashant singh 2017년 12월 28일
Done but please let me know if I can visualize the convex hull on my volumetric image to validate the result.
Matt J
Matt J 2017년 12월 28일
편집: Matt J 2017년 12월 28일
I'm not sure how you would do that. Possibly you could use a slice viewer from the File Exchange, e.g.,
and then add lines to the 3D axes using the line() command (with HOLD ON active).

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by