Re: Warning -- Median "Feature" [message #9082] |
Wed, 28 May 1997 00:00 |
pit
Messages: 92 Registered: January 1996
|
Member |
|
|
In article <338B308F.539A@astrosun.tn.cornell.edu>,
JD Smith <jdsmith@astrosun.tn.cornell.edu> writes:
> I am writing to warn those who use IDL's built in MEDIAN to perform
> median filtering of images. It seems that if you specify an even box
> size, the image is shifted up and to the right by one pixel (or at least
> in some direction, perhaps depending on the exact number you use for the
> box size). This effect becomes quite pronounced after a hundred
> iterations of the filter or so! The solution is of course to use only
> odd box sizes, but the "feature" is not documented anywhere I know of,
> so I thought I'd pass it along. I don't know if smooth does the same
> thing, but I'd expect it to (likely just a boundary wrapping issue).
Umm, if you just recall the definition of the median filter it is more
than obvious that the box size *has* to be odd. If I remember correct,
this was stated in one of the Manuals of version 3. But you're right,
in the current manuals is nothing about it.
But it reminds me of something important: You always should *know* what
you do. Its the same e.g. when aplying FFT to an array whos dimension
is a prime number.
Peter
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
Peter "Pit" Suetterlin http://www.uni-sw.gwdg.de/~pit
Universitaets-Sternwarte Goettingen
Tel.: +49 551 39-5048 pit@uni-sw.gwdg.de
-- * -- * ...-- * -- * ...-- * -- * ...-- * -- * ...-- * -- * ...-- * --
Come and see the stars! http://www.kis.uni-freiburg.de/~ps/SFB
Sternfreunde Breisgau e.V. Tel.: +49 7641 3492
____________________________________________________________ ______________
|
|
|