-1

Is findContours() in OpenCV or EMGUCV built-in with edge detection inside ? If it's yes, what is the algorithm ?

Because without calling any edge detection function, it can detect the edge of image.

felangga
  • 553
  • 8
  • 22
  • no, that's algorithm for detecting contour, I ask about algorithm to detect edge – felangga Mar 10 '15 at 06:13
  • there should not be included a edge detection. in fact, findContours doesnt expect edges as input but single channel non-zero pixel as foreground, so objects are allowed to be filled. – Micka Mar 10 '15 at 07:02

1 Answers1

1

Edges are computed as points that are extrema of the image gradient in the direction of the gradient and contours are often obtained from edges, but they are aimed at being object contours. Thus, they need to be closed curves.

findContours only retrieves contours from the binary image. Of course you can mix it with edge detection i.e apply findContours on the output of Canny as in the example Finding contours in your image

Kornel
  • 5,264
  • 2
  • 21
  • 28