User's Guide

LINEREPR

Replaces cyclic missing lines of data by averaging neighboring lines

Function:

Corrects for systematic stripping in an image due to a defective detector in a multidetector sensor array. The location of the first bad line and the number of detectors in that band need to be specified. LINEREPR accepts only BYTE and INTEGER*2 data types.

NOTE: Adjacent bad detectors (LINEINC=1) in the same 
      band CANNOT be properly corrected.  If more 
      than one detector in a band is defective, but 
      is not adjacent, the program will have to be 
      run separately for each bad detector.

Parameters:

IN
Input image. Specifies the name of the image to be corrected. IN must contain BYTE or INTEGER*2 pixels, LINEREPR will abort otherwise. The number of lines for IN must be greater than LINEINC.

OUT
Output image. Specifies the name for the corrected output image. It will be the same size and data type as the input specification.

SL
Starting bad line. Specifies where the first occurrence of the line to be repaired is relative to the starting line of the image, NOT relative to the window (if specified).

LINEINC(16)
Bad line increment. Repetition rate of bad lines in the input image. The following are the most commonly used values:

   =16:  FOR TM DATA BANDS 1,2,3,4,5,7
   = 6:  FOR MSS DATA
   = 4:  FOR TM DATA BAND 6

NOTE: Adjacent detectors (LINEINC=1) may not be correctly adjusted by one run of LINEREPR. Separate runs are needed to perform this operation.

Examples:

  1. LAS> linerepr in=mon.key out=liner.out sl=10 lineinc=4

    The 10th line and every 4th line thereafter is replaced by the average of its neighbors.

  2. LAS> linerepr in=mon.key out=liner.out sl=23 lineinc=8196

    Only the 23rd line of MON.KEY is repaired. The resulting image is stored in LINER.OUT.

Description/Algorithm:

LINEREPR replaces every nth line in the input image (specified by the repetition rate LINEINC), beginning with the first occurrence of the bad line (specified by SL), with the average of the line above and the line below the bad line. If the nth pixel of the lth line, Pnl, is to be repaired by LINEREPR, the averaging system is then:

                Pnl = (Pnl+1 + Pnl-1)/2

Nonfatal Error Messages:

    None.

Fatal Error Messages:

  1. [linerepr-badline] Starting line cannot exceed the number of lines in the input image

    Check the value entered for SL against LINEINC.

  2. [linerepr-dtype] REAL*4 and INTEGER*4 data types are not allowed

    IN must be a BYTE or INTEGER*2 image. Run COPY to convert the input image to the appropriate type before using LINEREPR

User Notes:

    None.