Reputation: 145
I have a binary image with several points as below:
How can I make a connection between these points? Like this:
I have tried
se = strel('line', LEN, DEG);
imclose(image, se);
But nothing is changed.
Please help me
Thank you
Upvotes: 3
Views: 3199
Reputation: 114786
You can use roipoly
to create a mask defined by the points.
Given a binary mask you can use bwmorph(BW,'remove');
to get the boundary and you are done.
The only problem is determining the order of the points, different order defines different mask. This one you'll have to figure for yourself.
Example of ambiguity in ordering the points:
Upvotes: 4