当前位置: 动力学知识库 > 问答 > 编程问答 >

Image convolution with mirror boundary

问题描述:

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: