def convolve(img, kernel):
"""Apply a kernel/filter via convolution to an image.
Args:
img The image
kernel The kernel/filter to apply
Returns:
New image
"""
return crosscorrelate(img, np.flipud(np.fliplr(kernel)))
crosscorrelation_convolution.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录