python opencv canny
import cv2 # Load the image img = cv2.imread('path/to/image.jpg') # Convert the image to grayscale gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) # Apply the Canny algorithm to detect edges edges = cv2.Canny(gray, 100, 200) # Display the edges cv2.imshow('Edges', edges) cv2.waitKey(0) cv2.destroyAllWindows()
#################
标签:python,image,cv2,opencv,edges,canny From: https://www.cnblogs.com/herd/p/17265646.html