This program will normalize a cube based on line averages.
Overview
Parameters
Example 1
Example 2
Example 3
Description
This program will normalize a cube based on line averages.
This is useful for linescan camera images where the signal drifts over time. It can also
be used for correcting for photometric changes when part of the image was taken during the day and
the other part was taken at night.
The boxcar size should be somewhere between 0% and 200%, where 200% will give you the same image back
and 0% will remove all albedo and clean up all noise. The reason for the boxcar size being 200% is because the boxcar
folds at the border, meaning at line zero it's only incorporating 50% of the lines and at the center it's incorporating all of them. The
200% boxcar makes every pixel incorporates a boxcar of all of the data, causing only negligable change in the equation.
The normalization is achieved by collecting all of the line averages for any given band. A lowpass filter
is then run on these averages. Finally, the lines are normalized with their smoothed average. The
CSV output option will output a CSV file (readable by most spreadsheet programs such as Excel)
with the line averages before and after smoothing. Using this data, graphing the line averages will
reveal and identify problem data.
This will override the default boxcar size when smoothing the line averages. The larger this size is, the less the image is affected.
The smaller the boxcar, the larger the effect. If entering an absolute line size, it must be odd (any even number will automatically be
rounded up).
This is the command line to run this program, with a small boxcar, on input.cub.
GUI Screenshot
Running this program
Running this program on input.cub
Parameter Name:
TO
This screen shot shows how to run this program using a small boxcar on
input.cub.
Input Images
Noise
Noise
Parameter Name:
FROM
This shows the noise that was introduced into the input image. It's values change line by line. This was introduced to input.cub by using fx and adding to the valid data.
Original
Original Data
Parameter Name:
FROM
This is the original image, before anything was done to it.
Before
Input Data
Parameter Name:
FROM
This is the original image with the noise added in.
Output Image
After
Output Image
Parameter Name:
TO
This shows the image after this program was run. Notice the image data is restored, but all albedo was lost.
Example 2
Identifying a problem cube
Description
This program does not properly handle all cubes. When the line averages spike, this program smoothes them,
but bad data could cause these spikes and this program will try to correct bad data incorrectly inthe areas with the spikes.
This is the command line to run this program, with a small boxcar, on I07762023RDR_CN.norm.cub and output a CSV file.
GUI Screenshot
Running this program
Running this program on I07762023RDR_CN.cub with CSV output
Parameter Name:
TO
This screen shot shows how to run this program on
I07762023RDR_CN.cub and output the line averages as CSV.
Input Images
Overall Graph
CSV Graph
Parameter Name:
CSV
This shows the graph of the averages from the CSV file. Notice there is a large spike on the far left hand side of the data. This should be investigated further.
Zoomed In Graph
CSV Graph (a closer look)
Parameter Name:
CSV
This shows the graph of the averages from the CSV file zoomed into the left side. Notice the smoothed average (pink) is significantly off from the averages (blue).
This tells us that the data in this region did not normalize properly.
Input
The cube
Parameter Name:
FROM
This shows the first 1000 lines of the image before this program was run. Notice the bright area in this data corrosponds to the spike on the CSV graph.
Output Image
Output
Output Image
Parameter Name:
TO
This shows the first 1000 lines of the image after this program was run. Notice the resulting effects of this incorrect normalization. A smaller boxcar would
balance this area, except for the lines with the bad data, but would also destroy any valid albedo.
Example 3
Deciding on a boxcar size
Description
This shows how the boxcar size affects the output of this program.
This is the command line to run this program in this example, where ?? becomes a relative boxcar size.
GUI Screenshot
Running this program at 5% boxcar
Running this program on input.cub with a 5% boxcar size
Parameter Name:
BOXSIZE
This screen shot shows how to run this program using a 5% boxcar on input.cub.
Running this program at 20% boxcar
Running this program on input.cub with a 20% boxcar size
Parameter Name:
BOXSIZE
This screen shot shows how to run this program using a 20% boxcar on input.cub.
Running this program at 50% boxcar
Running this program on input.cub with a 50% boxcar size
Parameter Name:
BOXSIZE
This screen shot shows how to run this program using a 50% boxcar on input.cub.
Input Image
Noise
Input Data
Parameter Name:
FROM
This is the original image. Notice it's very bright at the top and very dark at the bottom.
Output Images
Very Small Boxcar
Output Image
Parameter Name:
TO
This shows the image after this program was run with a very small boxcar. Notice the loss of albedo.
Small Boxcar
Output Image
Parameter Name:
TO
This shows the image after this program was run with a small boxcar. Notice less of the data was properly normalized and there's more albedo.
Larger Boxcar
Output Image
Parameter Name:
TO
This shows the image after this program was run with a larger boxcar. The albedo change from the last example to this one is minimal, but much more data was lost.