Difference between revisions of "Gaussian and sieve filters"

From BanghamLab
Jump to navigation Jump to search
(Created page with "{| border="0" cellpadding="5" cellspacing="3" |- valign="top" |<wikiflv width="800" height="900" logo="false" loop="true" background="white">Siv1-meanmedian_2.flv|Siv1-meanme...")
 
Line 1: Line 1:
 
{| border="0" cellpadding="5" cellspacing="3"
 
{| border="0" cellpadding="5" cellspacing="3"
 
|- valign="top"
 
|- valign="top"
|<wikiflv width="800" height="900" logo="false"  loop="true" background="white">Siv1-meanmedian_2.flv|Siv1-meanmedian.png</wikiflv>
+
|<wikiflv width="800" height="900" logo="false"  loop="true" background="white">Siv1-meanmedian_2.flv|Siv1-gaussiansieve.png</wikiflv>
<br>OK its a crap Figure. I spent ages getting the trace above each new one to show the moving window used to compute the output of each stage.<br><br>
+
<br>OK its a another crap Figure. I spent ages getting the trace above each new one to show the moving window used to compute the output of each stage.<br><br>
Left panel: running mean. Stage (scale) 1 window of 3. Stage 2 window of 5 on the previous stage. And so forth. Each stage simplifies the signal until, at the bottom, it fades away. BUT it does not preserve [http://en.wikipedia.org/wiki/Scale_space scale-space] and that is '''''bad'''''.
+
Left panel: Gaussian filter. Stage (scale) <math>sigma</math>=1. Stage 2 <math>sigma</math>=2 on the previous stage. And so forth. Each stage simplifies the signal until, at the bottom, it fades away. It does preserve [http://en.wikipedia.org/wiki/Scale_space scale-space] and that is '''''GOOD'''''.
Right panel: running median. Median filters had many followers. It was thought that they preserved the edges in a meaningful way. Stage (scale) 1 window of 3. The filter removes extrema of length (scale) 1. Stage 2 window of 5 on the previous stage and this filter removes extrema of scale 2. And so forth. Each stage simplifies the signal until, at the bottom, it fades away. It is tempting to imagine that extrema at each scale are removed in a nice regular way '''''BUT''''' no, it all falls apart at larger scales it does not preserve [http://en.wikipedia.org/wiki/Scale_space scale-space] and that is '''''bad'''''.
+
Right panel: recursive median. Whatever the scale each computation requires three numbers, the middle one, one ahead and one behind. If the one behind comes directly from the previous stage the median is found.<br><br>
 +
If, on the other hand the one behind is the value that has just been computed using the previous window then the recursive median is computed. It is similar to an 'irr' filter as opposed to a 'fir' filter. Stage (scale) 1 window of 3. The filter removes extrema of length (scale) 1. Stage 2 also has a window of 3 but is computed on a basis of 5 values. This filter removes extrema of scale 2. And so forth. Each stage simplifies the signal until, at the bottom, it is entirely removed. It turns out that extrema at each scale are removed in a nice regular way it does preserve [http://en.wikipedia.org/wiki/Scale_space scale-space] and that is '''''GOOD'''''.
 
|}
 
|}

Revision as of 18:46, 6 August 2014

Siv1-gaussiansieve.png</wikiflv>


OK its a another crap Figure. I spent ages getting the trace above each new one to show the moving window used to compute the output of each stage.

Left panel: Gaussian filter. Stage (scale) <math>sigma</math>=1. Stage 2 <math>sigma</math>=2 on the previous stage. And so forth. Each stage simplifies the signal until, at the bottom, it fades away. It does preserve scale-space and that is GOOD. Right panel: recursive median. Whatever the scale each computation requires three numbers, the middle one, one ahead and one behind. If the one behind comes directly from the previous stage the median is found.

If, on the other hand the one behind is the value that has just been computed using the previous window then the recursive median is computed. It is similar to an 'irr' filter as opposed to a 'fir' filter. Stage (scale) 1 window of 3. The filter removes extrema of length (scale) 1. Stage 2 also has a window of 3 but is computed on a basis of 5 values. This filter removes extrema of scale 2. And so forth. Each stage simplifies the signal until, at the bottom, it is entirely removed. It turns out that extrema at each scale are removed in a nice regular way it does preserve scale-space and that is GOOD.