GLSL Gaussian Filter Demo

<- Return to Experimental GLSL Image Processing

Gaussian filtering is a standard step in many image processing and image analysis pipelines due to its execution speed and well behaved numerical properties (differentiation). Historically, fast implementations of Gaussian filtering applied to images has utilized separability, decomposing the 2D convolution into two 1D convolution problems - one along the rows of the image and one along the columns of the image. Here, we illustrate the speed of the GPU even when convolution is not implemented using separability. Rather, we leverage the pixel parallelism of the GPU to accelerate a brute force implementation of 2D convolution.

(This implementation is based on the work of https://www.shadertoy.com/view/4dfGDH#.)

Source Image

Processed Image

Move pointer over the lower image. As you move the mouse, the left side of the image is unfiltered, the right side is Gaussian filtered.

Check out the source code.

This demo uses WebGL. Not all devices and browsers are supported.