This program applies a noise filter to a cube. Pixel values that
are considered to be noise will be replaced with either the average
of the boxcar or the Isis NULL value. The criteria for determining
whether a pixel is noise or not is given by the TOLMIN and TOLMAX
parameters. If the difference between the input pixel and the average
of the boxcar is greater than the tolerance given, the pixel is
considered to be noise and is replaced. If the STDDEV option is
chosen, then TOLMIN and TOLMAX indicate the tolerance in number of
standard deviations between the input pixel and the boxcar average
that determines whether the pixel is noise. The number of pixels
replaced and the corresponding percentage is output.
Modified schema location from astogeology... to isis.astrogeology..."
Stuart Sides
2003-05-30
Fixed compiler error with uninitialized variable after adding -O1 flag
Stuart Sides
2003-07-29
Modified filename parameters to be cube parameters where necessary
Jeff Anderson
2003-08-25
Separated standard deviation and average noise filter options into two routines. Fixed problem
filtering special pixels. Modified explanations for TOLMIN and TOLMAX.
Stuart Sides
2003-11-07
Modified results pvl to not include the results group
Elizabeth Miller
2005-12-15
Added a flattol parameter - it replaces the tolmin parameter in isis2 boxfilter
If DN is chosen TOLMIN and TOLMAX are in dn units. If STDDEV is
chosen, TOLMIN and TOLMAX are number of standard deviations.
Type
string
Default
DN
Option List:
Option
Brief
Description
DN
TOLMIN and TOLMAX are in units of DN.
If the difference between the input pixel and the boxcar average
is greater then the tolerances given in TOLMIN or TOLMAX (values
of DN), the pixel is considered to be noise and will be replaced.
See TOLMIN and TOLMAX for more details.
Exclusions
FLATTOL
STDDEV
TOLMIN and TOLMAX are in units of standard deviation.
If the difference between the input pixel and the boxcar average is
greater than the number of standard deviations indicated in TOLMIN
or TOLMAX, the pixel is considered to be noise and will be replaced.
See TOLMIN and TOLMAX for more details.
Minimum tolerance value used in the STDDEV filter. If the difference
between the original pixel, and the average value of the noise filter is
less than the FLATTOL then the output pixel will remain unchanged
from the input pixel. Without this safeguard, very uniform inage areas
(low standard deviation) will be excessively smoothed, creating areas
of constant DN.
If you are attempting to remove black speckle or other dark noise then you should be modifying this
parameter. When a pixel is being checked for noise, a difference between the pixel and boxcar
average is computed. If this difference is negative then TOLMIN will be used to determine if we
have noise, hence dark noise will be removed by modifying TOLMIN.
For the DN option, if the absolute value of the difference (pixel - average) is less than TOLMIN, then
the input pixel is preserved. Otherwise it is considered noisy and will be replaced.
For the STDDEV option, if the absolute value of the difference is less than TOLMIN * standard deviation
of the boxcar then the input pixel is preserved. Otherwise it is considered noisy and will be replaced.
In general, a high tolerance means fewer pixels will be replaced and lower tolerance will cause more
pixels to be replaced. Too small of a tolerance can actually replace real/good data. For the STDDEV option,
you might try TOLMIN=3 as a starting point. For the DN option, try TOLMIN=2.
If you are attempting to remove white speckle or other bright noise then you should be modifying this
parameter. When a pixel is being checked for noise, a difference between the pixel and boxcar
average is computed. If this difference is positive then TOLMAX will be used to determine if we
have noise, hence white noise will be removed by modifying TOLMAX.
For the DN option, if the difference (pixel - average) is less than TOLMAX, then the input pixel is
preserved. Otherwise it is considered noisy and will be replaced.
For the STDDEV option, if the difference is less than TOLMAX * standard deviation of the boxcar then the
input pixel
is preserved. Otherwise it is considered noisy and will be replaced.
In general, a high tolerance means fewer pixels will be replaced and lower tolerance will cause more
pixels to be replaced. Too small of a tolerance can actually replace real/good data. For the STDDEV option,
you might try TOLMAX=3 as a starting point. For the DN option, try TOLMAX=2.
This is the total number of samples in the boxcar.
It must be odd and can not exceed twice the number of samples
in the cube. In general, the size of the boxcar does not
cause the program to operate significantly slower.
The shape of the filter can be used to control types of noise to remove. For example, a 3x3 or 5x5 boxcar
can be used to remove speckle or salt and pepper noise. A 1 sample x 5 line boxcar with REPLACE=NULL
could be used to remove dropped or noisy lines of data. Then use the lowpass program with a 3x3 boxcar
to fill in the NULLed data.
This is the total number of lines in the boxcar.
It must be odd and can not exceed twice the number of lines
in the cube. In general, the size of the boxcar does not
cause the program to operate significantly
slower.
The shape of the filter can be used to control types of noise to remove. For example, a 3x3 or 5x5 boxcar
can be used to remove speckle or salt and pepper noise. A 1 sample x 5 line boxcar with REPLACE=NULL
could be used to remove dropped or noisy lines of data. Then use the lowpass program with a 3x3 boxcar
to fill in the NULLed data.
Valid minimum pixel value that will be used in boxcar computation. If
a pixel value is less than LOW then it will not be used when
computing boxcar statistics.
Valid maximum pixel value that will be used in boxcar computation. If
a pixel value is greater than HIGH then it will not be used when
computing boxcar statistics.
This is the minimum number of valid pixels which must occur inside the
NxM boxcar for filtering to occur. For example, 3x5 boxcar has 15 pixels
inside. If MINIMUM=10 then the filter will occur if there are 10 or
greater valid pixels. A valid pixel is one that is not special (NULL, LIS,
etc) and is in the range defined by LOW to HIGH.
This option is used to define how NULL pixels are handled. If this
parameter is set to TRUE, then NULL pixels will be considered to be
noise and will be replaced. If FALSE, the NULL will be propagated
to the output.
This option is used to define how HIS (High Instrument Saturation)
pixels are handled. If this parameter is set to TRUE, then HIS
pixels will be considered to be noise and will be replaced. If
FALSE, the HIS will be propagated to the output.
This option is used to define how HRS (High Representation Saturation)
pixels are handled. If this parameter is set to TRUE, then HRS
pixels will be considered to be noise and will be replaced. If
FALSE, the HRS will be propagated to the output.
This option is used to define how LIS (Low Instrument Saturation)
pixels are handled. If this parameter is set to TRUE, then LIS
pixels will be considered to be noise and will be replaced. If
FALSE, the LIS will be propagated to the output.
This option is used to define how LRS (Low Representation Saturation)
pixels are handled. If this parameter is set to TRUE, then LRS
pixels will be considered to be noise and will be replaced. If
FALSE, the LRS will be propagated to the output.