【发布时间】:2019-07-17 20:33:54
【问题描述】:
我试图理解cv2.Sobel 中的scale 参数。将scale 设置为 1/8,沿 x 轴得到如下输出:
但是对于 scale = 10 或 scale = 100,输出非常相似。
以上两幅图都是沿x轴的一阶梯度,比例分别为1/8和100。
import cv2
filename = "./images/cube.jpg"
img = cv2.imread(filename,0)
sx = cv2.Sobel(img, cv2.CV_64F, 1,0, ksize=3, scale= 1/8)
cv2.imshow("sx", sx)
if cv2.waitKey(0) & 0xff == 27:
cv2.destroyAllWindows()
参数scale 有什么作用?有什么用?
【问题讨论】:
标签: python opencv image-processing computer-vision sobel