# Difference between revisions of "Mean and median filters bad"

(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 3: | Line 3: | ||

|<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-meanmedian.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 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: 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. <span style="color:red">BUT it does not preserve [http://en.wikipedia.org/wiki/Scale_space scale-space] and that is '''''bad'''''.</span><br><br> |

− | 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: 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 <span style="color:red">'''''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'''''</span>. |

|} | |} | ||

+ | So here is a gripe. When I first sent a paper on all to a reputable journal I wrote just that ('... falls apart ...') and the paper was all about how to fix it - sieves. The reviewer rejected the paper because 'everyone knows that median filters aren't useful so how could a stack of them be any better'. Well - that's exactly what the paper was about. Oh well, get over it. Write it more clearly, etc. etc. So here is the paper. The implementation is very literal and slow. Each stage is run and re-run to idempotency. I called the filter a data-sieve. The <span style="color:red">twist in this story </span>is the switch to ''''''recursive median filters'''''' and '''''sieves'''''. |

## Revision as of 17:06, 6 August 2014

Siv1-meanmedian.png</wikiflv>
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 no, it all falls apart at larger scales it does not preserve scale-space and that is BUT.
bad |

So here is a gripe. When I first sent a paper on all to a reputable journal I wrote just that ('... falls apart ...') and the paper was all about how to fix it - sieves. The reviewer rejected the paper because 'everyone knows that median filters aren't useful so how could a stack of them be any better'. Well - that's exactly what the paper was about. Oh well, get over it. Write it more clearly, etc. etc. So here is the paper. The implementation is very literal and slow. Each stage is run and re-run to idempotency. I called the filter a data-sieve. The twist in this story is the switch to '* recursive median filters'* and

*.*

**sieves**