Marco A.
Marco A.

Reputation: 43662

Convolution with separable kernel

I'm looking at the CUDA SDK convolution with separable kernels, and I have a simple question but can't find an answer:

Do the vectors, whose convolution gives the kernel, need to have the same size? Can I first perform a row-convolution with a vector 1x3 and then a column convolution with another one 5x1 ? Or they both need to be same size? Google isn't helping (or I'm unable to search for an answer)

Upvotes: 2

Views: 1462

Answers (2)

talonmies
talonmies

Reputation: 72349

The vectors of a separable convolution could only be different sizes if the equivalent convolution matrix was not square.

Upvotes: 3

btilly
btilly

Reputation: 46408

Yes, the vectors can be different sizes. The only consequence is that you'll get a rectangular matrix that is not square.

Upvotes: 4

Related Questions