Connect lines of binary image
1 次查看(过去 30 天)
显示 更早的评论
Dear comunity,
I have the following image composed by many (almost closed) lines. I am contacting you because I would like to know if somebody has an elegant solution to connect the lines (some of them are broken). If possible, I would like to avoid the use of morphological operators as it is importat to me to maintain the lines profile.
Thank you in advance for your help,
Santiago![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/268060/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/268060/image.png)
6 个评论
Rik
2020-1-27
As for my suggestion, you can very easily create a non-symmetrical structuring element like this:
r=1;
x=linspace(-1,1,10);
y=linspace(-2,2,10);
[X,Y]=ndgrid(x,y);
SE=sqrt(X.^2+Y.^2) <= r;
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!