Ask Your Question
2

filter2d and convolutions

asked 2014-01-03 05:11:22 -0600

Hansg91 gravatar image

Hi,

For a project i am working on, I want to perform a convolution to get a wavelet response. For this i wanted to use filter2d, but in the documentation it states that it is a correlation and not a convolution. If you want a convolution you'd have to flip the kernel and move the anchor.

Now my question is, if I have a symmetric 2d kernel and keep the anchor at its center (such as with a gaussian kernel), is the correlation calculated with filter2d equal to the convolution? If not, what do I have to change?

Best regards, Hans

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-01-03 07:14:37 -0600

Guanta gravatar image

Yes it is the same for symmetric kernels, see e.g. http://www.cs.umd.edu/~djacobs/CMSC426/Convolution.pdf

edit flag offensive delete link more
0

answered 2014-01-03 07:49:12 -0600

In the OpenCV library for correlation operation you have to use the matchTemplate function. For more information use the this link .

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-01-03 05:11:22 -0600

Seen: 1,420 times

Last updated: Jan 03 '14