- scipy.ndimage.filters.convolve函数
函数定义如上,其中weight代表卷积核/滤波器,mode代表填充方式,cval代表使用常数填充时的常数值,origin代表卷积核的中心位置偏移。函数返回值代表处理后的结果。def convolve(input, weights, output=None, mode='reflect', cval=0.0, origin=0)
- cv2.filter2D函数
opencv中提供的函数。
dst代表处理后的输出,ddepth代表输出图像的维度,-1代表与输入相同;anchor同样表明卷积核的中心位置,默认值(-1,-1)代表中心;delta代表在输出最终结果前对每个像素加上的偏移值;borderType类似于convolve函数中的mode,指边缘的填充方式。def filter2D(src, ddepth, kernel, dst=None, anchor=None, delta=None, borderType=None)
python图像处理中的卷积函数
最新推荐文章于 2024-10-16 09:39:29 发布