Canny edge detector without thresholds [closed]

asked 2014-01-19 16:49:15 -0600

Hansg91 gravatar image

Hey everyone,

I am interesting in getting a edge map with some sort of probability embedded for the edges. This would result in something like this :

image description

The Canny edge detector in opencv seems to force thresholds though, resulting in a binary map. Is there something I can do to disable this? Or am I looking at implementing my 'own' Canny method which does not perform this step?

Best regards, Hans

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by StevenPuttemans
close date 2014-01-20 04:49:22.046520

Comments

Canny relies on thresholding so it can connect edges together. Does a Sobel not suffice?

Nghia gravatar imageNghia ( 2014-01-19 17:33:54 -0600 )edit

It does, which is the result of the picture above, but I wanted to compare multiple edge detector results for my project. There is no way to disable this thresholding step then?

Hansg91 gravatar imageHansg91 ( 2014-01-20 02:58:35 -0600 )edit
1

From my limited knowledge of how Canny works, what you want might be impossible. Canny calls Sobel to get the initial edge image then does its fancy heuristic to thin and connect edges. A dirty hack might be to cv::bitwise_and(sobel, canny, output), so you get a Canny image but with Sobel magnitudes.

Nghia gravatar imageNghia ( 2014-01-20 03:44:11 -0600 )edit

Aha, I didn't know it uses Sobel to get the initial edge image. Then theres not much use for me as I already have the Sobel image. Thanks!

Hansg91 gravatar imageHansg91 ( 2014-01-20 04:25:20 -0600 )edit