Implement the complete Canny edge detection pipeline, a multi-stage process for detecting edges in images. The Canny edge detection algorithm is a widely used technique in Computer Vision for identifying and locating edges in images, which is crucial for various applications such as object recognition, image segmentation, and feature extraction.
The process involves several key steps, including Gaussian blur to reduce noise, gradient computation using Sobel operators to calculate the magnitude and direction of the gradient, non-maximum suppression to thin edges to 1 pixel width, and hysteresis thresholding to connect edges using two thresholds. The gradient magnitude is calculated as G=Gx2+Gy2, where Gx and Gy are the horizontal and vertical gradient components.
This technique is widely used in image processing and analysis applications.
image = grayscale image with edges low_threshold = 50 high_threshold = 150
Binary edge map with thin, connected edges