This application removes noise from HiRISE cubes. It also checks the
pause points and removes any artifacts there. The application runs in a
pipeline and starts off by getting the histogram of the image and gets the
standard deviation, percentage of LIS pixels and MaxDN from the histogram
stats. It then runs Cubenorm and processes the cubenorm stats given the
Channel and Summing mode. If percentage of valid pixels in a column is less
than CLEAR_FRACTION and if NULL_COLUMNS option is set then the stats for
the columns Average, Median, StdDev, Minimum, Maximum will be set to 0
else it is set to 1. These changes are ouputted to new Stats files.
For images with summing equal to 1, depending on Channel 0/1, pause,
width and direction is calculated. If the percentage of valid pixels in
these columns are less than the user specified NONVALID_FRACTION then
these columns are said to contain a high percentage of non-valid pixels
and the stats for the columns stated above are set to 0.
These updated stats will form the input stats for cubenorm app which is
run twice and output of which forms the input image one each for lowpass
and highpass filters. The cubenorm basically clears the columns with stats
equal to 0 which was previously manipulated. Perform highpass and
lowpass filters for vertical destripping. The lowpass app is run with the
options LPF_LINES, LPF_SAMPLES, LPF_MINPER. The highpass app is run with
the options HPF_LINES, HPF_SAMPLES, HPF_MINPER. The output of these 2
filters are added.
Noisefilter app is run 3times with the options FLATTOL, TOLDEF, TOLMIN,
TOLMAX, LOW, HIGH, REPLACE, SAMPLE, LINE, LISISNOISE and LRSISNOISE.
Now that the data is much cleaner another set of lowpass, highpass
filters are performed on the image and added togather. This is the final
product for non RED image.
Perform LPFZ filters if we have a RED filter image. For IR and BG
filter data, assume that the HiColorNorm pipeline step will interpolate
using the BG/RED and IR/RED ratio data. So another set of lowpass and
highpass filters is performed on RED filter image and added to get the
final product.