![]() Output of the Canny detector is thus binary image, with 1 px wide lines in place of edges. It actually runs further edge refinement steps. This one makes few steps further than other detectors. In your particular case, the catch is that you are using Canny edge detector. ![]() There are many algorithms for detecting edges look at wiki see also.įor example Sobel operator gives smooth "foggy" results. In this new (edge image) image you will have highlighted edges. The main difference between finding edges and countours is that if you run finding edges the output is new image. I found an explanation about what is 'Contours' but it is not addressing this issue. So now, as you can see, there is no difference! So, what is the actual difference between these 2? In OpenCV tutorials, only the code is given. In my above code, I have done edge detection using Canny and curve detection by findContours(). Theoretically, Contours means detecting curves. Src = imread("C:/Users/Public/Pictures/Sample Pictures/Penguins.jpg") Ĭv::createTrackbar("Thresholding",windowName,&thresh,255,detectContours) Ĭv::Canny(grey,canny_output,thresh,2*thresh) Ĭv::findContours(canny_output,contours,heirachy,CV_RETR_TREE,CV_CHAIN_APPROX_SIMPLE,Point(0,0)) ĭrawing = Mat::zeros(canny_output.size(),CV_8UC3) Ĭv::drawContours(drawing,contours,i,Scalar(255,255,255),1,8,heirachy,0,Point()) I am working on the following code: #include
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |