Canny edge detector: finds the lines of maximum gradient and decides which are edges with two thresholds. The result is a binary (0 or 255) grayscale image.
Non-maximum suppression: a pixel remains a candidate only if its |∇I| is a maximum along direction θ, which thins edges to one pixel.
Parameters
| Parameter | Meaning |
|---|---|
| Lower threshold | T1, low threshold. |
| Upper threshold | T2, high threshold. A ratio T2/T1 between 2 and 3 usually works well. |
| Sobel aperture | Size of the Sobel operator (3, 5 or 7). Larger apertures give larger gradients, so thresholds must rise accordingly. |
References
- OpenCV 4.x documentation — Feature Detection (Canny). docs.opencv.org/4.x/dd/d1a/group__imgproc__feature.html
- J. Canny. "A computational approach to edge detection." IEEE Transactions on Pattern Analysis and Machine Intelligence, PAMI-8(6):679–698, 1986.