Conservative filtering
Conservative filtering is an image processing methodology for removing high frequency noise from images.
The methodology works by moving a window across an image a data point at a time. In our case the image is stored in a 2D array so that's what we move across. The window is large enough to encompass a neighbourhood of data cells. Each data cell is adjusted so that it is no greater than the maximum of the other points in its neighbourhood, nor smaller than the minimum of these neighbours.
Plainly as we're moving across an array, if we adjusted the array with the data in it we'd be altering points that later went to be neighbours of other points, so, infact, a second array is generated containing the altered results.
Take the following example:
First we take the cell containing the value "2". We look at all the cells around it, and see what their minimum and maximum is. We then check whether the "2" cell is outside that range. If it is less than the minimum of its immediate neighbours, which it is, we set the value in the results array to the minimum of the neighbours ("3"). We then move on to the "35" cell and look at its neighbourhood. As it is greater than the maximum of its neighbourhood we set the equivalent result cell to that maximum ("23"). Then we move to the next, "10" cell. As this is neither greater than the neighbours' maximum, nor less than their minimum, we keep the "10" value in the results array.
We would repeat this for all cells in the array, or some internal subset, depending on how we want to resolve the boundary issues (see lecture 3). The resulting array is then our filtered dataset.
Here we are using a "Moore Neighbourhood" - that is, a square neighbourhood around the chosen cell, however, there are other types of neighbourhood. Here the Moore Neighbourhood has a radius of one, that is, there is one cell taken on either side of the central, chosen, cell.