lineeq
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.
Categories
History
Steven Lambright | 2007-07-26 | Original version |
Steven Lambright | 2007-08-06 | Added options and expanded examples |
Steven Lambright | 2007-12-10 | Fixed bug where batchlists failed after a few runs |
Steven Lambright | 2007-12-11 | Fixed problem with gaps in the images causing the program to fail |
Steven Lambright | 2008-05-13 | Removed references to CubeInfo |
Debbie A. Cook | 2011-11-18 | Made the output pixel match the input pixel when the input was a special pixel |
Parameters
Files
Type | cube |
---|---|
File Mode | input |
Type | cube |
---|---|
File Mode | output |
Type | filename |
---|---|
File Mode | output |
Internal Default | No Output |
Filter | *.csv |
Settings
Type | string | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Default | NONE | ||||||||||||
Option List: |
|
Type | integer |
---|
Type | boolean |
---|---|
Default | false |
Inclusions |
|
Example 1
Normalizing a cube
Command Line
lineeq from=input.cub to=output.cub boxtype=absolute boxsize=1
GUI Screenshot
Running this program on input.cub
Running this program
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 Data
Original
Parameter Name:
FROM
This is the original image, before anything was done to it.
Output Image
Example 2
Identifying a problem cube
Command Line
lineeq from=I07762023RDR_CN.cub to=I07762023RDR_CN.norm.cub csv=I07762023RDR_CN.norm.csv boxtype=percentage boxsize=2 averages=yes
GUI Screenshot
Running this program on I07762023RDR_CN.cub with CSV output
Running this program
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
CSV Graph
Overall 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.
CSV Graph (a closer look)
Zoomed In Graph
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.
The cube
Input
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
Example 3
Deciding on a boxcar size
Command Line
lineeq from=input.cub to=output.cub boxtype=percentage boxsize=??
GUI Screenshot
Running this program on input.cub with a 5% boxcar size
Running this program at 5% boxcar
Parameter Name:
BOXSIZE
This screen shot shows how to run this program using a 5% boxcar on input.cub.
Running this program on input.cub with a 20% boxcar size
Running this program at 20% boxcar
Parameter Name:
BOXSIZE
This screen shot shows how to run this program using a 20% boxcar on input.cub.
Running this program on input.cub with a 50% boxcar size
Running this program at 50% boxcar
Parameter Name:
BOXSIZE
This screen shot shows how to run this program using a 50% boxcar on input.cub.
Input Image
Input Data
Noise
Parameter Name:
FROM
This is the original image. Notice it's very bright at the top and very dark at the bottom.
Output Images
Output Image
Very Small Boxcar
Parameter Name:
TO
This shows the image after this program was run with a very small boxcar. Notice the loss of albedo.
Output Image
Small Boxcar
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.