| Environments | PYTHON :: EASI :: MODELER |
| Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Examples :: Algorithm :: Acknowledgements :: References |
| Back to top |
| Back to top |
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| FILI * | String | Input file name | 1 - 192 | |
| FILO | String | Output file name | 0 - 192 | |
| DBIC * | Integer | Input raster channels | 1 - | |
| DBOC | Integer | Output raster channels | 0 - | |
| ROWCOL | String | Correction process | 0 - 3 | ROW | COLUMN Default: ROW |
| SMOOTHM | String | Smoothing method | 0 - 3 | LIN | SQU | TRI | EXP | GAU | POL Default: LIN |
| DBIB | Integer | Input bitmap segment | 0 - 16 | |
| KSIZE | Integer | Kernel length | 0 - 1 | 1 - Default: 7 |
| ORDER | Integer | Order of polynomial equation | 0 - 1 | 1 - 5 Default: 1 |
| Back to top |
FILI
Specifies the name of the file that contains the uncorrected image data. If bitmaps are specified (DBIB) they are assumed to exist in FILI.
FILO
Specifies the name of the file to receive the output corrected image data. If this parameter is not specified, all processing will be done by STRPCOR except for the actual correction and output of the corrected data. If the output file is specified but does not exist, STRPCOR automatically creates it. If FILO is specified and it already exists, FILO must have the same dimensions as FILI.
DBIC
Specifies the image channels on to correct.
Duplicate channels are NOT allowed.
Ranges of channels or segments can be specified with negative values. For example, {1,-4,10} is internally expanded to {1,2,3,4,10}. When you are not specifying a range in this way, only 48 numbers can be specified explicitly.
DBOC
Specifies the output image channels to receive the corrected image.
Duplicate channels are NOT allowed.
Ranges of channels or segments can be specified with negative values. For example, {1,-4,10} is internally expanded to {1,2,3,4,10}. When you are not specifying a range in this way, only 48 numbers can be specified explicitly.
ROWCOL
Specifies whether to perform the correction on the rows or columns of the image.
SMOOTHM
Specifies the smoothing method to use to correct the striping in the imagery.
DBIB
Specifies the input bitmap segment(s) that indicate the location of striped data. This parameter is used only for linear corrections (SMOOTHM="LIN").
Duplicate segments are NOT allowed.
Ranges of channels or segments can be specified with negative values. For example, {1,-4,10} is internally expanded to {1,2,3,4,10}. When you are not specifying a range in this way, only 48 numbers can be specified explicitly.
KSIZE
Specifies the kernel window size to use when the smoothing method (SMOOTHM) is not linear (LIN). If the correction process (ROWCOL) is "ROW", this is in units of scanlines. If ROWCOL is "COL", this is in units of pixels.
The specified value must be an odd integer between 1 and 99 inclusively. The kernel size must not exceed the size of the input file.
ORDER
Specifies the order of the polynomial equation used to estimate the mean gray level for each scanline.
If the smoothing method (SMOOTHM) is set to "POL", STRPCOR requires the kernel size (KSIZE) to be greater or equal to ORDER + 1. If this is not the case, STRPCOR will exit with a message to either raise the value of KSIZE or lower the value of ORDER.
| Back to top |
STRPCOR corrects for image brightness variation that appears as as "stripes" in the image data. This type of correction is commonly known as "destriping." The stripes may be either horizontal (affecting entire scanlines) or vertical (affecting the same columns in each scanline). The correction process (ROWCOL) specifies how the striping occurs. ROWCOL set to "ROW" will process striping of entire scanlines; ROWCOL set to "COL" will correct for vertical striping of columns of the scanlines.
STRPCOR adjusts the gray level of the output image rows so that the brightness of the "striped" scanlines is lightened or darkened to match the brightness of the scanlines where there is no striping. This is done by multiplying each pixel gray-level value in the scanline by a calculated gain factor. The input image data to correct should be non-zero in the "striped" rows. If the "striped" rows are actually "dropped" scanlines (where all pixels in the scanline are zeroed), STRPCOR will not work and another method must be used to correct the imagery.
| Back to top |
Linear smoothing
A linear stripe correction requires the stripe(s) to be identified. (The other methods do not require the stripe(s) to be identified.) The following example uses the bitmap 10 ("Water2") that exists on irvine.pix. All scanlines under bitmap 10 are considered to be a single stripe to correct.
EASI>fili = 'irvine.pix' EASI>filo = 'stripecor_1.pix' EASI>dbic = 1 ! input channel EASI>dboc = 1 ! output channel EASI>rowcol = ! default, ROW EASI>smoothm = 'lin' ! linear correction EASI>dbib = 10 ! bitmap defining the striping EASI>ksize = ! not used when SMOOTHM="LIN" EASI>order = ! not used when SMOOTHM="LIN" EASI>monitor = "ON" EASI>RUN STRPCOR
Polynomial correction
Stripe correction using a polynomial uses a parameter that the other smoothing methods do not; this is the ORDER parameter, which specifies the order of the polynomial to produce.
EASI>fili = 'irvine.pix' EASI>filo = 'stripecor_2.pix' EASI>dbic = 1 ! input channel EASI>dboc = 1 ! output channel EASI>rowcol = ! default, ROW EASI>smoothm = 'pol' ! polynomial correction EASI>dbib = ! not used when SMOOTHM="POL" EASI>ksize = ! default, 7 scanlines EASI>order = ! default, 1st order polynomial EASI>monitor = "ON" EASI>RUN STRPCOR
Square correction
The following example does a square smoothing correction (SMOOTHM="SQU"). The parameter settings work similarly when another of the other smoothing methods (triangular ("TRI") or exponential ("EXP") or gaussian ("GAU") is specified.
EASI>fili = 'irvine.pix' EASI>filo = 'stripecor_3.pix' EASI>dbic = 1 ! input channel EASI>dboc = 1 ! output channel EASI>rowcol = ! default, ROW EASI>smoothm = 'squ' ! square smoothing correction EASI>dbib = ! not used when SMOOTHM="SQU" EASI>ksize = ! default, 7 scanlines EASI>order = ! not used when SMOOTHM="SQU" EASI>monitor = "ON" EASI>RUN STRPCOR
| Back to top |
Linear correction
The Linear stripe correction strategy requires the "stripes" in the imagery to be defined. This is done with one or more bitmaps (DBIB). If a bit is set, it is taken to mean that all the scanlines under that bit is part of the stripe.
SLOPE = ( AFTER - BEFORE ) / COUNT_n
ORIGIN = BEFORE - SLOPE * BEFORE_SCANLINE
(SLOPE * BAD_LINE_n + ORIGIN)
GAIN_n = -----------------------------
BAD_n
OUTPUT_PIXEL_1 = INPUT_PIXEL_1 * GAIN_n
OUTPUT_PIXEL_2 = INPUT_PIXEL_2 * GAIN_n
: : :
OUTPUT_PIXEL_m = INPUT_PIXEL_m * GAIN_n
Polynomial correction
The Polynomial method is similar to the Smoothing methods in that both smooth the data. The difference is that the Polynomial method performs smoothing with least-squares fit polynomials, while the Smoothing methods use different smoothing functions.
SMOOTH_n
GAIN_n = --------
MEAN_n
OUTPUT_PIXEL_1 = INPUT_PIXEL_1 * GAIN_n
OUTPUT_PIXEL_2 = INPUT_PIXEL_2 * GAIN_n
: : :
OUTPUT_PIXEL_m = INPUT_PIXEL_m * GAIN_n
X[1] = LINE_COORDINATE_1 Y[1] = MEAN_1 X[2] = LINE_COORDINATE_2 Y[2] = MEAN_2 X[3] = LINE_COORDINATE_3 Y[3] = MEAN_3 NUMBER_POINTS = 3
Smoothing
SMOOTH_n
GAIN_n = --------
MEAN_n
OUTPUT_PIXEL_1 = INPUT_PIXEL_1 * GAIN_n
OUTPUT_PIXEL_2 = INPUT_PIXEL_2 * GAIN_n
: : :
OUTPUT_PIXEL_m = INPUT_PIXEL_m * GAIN_n
SMOOTH = SMOOTH_FUNCTION( (MEAN_2 - MEAN_1), 3/2 ) SMOOTH_2 = SMOOTH * MEAN_1 NORMAL = SMOOTH SMOOTH = SMOOTH_FUNCTION( (MEAN_2 - MEAN_2), 3/2 ) SMOOTH_2 = SMOOTH_2 + SMOOTH * MEAN_2 NORMAL = NORMAL + SMOOTH SMOOTH = SMOOTH_FUNCTION( (MEAN_2 - MEAN_3), 3/2 ) SMOOTH_2 = SMOOTH_2 + SMOOTH * MEAN_3 NORMAL = NORMAL + SMOOTH
SMOOTH_2 = SMOOTH_2 / NORMAL
The Smooth functions (SMOOTH_FUNCTION) are as follows.
Square (that is, SMOOTHM="SQU"),
SMOOTH = 1.0
Triangular (that is, SMOOTHM="TRI")
if the input value X is negative or equal to zero
SMOOTH = ( X / HALF_KSIZE ) + 1.0
if the input value X is positive (that is, greater than zero)
SMOOTH = ( (-X) / HALF_KSIZE ) + 1.0
Exponential (that is, SMOOTHM="EXP")
SMOOTH = EXP( -3.0 * ABS( X / HALF_KSIZE ) )
where EXP() is the exponential function
and ABS() is the absolute value of ( X / HALF_KSIZE )
Gaussian (that is, SMOOTHM="GAU")
SMOOTH = EXP( -4.0 * SQUARE( X / HALF_KSIZE ) )
where EXP() is the exponential function
and SQUARE() is the square of ( X / HALF_KSIZE )
| Back to top |
PCI Geomatics received financial support from the Canadian Space Agency/L'Agence Spatiale Canadienne through the Earth Observation Application Development Program (EOADP) for the development of this software, under contract 9F028-0-4902/12.
| Back to top |
Datt, B. McVicar, T.R. et al. "Pre-processing EO-1 Hyperion Hyperspectral data to Support the Application of Agricultural Indexes", IEEE Transactions on Geoscience and Remote Sensing, June 2003, Volume 41, Issue 6 pp. 1246-1259.
F. A. Kruse, "Use of airborne imaging spectrometer data to map minerals associated with hydrothermally altered rocks in the Northern Grapevine Mountains, Nevada and California," Remote Sens. Environ., vol. 24, no. 1, pp. 31-51, 1988.
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.