1

I wonder if anybody could tell me if there's a method for connecting edge lines that have parts missing. E.g. I have an image with a roughly circular blob, I've applied a Canny edge detection method and it returns and three quarter crescent edge, whereas I'd like it to form a region that could be picked up by a Hough transform.

I've been playing around with this with openCV. I've tried finding contours, but no such luck.

Many thanks.

Edit: example contour output to try Hough transform on (top left):

enter image description here

Should add, I can detect a circle for that image, it would just be nice to be able to make it a disjoint region.

Mike Miller
  • 253
  • 6
  • 18
  • Can you post the input image? – bikz05 Oct 29 '14 at 13:04
  • @bikz05 it's not for a specific problem, just in general. even disjoint lines. I can edit an example in, though. – Mike Miller Oct 29 '14 at 13:19
  • @bikz05 I've added an example of the crescent type problem in the top left. – Mike Miller Oct 29 '14 at 13:22
  • in very general: use n times dilation followed by n times erosion. less general: 1. find out what kind of edges you expect: in your example it's a circle. 2. detect partial objects: chamfer matching or in your example circles. 3. add missing edges to detected partial object. – Micka Oct 29 '14 at 13:51
  • @MikeMiller Check out this http://stackoverflow.com/questions/26586123/filling-gaps-in-shape-edges – bikz05 Oct 29 '14 at 13:56
  • Thank you both for the suggestions, I'll give it a try. – Mike Miller Oct 29 '14 at 13:59

0 Answers0