图像的梯度 一阶导数 二阶导数 —拉普拉斯算子系数和为0 一阶导数 import cv2 as cv import numpy as np def sobel_demo(image): # grad_x = cv.Scharr(image, cv.CV_32F, 1, 0) grad_y = cv.Scharr(image, cv.CV_32F, 0, 1) # gradx = cv.convertScaleAbs(grad_x) grady = cv.convertScaleAbs(grad_y) cv.imshow("gradient