How to Close an Open Contour
Show older comments
Dear all, Attached image consists of two open contours. I would like to close these two contours. Please let me know if this is doable in Matlab.
Thanks Ashkan

Accepted Answer
More Answers (1)
Daniel Thomas
on 25 Jun 2020
0 votes
Don't "burn lines" with imline. Use insertShape instead to draw a line on an image. Additional trouble with insertShape is that it always produces RGB instead of grayscale. So you need to convert it to grayscale. Other than that, it works a lot better than "burning the lines."
1 Comment
Image Analyst
on 25 Jun 2020
It also requires the Computer Vision Toolbox.
Categories
Find more on Region and Image Properties in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!