Is there an Edge Detection Method that performs significantly better than the Canny Edge Detector ??
5 Answers
There are different types of "edges", it depends on your task. Have a look at the recent paper "Which edges matters?" from ICCV-2013, with comparison of several methods:
- ultrametric contour map - "Contour Detection and Hierarchical Image Segmentation" by P. Arbelaez, M. Maire, C. Fowlkes, and J. Malik - best results in comparison above.
- normalized cuts - "Normalized cuts and image segmentation" by J. Shi and J. Malik.
- mean shift - "Mean shift: A robust approach toward feature space analysis" by D. Comanicu and P. Meer.
- Felzenszwalb and Huttenlocher approach - "Efficient graph-based image segmentation" by Felzenszwalb and Huttenlocher.
- BiCE - "Binary coherent edge descriptors" by C. L. Zitnick.
- N4-Fields - "N4-Fields: Neural Network Nearest Neighbor Fields for Image Transforms" by Ganin et.al
- RDS - "Learning relaxed deep supervision for better edge detection" by Liu and Lew
- COB - "Convolutional Oriented Boundaries" by Maninis et.al.
Hope this helps future reader
Active Canny: Edge Detection and Recovery with Open Active Contour Models
Here is an image showing its performance
Implementing it is a pain. I'm trying to implement it using OpenCV and Python
Here's another paper I found.
Canny edge detection method is one of the more commonly used edge detection method. As old-ufo said, there is no good or bad edge detection method.
I would like to introduce 2 more edge detection method to you though, on top of old-ufo's answer.
Sobel - method to detect edges in an image can be performed by locating pixel locations where the gradient is higher than its neighbors.
Gaussian based methods - methods of edge detection using Gaussian.
If you ask me, I really love DoG(Difference of Gaussian), especially when I am trying to get outlines/shape of object(when object is noisy) etc. Very useful.
But all in all, it is really based on what you are trying to achieve. Canny is too a very good edge detection method. Play around (:
Holistically nested edge detection (HED) which uses deep learning is now integrated into OpenCV's deep learning module. It's much better than Canny on Edge detection however it's a bit slower.
Here is a figure from the paper that compares the results against canny.
The great thing is if you want to run this method in OpenCV now, you can do that with only a few lines of code. This blog post has more details: Running Deep Learning based Edge detection in OpenCV
The term better needs some explanation. I personally consider a Canny edge detector slow and … unstable for a simple reason: it uses a set of highly non-linear algorithms that does too many complex operations (segmentation, non-max suppression, etc) which makes it extremely unstable and sensitive to noise. Yes, it can pull out weak edges but ‘blinking' and noise are too high to work well for, say, matching application. On the other hand, such a simple operation as Sobel is linear and stable, so for matching I would use Sobel rather than Canny. If you are interested in text detection, for example, then instead of edges you may want to use connected components or MSER to extract your features. The point is, the term better strongly depends on your application.
Last but not least - it is wrong to start thinking about your project from the point of view of the algorithm yet it is done so often! Think about the operational definition of your goal, features, probabilities and only then implementation. "We write down not the steps to solve the problem but the problem itself" - as Simon Prince eloquently put it. So if you had a question about better algorithm but you truly want to understand computer vision better, I strongly recommend you to buy his book ( this one is really readable, greatly illustrated and motivate and the best gentle introduction to computer vision I ever known). On the opposite side of the spectrum is classical Heartly and Zisserman's Multiple View geometry that is a great source of formulas but sadly is highly unreadable.