User's Guide

DESTRIPE

Generates statistics and corrects for detector miscalibration in Landsat images

Function:

Generates statistics (mean, standard deviation, skewness, and kurtosis) of Landsat images and corrects for detector miscalibration. It optionally applies a smoothing algorithm. The input must be a BYTE image and have 2-16 detectors. Up to two output images may be created; each is a BYTE image having the same size and number of bands as the input image. The normalization statistics before and after correction can be printed on the line printer or terminal.

Parameters:

IN
Input image. Must be BYTE data type.

NDETECT(16)
Number of detectors. Number of detectors that were used in creating the input image. Valid values for NDETECT are 2 - 16.

CORRMETH(NO)
Correction method. Type of correction to be applied.


  = EDIES:  Correction for detector miscalibration
  = SMOOTH: Local smoothing operation using a user specified
            cell size
  = BOTH:   Both the detector miscalibration and smoothing
            correction
  = USER:   User defined correction
  = NO:     No correction is applied 

STATOPT(1)
Statistics option.


  = 1:  Print statistics before correction only
  = 2:  Print statistics before and after correction when
        CORRMETH=EDIES or SMOOTH
  = 3:  Print statistics before and after EDIES, and after
        SMOOTH, when CORRMETH=BOTH

ZEROFLG(YES)
Option to include zeros during statistics calculations.


  = YES:  Include zeros
  = NO:   Exclude zeros

OUT(--)
Output image. Required when CORRMETH=EDIES, SMOOTH, BOTH, or USER; ignored otherwise. The data type of OUT is always BYTE.

OSMOOTH(--)
Second output image. Required when CORRMETH=BOTH; ignored otherwise. The data type of OSMOOTH is always BYTE.

PRINT(TERM)
Output destination. The output destination for statistics.


  = --:       No Report
  = TERM:     Terminal
  = LP  :     Line printer
  = FILENAME: User supplied file name

SMTHRVAL(3,3)
Smoothing threshold value. Vertical and Horizontal thresholds for smoothing. If the absolute value of any of the differences between a pixel and its two horizontal and vertical neighbors exceeds the thresholds, then the pixel's value is replaced by the average of all the pixels within the cell surrounding the pixel (see KERNDIM). SMTHRVAL is required when CORRMETH= SMOOTH, or BOTH and is ignored otherwise.

KERNDIM(3,3)
Kernel dimensions (NL, NS). Window size in lines and samples to be used for smoothing. It must be specified when CORRMETH=SMOOTH or BOTH. Valid values for KERNDIM are odd numbers from 3 to 15.

Examples:

  1. LAS> destripe in=in corrmeth=edies out=out print=lp

    The program generates a set of statistics before applying detector correction and prints them on a line printer. The output image, OUT, is produced after applying EDIES corrections.

  2. LAS> destripe in=in corrmeth=both statopt=3 out=out1 osmooth=out2

    This example is similar to Example 1 except that three sets of statistics are generated and printed on the terminal, and two output images are produced. The first statistics set is output before any correction. The second statistics set is output after the EDIES correction is applied, producing output image OUT1. The third statistics set is output after the SMOOTH correction is applied to OUT1, with the resulting output image OUT2.

  3. LAS> destripe in=in corrmeth=user out=out print=lp

    As in Example 1, one set of statistics is printed on the line printer before correction. Then the user is prompted for changes in means and standard deviations for detectors and the output image, OUT, is produced. Note that if the user does not specify any changes, OUT is a copy of IN.

Description/Algorithm:

DESTRIPE reads the input image and generates statistics for each band and for each detector. The following equations are used to generate statistics, where Xi denotes the input pixel value.



                N 
               SUM  X 
           _   i=1   1
      MEAN X = -------
                  N

                               --            --
                               |  N       _ 2 | 
                               | SUM (X - X)  | 
      Standard Deviation = SQRT| i=1   i      |
                               | -----------  |
                               |        N     |
                               --            --


                  N       _ 3 
                 SUM (X - X) /N
                 i=1   i
      Skewness = --------------
                        3 
                       S 

                  N       _ 3
                 SUM (X - X) /N 
                 i=1   i
      Kurtosis = --------------
                        4 
                       S

EDIES correction is computed and the output image is generated by the following equation:

The optional smoothing correction is done for each band and is applied 
by comparing the value of a pixel to its two vertical neighbors by the 
following criteria.  For any pixel (i,j) with value X   
                                                     i,j
if         
   |(X   - X     ) or (X   - X     )| > T
      i,j   i,j-1       i,j   i,j+1      V

and 
   |(X   - X     )| or |(X   - X     )| > T
      i,j   i-1,j         i,j   i+1,j      H

where T  and T  are vertical and horixontal thresholds, respectively,
       V      H
X    is left unchanged; otherwise X    is replased by the average value
 i,j                               i,j
of all the pixels in the cell.  Note that, at the boundaries, where 
averaging of the entire cell is not possible, the pixels are copied 
from the input of EDIES-corrected image without any averaging.

Nonfatal Error Message:

    None.

Fatals Error Messages:

  1. [destripe-dtype] Data type of the input image is not BYTE

    The input image must be a byte image. Retry with the appropriate image.

  2. [destripe-ndetect] Number of detectors > the input image lines

    The number of detectors specified must be 2 to 16. If the image is windowed, the number of detectors cannot exceed the number of lines. Retry with the appropriate number of detectors.

  3. [destripe-getout] Correction code requires an output image specification

    The correction codes USER, EDIES, and SMOOTH require an output image specification. If the correction code is BOTH, two output images are required, one for EDIES correction and one for smoothing. Retry and specify an output image.

  4. [destripe-windchk] Specified kernel size exceeds the input image size

    The valid numbers for the kernel size are odd numbers between 3 and 15 (inclusive). Retry with correct size.

  5. [ediesc_alloc] Error: cannot allocate dynamic memory

    There was an error allocating memory for the data buffers. If the error persists contact the system administrator.

  6. [destripe_alloc] Error: cannot allocate dynamic memory

    There was an error allocating memory for the data buffers. If the error persists contact the system administrator.

User's Note:

    None.