MEAN FILTER
It’s one of the simplest and fastest way to de-noise an image, it consist to replace the intensity of the pixel with the mean of the neighborhood of a given size.
The kernel of the mean filter can be expressed by a matrix
The purpose of this filter is often to de-noise the image but it can be used also to remove some unwanted details that could arm the image analysis task.
The implementation can be performed with an incremental approach (box-filtering) to improve the performance
BOX FILTERING
Let’s take the mean across a given point of the image
Now it’s true to say that the value is obtainable by the precedent value by adding and subtracting differences in the box
So the new value can be computed as