[ TAG ] : Canny

[ TITLE    ] : Python - Canny lib
[ CATEGORY ] : //
[ DATE     ] :

Script en Python pour donner un effet “Canny” à vos images en ajouter une couche de vert (mais en conservant les blancs) : from PIL import Image, ImageOpsimport cv2import numpy as npimport osimport globdef canny_edge_detection(input_path, output_path): try: image = cv2.imread(input_path, cv2.IMREAD_GRAYSCALE) edges = cv2.Canny(image, 150, 250) cv2.imwrite(output_path, edges) print(f"canny_edge_detection : {input_path} - OK") except Exception