Gaussian Blur with Large Kernel on GPU

asked 2017-12-24 08:16:03 -0500

Larry gravatar image

I have been told to implement a fast unsharp mask using the GPU which works like GIMP and supports large kernels (eg. 201x201). It seems that I am able to do this for smaller kernels using cv::cuda::createGaussianFilter(), applying the filter, and then doing a subtract and weighted add, but cv::cuda::createGaussianFilter() will not accept a size with a width or height greater than 32, which apparently has to do with a limitation with CUDA. Is there any reasonable way to do what I need with CUDA? I know very little about CUDA or image filtering, and I don't have time to learn all about them.

Thank You

Larry

edit retag flag offensive close merge delete

Comments

I have exactly the same problem. Maximum working kernel size is 31. Size of 33 throws unexpected exception. Did you manage to solve this problem?

KaRolthas gravatar imageKaRolthas ( 2018-06-16 07:10:36 -0500 )edit

I'm dealing with the same thing, my current solution is just to run a bunch of smaller Gaussian filters over the data, since that's exactly equivalent to running a Gaussian filter with a larger kernel/sigma

cactus1 gravatar imagecactus1 ( 2018-07-05 12:21:05 -0500 )edit