How to unite the missing parts of a curve - binary images

조회 수: 3 (최근 30일)
Paul Simon
Paul Simon 2019년 6월 27일
댓글: Paul Simon 2019년 7월 2일
I have a binary image of a curve with many missing parts and I need an idea to unite the discontinuities in order to obtain a continous curve.
I've attached below 3 examples and I need to code it so that the same code works on all of them
  댓글 수: 1
Paul Simon
Paul Simon 2019년 6월 29일
I've managed to get the centroids coordinates of all the blobs but I need to sort them somehow in order to obtain what I need (I've tried using poly2mask without sorthing them and the attached image is the result). Any ideas?

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

답변 (1개)

Image Analyst
Image Analyst 2019년 6월 29일
Maybe try boundary()
  댓글 수: 4
Image Analyst
Image Analyst 2019년 6월 30일
Change the options for boundary() to make it fit tighter if you want.
Paul Simon
Paul Simon 2019년 7월 2일
I think it would be more efficient if I had the coordinates of the starting and ending point of each blob but I don't really know how to obtain them

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

Community Treasure Hunt

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

Start Hunting!

Translated by