LIX - Ecole Polytechnique

Elouan GROS

An Explanation of Custom Propagation

An overview of the Gaussian Blur algorithm

The Gaussian Blur algorithm applies a blurring filter to an image, or matrix, it is given as input. The algorithm essentially works by replacing every pixel in the image by a weighed sum of its neighbors and itself. The weights used are computed using the Gaussian function, hence the method’s name.

gblur

Shortcoming of the Gaussian Blur

Although the Gaussian blur algorithm is really good at what it does, we want it to be able to complete one more task to be of use to us. Indeed, we need it to be mindful of obstacles while blurring the field.

To do so, we need it to reach two objectives:

Solution to the first problem

The first part was quite simple to solve.

First, we needed to reverse the algorithm. Instead of replacing every pixel by a weighed sum of its neighbors, we opted to add a pixel’s weighed value to all its neighbors. Of course, we are still using the Gaussian function as weight.

Then, all that was needed to stop spreading the field across obstacles was to draw a segment from the origin pixel to the destination pixel, and add zero instead if the segment intersected with an obstacle.

Solutions to the second problem

The second problem is much more tricky to solve. Indeed, depending on your approach, you get different results, and thus different behaviors.

An option is to project the vectors against the obstacle, making them parallel to the obstacle.

Another is to reflect the vector against the obstacle.

Finally, you could also choose for the obstacles to also spread their own vector field, that would either be added to or supersede the one from the user input.

Currently, we have tried the first and second options, and are working on other aspects of the project first before coming back.