3

I am new to opencv and I don't know much about the algorithms. I just downloaded opencv and tried to run the samples. One thing I noticed that both canny and contour can be used to find the objects, from opencv official docs:

Canny:

Finds edges in an image using the [Canny86] algorithm.

findContours:

Finds contours in a binary image.

I think they have similar functionalities, so what are the differences between them and how to choose? And please correct me if my understanding is wrong.

4

1 回答 1

4

最重要的实际区别是 findContours 给出了连接的轮廓,而 Canny 只给出了边缘,边缘是可能相互连接或不相互连接的线。要进行选择,我建议您在示例应用程序上都尝试一下,看看哪个效果更好。

于 2013-08-30T02:42:16.747 回答