Home

Quick Links

Software Manual
GitHub
API Reference

Documentation Versions

Public Release
8.3.0
8.2.0
8.1.0
8.0.0
7.2.0
7.1.0
7.0.0
6.0.0
3.9.0
3.5.0
USGS

ISIS Application Documentation


noisefilter

Printer Friendly View | TOC | Home

Apply a noise removal filter to a cube

Overview Parameters Example 1

Description

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.

Categories


Related Applications to Previous Versions of ISIS

This program replaces the following application existing in previous versions of ISIS:
  • boxfilter

Related Objects and Documents

Applications


History

Eric Eliason1988-05-20 Original version
Tracie Sucharski2002-08-15 Ported to Isis 3.0
K Teal Thompson2003-04-10 Add example.
Kim Sides2003-05-13 Added application test
Stuart Sides2003-05-16 Modified schema location from astogeology... to isis.astrogeology..."
Stuart Sides2003-05-30 Fixed compiler error with uninitialized variable after adding -O1 flag
Stuart Sides2003-07-29 Modified filename parameters to be cube parameters where necessary
Jeff Anderson2003-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 Sides2003-11-07 Modified results pvl to not include the results group
Elizabeth Miller2005-12-15 Added a flattol parameter - it replaces the tolmin parameter in isis2 boxfilter
Steven Lambright2008-05-13 Removed references to CubeInfo

Parameter Groups

Files

Name Description
FROM Input file
TO Output noisefilter cube

Noise Parameters

Name Description
TOLDEF Defines the meaning of TOLMIN and TOLMAX
FLATTOL Scaled tolerance value
TOLMIN Dark noise tolerance
TOLMAX Bright noise tolerance
REPLACE Value to replace noise

Boxcar Size

Name Description
SAMPLES Number of samples in boxcar
LINES Number of lines in boxcar

Boxcar Restrictions

Name Description
LOW Valid minimum pixel
HIGH Valid maximum pixel
MINIMUM Minimum boxcar pixel count

Special Pixels

Name Description
NULLISNOISENull is noise
HISISNOISEHIS is noise
HRSISNOISEHRS is noise
LISISNOISEHIS is noise
LRSISNOISEHRS is noise
X

Files: FROM


Description

Input cube to filter

Type cube
File Mode input
Filter *.cub
Close Window
X

Files: TO


Description

The resultant filtered cube

Type cube
File Mode output
Close Window
X

Noise Parameters: TOLDEF


Description

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.

Inclusions

  • FLATTOL
Close Window
X

Noise Parameters: FLATTOL


Description

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.

Type double
Default 0.0
Minimum 0.0 (inclusive)
Close Window
X

Noise Parameters: TOLMIN


Description

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.

Type double
Default 20
Minimum 0.0 (exclusive)
Close Window
X

Noise Parameters: TOLMAX


Description

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.

Type double
Default 20
Minimum 0.0 (exclusive)
Close Window
X

Noise Parameters: REPLACE


Description

This is the value that is used to replace pixels which are considered to be noise.

Type string
Default AVERAGE
Option List:
Option Brief Description
AVERAGE Replace noise with boxcar average If the input pixel is considered as noise, it is replaced with the average value of the boxcar.
NULL Replace noise with Isis Null value If the input pixel is considered noise, it is replaced with the Isis Null value.
Close Window
X

Boxcar Size: SAMPLES


Description

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.

Type integer
Minimum 1 (inclusive)
Odd This value must be an odd number
Close Window
X

Boxcar Size: LINES


Description

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.

Type integer
Minimum 1 (inclusive)
Odd This value must be an odd number
Close Window
X

Boxcar Restrictions: LOW


Description

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.

Type double
Internal Default Use all pixels
Less Than HIGH
Close Window
X

Boxcar Restrictions: HIGH


Description

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.

Type double
Internal Default Use all pixels
Greater Than LOW
Close Window
X

Boxcar Restrictions: MINIMUM


Description

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.

Type integer
Default 1
Minimum 1 (inclusive)
Close Window
X

Special Pixels: NULLISNOISE


Description

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.

Type boolean
Default FALSE
Close Window
X

Special Pixels: HISISNOISE


Description

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.

Type boolean
Default FALSE
Close Window
X

Special Pixels: HRSISNOISE


Description

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.

Type boolean
Default FALSE
Close Window
X

Special Pixels: LISISNOISE


Description

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.

Type boolean
Default FALSE
Close Window
X

Special Pixels: LRSISNOISE


Description

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.

Type boolean
Default FALSE
Close Window

Example 1

Header default

Description

Demonstrate the noisefilter application with header

Command Line

noisefilter f=f332s28.cub t=nzfltr tolmin=5 tolmax=50 samples=11 lines=11
Run a noise filter on a Viking image. (Let toldef default to DN.)

GUI Screenshot

noisefilter GUI

Example GUI

Screenshot of GUI with parameters filled in to perform the noisefilter application

Input Image

Input image

Input image for noisefilter

Parameter Name: FROM

This is the input image f332s28.cub. It has noise in the form of small black rectangles.

Output Image

Output image showing results of a noise filter.

Output image for the noisefilter example

Parameter Name: TO

This is the output image for the noisefilter application. The black rectangles are gone.