1 | initial version |
You first have to construct a Convolution object using the template size you want to use (or don't and it will resize, but it will be slightly slower):
Ptr<cuda::Convolution> convolver = cuda::createConvolution(Size(11, 11));
Then you can use it on whatever image you want:
convolver->convolve(inputImg, outputImg, kernel);
It's also always the same size as the input.
2 | No.2 Revision |
You first have to construct a Convolution object using the template size you want to use (or don't and it will resize, but it will be slightly slower):
Ptr<cuda::Convolution> convolver = cuda::createConvolution(Size(11, 11));
Then you can use it on whatever image you want:
convolver->convolve(inputImg, outputImg, kernel);
kernel, outputImg);
It's also always the same size as the input.