example import cv2 as cv import numpy as np def edge_demo(image): blurred = cv.GaussianBlur(image, (3, 3), 0) gray = cv.cvtColor(blurred, cv.COLOR_BGR2GRAY) grad_x = cv.Sobel(gray, cv.CV_16SC1, 1, 0) grad_y = cv.Sobel(gray, cv.CV_16SC1, 0, 1) # edge_