Home > Net >  Most efficient way to blur an image in opencv
Most efficient way to blur an image in opencv

Time:01-26

I am blurring the background of an image using the blur method. All the tutorials I have seen show the highest kernel size of (7,7). But that is not blurred enough for what I need it for.

I have used Size(33,33) and it works alright but I would like to go higher so currently I am using Size(77,77). Is this the most efficient way of blurring an image in OpenCV? And is it okay to go that high at all?

Another Idea is run the blur method more than once. with a kernel size of (7,7), but that doesn't seem like it is more efficient.

EDIT: OpenCV version 3.2

CodePudding user response:

Try cv::stackBlur().

It's an addition from v4.7.0. Its performance is almost flat, i.e. independent of kernel size. The pull request contains performance figures: GaussianBlur stackBlur

  • Related