【发布时间】:2019-03-29 09:52:06
【问题描述】:
OpenCV 文档指出 Sobel 函数的最大内核大小为 7:
ksize: size of the extended Sobel kernel; it must be 1, 3, 5, or 7.
这是文档的链接:
https://docs.opencv.org/trunk/d4/d86/group__imgproc__filter.html#gacea54f142e81b6758cb6f375ce782c8d
但是,在编码时,我可以使用高达 31 的 ksize(超过 31 会出错)。例如,我可以执行以下操作:
cv2.Sobel(src=image, ddepth=-1, dx=1, dy=0, ksize=31)
为什么文档说最多 7 个,而允许最多 31 个?
【问题讨论】:
-
一定是错字? Source code 声明它必须是奇数且不大于 31
标签: opencv image-processing edge-detection sobel