two lines skeletonization

조회 수: 11 (최근 30일)
priscilla
priscilla 2011년 6월 15일
Hai, I am trying to get a nice skeleton, plotted as one line. After the use of ‘skel’ of the function bwmorph I get a nicely one pixel line. But drawing a line through these pixels with: [B,L] = bwboundaries(image); for k=1:length(B) b = B{k}; plot(b(:,2),b(:,1),'g','LineWidth',1); end
, I get at some points two lines, showed over here http://dl.dropbox.com/u/13969758/skeleton.tif . Has someone a solution to remove these extra formed lines between two skew pixels?
  댓글 수: 1
Image Analyst
Image Analyst 2011년 6월 15일
Why are you using bwboundaries??? The skeleton is already the coordinates of the line location. Call find() on the binary skeleton image if you want a list of (x,y) coordinates, but I wouldn't necessarily to that - it depends on what you want to accomplish by this plotting of the line (again). No need to call bwboundaries at all. So that totally gets rid of your problem.

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

채택된 답변

priscilla
priscilla 2011년 7월 13일
just again skeletonization gives the solution.

추가 답변 (1개)

Sean de Wolski
Sean de Wolski 2011년 6월 15일
Perhaps you could just change the connectivity for bwboundaries?
Could you please post the (small) matrix that yielded the above result.
  댓글 수: 1
priscilla
priscilla 2011년 6월 15일
Hai,
With 4 connectivity, you just get points, see over here:
http://dl.dropbox.com/u/13969758/skeleton_2.tif
By making a line between these points again it gives the same result as before (two lines).

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by