Home
About ISIS
Support
Download

ISIS 3

Documentation
Tutorials
Technical Documents

ISIS 2

Documentation
Tutorials
Technical Documents
USGS

ISIS 3 Application Documentation


lineeq

Printer Friendly View | TOC | Home

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.

Categories


History

Steven Lambright2007-07-26 Original version
Steven Lambright2007-08-06 Added options and expanded examples
Steven Lambright2007-12-10 Fixed bug where batchlists failed after a few runs
Steven Lambright2007-12-11 Fixed problem with gaps in the images causing the program to fail
Steven Lambright2008-05-13 Removed references to CubeInfo
Debbie A. Cook2011-11-18 Made the output pixel match the input pixel when the input was a special pixel

Parameter Groups

Files

Name Description
FROM Cube to normalize
TO Normalized cube
CSV CSV formatted file of line averages output

Settings

Name Description
BOXTYPE Boxcar height specified in pixels of percentage
BOXSIZE Boxcar size for smoothing
AVERAGES Output a CSV formatted file of the line averages
X

Files: FROM


Description

Specify the cube to be normalized.

Type cube
File Mode input
Close Window
X

Files: TO


Description

Specify the output (normalized) cube.

Type cube
File Mode output
Close Window
X

Files: CSV


Description

Specify the CSV file to output the line averages to.

Type filename
File Mode output
Internal Default No Output
Filter *.csv
Close Window
X

Settings: BOXTYPE


Description

When overriding the default boxcar size, you can enter the new value as a percentage of the image height or as an absolute size.

Type string
Default NONE
Option List:
Option Brief Description
NONEThe boxcar size will be computed automaticallyThe boxcar size will be 10% (rounded up if even).

Exclusions

  • BOXSIZE
ABSOLUTEEnter the boxcar size in linesThe boxcar size will be exactly what you enter. No computations will be done.

Inclusions

  • BOXSIZE
PERCENTAGEEnter the boxcar size in percentagesThis is the percent of the height of the image the boxcar size will be.

Inclusions

  • BOXSIZE
Close Window
X

Settings: BOXSIZE


Description

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).

Type integer
Close Window
X

Settings: AVERAGES


Description

Output a CSV formatted file of the line averages and the smoothed averages.

Type boolean
Default false
Inclusions
  • CSV
Close Window

Example 1

Normalizing a cube

Description

This shows how to normalize a cube using this program. The input is valid data with introduced noise.

Command Line

lineeq from=input.cub to=output.cub boxtype=absolute boxsize=1
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.

Command Line

lineeq from=I07762023RDR_CN.cub to=I07762023RDR_CN.norm.cub csv=I07762023RDR_CN.norm.csv boxtype=percentage boxsize=2 averages=yes
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.

Command Line

lineeq from=input.cub to=output.cub boxtype=percentage boxsize=??
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.