Hacker News new | ask | show | jobs
by jffry 4616 days ago
Another opportunity for efficient blur would be to rescale the image if the blur radius is above a certain amount. This incurs overhead, so for smaller radii it might be more efficient to just blur the full-size image, but for larger radii you can first reduce the image, blur with a smaller radius, and then upscale the image.

You might need an Arbitrary Hack Constant (oh, sorry, "tuning parameter") to decide when to make that transition.

1 comments

That's already in the article:

> Instead of filtering the image in its native resolution, I used OpenGL's native support for linear interpolation to downsample the source image by 4X in width and height, blurred that downsampled image, then linearly upsampled via OpenGL afterward.

Indeed it is, my bad for not RTFM