findgaps
Finds the gaps in a given Cube.
This program finds gaps in the line direction of an image, and will report the gap information or expand the gap based on user parameters or default settings. Gaps are areas where the entire line consists of NULL pixel values or pixel values statistically below the threshold setting of the CORTOL parameter. This program ignores single line gaps.If the LOG parameter is specified, the starting and last line of each gap as well as the band number is recorded and placed into a log filename (.pvl, .txt) entered by the user. If the output cube or TO parameter is not specified, then the program only identifies the gaps.
The CORTOL parameter should be set to "0.0" to only identify an entire line of "NULL" pixels as a gap. If the CORTOL parameter is set to a value greater than "0.0," then the statistics of the current line are compared against the statistics of the previous line to determine if the line should be considered a gap. This option is useful if random lines are much brighter or darker than the adjacent lines.
Categories
History
Christopher Austin | 2007-11-26 | Original version |
Steven Lambright | 2008-05-12 | Removed references to CubeInfo |
Kimberly Oyama and Steven Lambright | 2012-06-15 | Added the option to nullify a gap and add a buffer of null lines above and below each gap and output these results to a cube. If no output cube is specified results will only be output to a log file (.pvl, .prt, or .txt) or vice versa. Neither output affects the other. Fixes #582. |
Parameters
Files
Type | cube |
---|---|
File Mode | input |
Filter | *.cub |
Type | cube |
---|---|
File Mode | output |
Default | none |
Filter | *.cub |
Type | filename |
---|---|
File Mode | output |
Default | none |
Filter | *.txt *.prt *.pvl |
Correlation Coefficient Tolerance
Type | double |
---|---|
Default | 0.0 |
Buffer Size (Lines)
Type | integer |
---|---|
Default | 7 |
Type | integer |
---|---|
Default | 7 |
Example 1
Finds Image Gaps
Command Line
findgaps FROM=I02025005RDR.cub
TO=cubeResults.cub
LOG=logFileResults.txt
ABOVE=10
BELOW=10
Input Image
Data File
Links open in a new window.logFileResults.txt |
In the case of no gaps, the LOG output file parameter will be empty. When there are gaps in the cube image, then the gap information is reported in the LOG file if it is specified. In this example, that file is logFileResults.txt, as shown here. Each gap is displayed as a group consisting of the band number, the starting line number, the correlation coefficient that defined the line as gap, and the last line for a particular gap. |
---|
Output Image
The same section as that shown for the input image.
cubeResults.cub
Parameter Name:
TO
This is the image cubeResults.cub that has null lines above and below each gap. You can see that 10 lines above and below the gap have been nulled out. The narrow strip of valid data in the middle of the image has been set to null due to the ABOVE and BELOW parameter settings. Reduce the value for ABOVE and BELOW to minimize the lines being set to NULL.