在学习cnn的过程中,对convolution的概念真的很是模糊,本来在学习图像处理的过程中,已对convolution有所了解,它与correlation是有不同的,因为convolution = correlation + filp over in both horizontal + vertical
但在CNN中,明明只是进行了correlation,但却称之为convolution,实在不解
下面, 将图像处理中的convolution重新整理记录
因为网络关于这部分的解释很多,这里直接借用其他 参考
“A convolution is done by multiplying a pixel's and its neighboring pixels color value by a matrix”, 这里的matrix就是convoluiton kernel (usually a small matrix of numbers)
这里假设图像是3*3,kernel也是3*3,实际计算中,有时为了使得卷积结果与原图像一致,会对原图像进行padding操作
原图像x:
具体数值:
0 | 0 | 0 | 0 | 0 |
0 | 1 | 2 | 3 | 0 |
0 | 4 | 5 | 6 | 0 |
0 | 7 | 8 | 9 |