问题描述:

Just a simple question related to image convolution boundary conditions. As every knows, there are several types of image convolution boundaries, among which symmetric condition is widely accepted. My question is: where do we put the “mirror” when performing convolution? More specifically, I give the following example:

Image matrix is [1 2 3], and the kernel is [ 1 1 1 1 1]. Then the mirrored image with regard to this kernel should be [ 3 2 1 2 3 2 3] or [ 2 1 1 2 3 3 2]?

网友答案:

Each edge needs to be mirrored independently. Your second example is the correct one.

相关阅读:
Top