An application of the median filter



The results shown in section 7, and in the first figure of this section as well are affected by a lot of noise, which makes discerning the separation between regular and chaotic region quite cumbersome.   A possible way to overcome this problem may be the application of a median filter to the data.   The idea is to take elements in a 3*3 matrix and put them in an array, and then take the median of this array.  The matrix is then moved by one element and the procedure is repeated.  To obtain values for the last columns and rows, an average values of sigma is assigned to the 0th and N+1 rows and column (approximate procedure, but it only affect the first and last rows and columns).   We choose to take the median and not the average because we want to avoid overestimating "eccentric" values of sigma.

Once the procedure is applied, we iterate the filtering process until the percentage difference of the values of sigma, defined as |\sigma(i)-sigma(i-1)|/sigma(i), is less than a threshold value (usually 10%).
The following figures show the results unprocessed, after one filtering, and at the end of the iterative procedure.   The dichotomy between left and right parts of the diagram, difficult to follow in the first figure, it is apparent in the last one.
 
 

Why using a median filter?   According to Petrouand Bosdogianni (Image processing: The fundamentals, Wiley ed. pp. 144-150) the median filter is the ideal filter to remove the so-called impulse noise or Gaussian noise.   The impulse noise alters at random some pixel.  An additive zero-mean Gaussian noise means that a value drawn from a zero-mean Gaussian probability density function is added to the true value of every pixel.  The effect of the median filter is to force points with distinct intesnities to be more like their neighbours, thus eliminating intensity spikes that appear isolated.   In our case, it eliminates fluctuations and show large scale-patterns that were not easily discernable in the original data.  As a trade-off, we may lose information regarding isolated particles that are really chaotic...