MATLAB: How to connect missing circle edges in a binary image
edgesimage processingImage Processing Toolbox
How I can connect the missing edges in the circle in a binary image? I do want to thicken the edges, though, I want to connect them.
Any help in details?
well appreciated
Best Answer
Use bwdist() to find the max value of the Euclidean Distance Transform in the middle region of your image. That max value will be the radius of the biggest circle that can fit in that region. Then use imellipse to burn a white circle into your image, like the attached demo. Think about it first, and come back with your code if you still can't figure it out.
Since it's reasonably straight, I'd say just running along the curve calculating the distance to each endpoint, and then picking the one where the difference between the two distances is minimum, should be pretty close or even exact.
let me preface - I am no image analyst, but it would seem that segmenting the the color dots would be easy since they are red & green. As for the outer boundary maybe the hough transform would be of some help?
Best Answer