cv2.Canny(img, 100, 200)
时间: 2023-11-23 11:07:04 浏览: 89
This function applies the Canny edge detection algorithm to the input image 'img' with the lower threshold value of 100 and upper threshold value of 200. The Canny edge detection algorithm is an image processing technique used to detect edges in an image by finding the intensity gradients of the image and selecting the pixels with the highest gradient as potential edges. The lower and upper threshold values are used to determine which potential edges are considered actual edges. Any edges with gradient values below the lower threshold are discarded, while any edges with gradient values above the upper threshold are considered strong edges. Edges with gradient values between the lower and upper threshold values are considered weak edges and are only kept if they are connected to strong edges. The output of this function is a binary image where the edges are white and the background is black.
阅读全文