cv2Canny
cv2.Canny is a function in OpenCV's Python interface used to detect edges in an image by applying the Canny edge detection algorithm. It takes a grayscale image as input and outputs a binary image where edge pixels are highlighted, typically with a value of 255.
The Canny algorithm involves several steps. First, the image is smoothed with a Gaussian filter to reduce
Input and output: the function expects a single-channel grayscale image. If the input is color, it should
Parameters: threshold1 and threshold2 define the low and high thresholds for hysteresis. The apertureSize parameter selects
Practical notes: choosing thresholds is image-dependent; common practice is to adjust them interactively or via automatic