User's Guide

HISTEQ

Performs histogram equalization to correct images with regular striping

Function:

Performs a histogram equalization to correct images with a regular striping that is due to a differential detector response within a band in a multidetector sensor. Radiometric look-up tables (RLUTs) are generated for the corrected image and output to a file. This file is then used as input to RADIOM2 to generate the corrected image.

Parameters:

IN
Input image. The image containing cyclic striping due to detector calibration errors. Must be a BYTE image.

OUTRLUT
Output radiometric lookup table file. It will contain the radiometric lookup tables (RLUTs) for use with the program RADIOM2 to correct the striped image.

NDETECT(16)
Number of detectors in input image (See User Notes 1 and 2).

DETNUM(--)
Detectors to be corrected.

Default: all NDETECT detectors will be corrected. Otherwise, all unspecified detectors will have identity RLUTs.

CORRDET(--)
Correction detectors. Detectors to be used for computing correction(s). This allows the user to correct any bad detector by using only the best of the other detectors.

Default: all NDETECT detectors will be processed. Otherwise, only the given detectors will be used to generate the equalization factor.

PIXSAMP(1)
Pixel sampling rate. Determines pixel sampling rate for histogram computation. If PIXSAMP = n, every nth pixel in every line is used for histogram computation.

Examples:

  1. LAS> histeq in=dc outrlut=dc ndetect=6 pixsamp=4

    A histogram equalization is performed on each band in the multispectral image, DC. The pixel sampling rate for histogram computation is every fourth value. The generated RLUTs are output to DC;RLUT.

  2. LAS> histeq in=img1 outrlut=img1.hist

    A histogram equalization is performed on the input file, IMG1. By default, IMG1 is specified as a TM scene. The generated RLUTs are output to IMG1.HIST;RLUT.

  3. LAS> histeq in=img2 outrlut=img2 ndetect=4 detnum=(1,3) corrdet=(2,4)

    The RLUT file, IMG2;RLUT, contains histogram equalized RLUTs for detectors 1 and 3 of IMG.IN. The equalizations are based on detectors 2 and 4. Since detectors 2 and 4 are not corrected, their corresponding RLUTs are linear.

Description/Algorithm:

HISTEQ assumes a nonlinear detector transfer function derived from matching the cumulative histograms of the individual detectors in a band to the cumulative histogram of all detectors in the band. This technique is based on the assumption that, for large regions, each detector in a band is exposed to the same scene radiance with the same probability distribution. The probability distribution function of each detector, therefore, should be similar. Any variation in the probability distribution function among detectors may be attributed to differential detector response.

The cumulative histogram, Hd, for each detector, d, of a band is computed based on the specified sampling factor.

The cumulative histogram, H, for the entire scene is also obtained. Hd(g) is the frequency of occurrence of detector output values less than or equal to g. Hd is normalized by multiplying by NDETECT, denoted Hd'. The corrected detector output, f, is found for detector output g such that

H(f) <= Hd'(g) < H(f+1)

The relationship between g and f for each detector is the transform function and is stored as a set of look-up tables for each detector.

Nonfatal Error Messages:

  1. [histeq-detnum] Some detectors requested for correction will be ignored; they exceed NDETECT

    The parameter DETNUM cannot have more values than NDETECT.

  2. [histeq-corrdet] Some detectors to be used for correction will be ignored; they exceed NDETECT

    The parameter CORRDET cannot have more values than NDETECT.

  3. [histeq-nlines] Number of lines adjusted to XXX, a multiple of NDETECT

    The number of lines in the input image or specified window is larger than a multiple of NDETECT; it is adjusted.

Fatal Error Message:

  1. [histeq-dtype] Input image must be BYTE

    HISTEQ only accepts BYTE data. Use the LAS programs SCALE or COPY to change the data type.

User Notes:

  1. HISTEQ assumes that the image is TM when NDETECT = 16. So, the line number 1 corresponds to detector 16, line number 2 to detector 15, and so on.

  2. HISTEQ assumes that the image is MSS when NDETECT = 4, and adds 8 to the band numbers.

  3. The generated RLUTs may be examined by using the program DSPRLT.