Image line replacement

EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Examples

Back to top


LRP replaces any line of image data that is presumed damaged in the input image file. A line can be replaced with the line above it, the line below it, or the mean of the lines above and below it.
Back to top


Name Type Caption Length Value range
FILE* String Input file name 1 - 192  
DBOC* Integer Output raster channel(s) 1 -    
DBOW Integer Output window 0 - 4 Xoffset,Yoffset,Xsize,Ysize
RMOD* String Replacement mode 1 - 4 ABOVE | BELOW | MEAN
Default: MEAN
LINC* Integer Line increment factor 1 - 1  
MONITOR String Monitor mode 0 - 3 ON, OFF
Default: ON

* Required parameter
Back to top

Parameter descriptions


Specifies the name of the image file containing the channels that require line replacement.


Specifies the output channel to receive the filtered 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.


Specifies a rectangular area (Xoffset, Yoffset, Xsize, Ysize) to be processed for output.

Xoffset, Yoffset define the upper-left starting pixel coordinates of the window. Xsize is the number of pixels that define the window width. Ysize is the number of lines that define the window height.

This window can extend over the entire image or it can target one or two lines for replacement. Line replacement begins with the first line of the specified output window and continues for every specified line (LINC/Line Increment) after that.

If this parameter specifies only one line (DBOW(4)=1), the Line Increment Factor (LINC) must be 1. The number of output lines (DBOW(4)) must be greater than LINC. If only DBOW(1) and DBOW(2) are specified, DBOW(3) and DBOW(4) are the remainder of the image by default. The origin is the upper-left corner.


Specifies the line replacement mode to use. Available values are:

The default value is MEAN.

For the first line of the image, if ABOVE or MEAN is specified, the line below it is used to replace it. For the last line of the image, if BELOW or MEAN is specified, the line above it is used to replace it.


Specifies the increments for line replacement.

Every line in the output window (DBOW) is replaced, beginning with the first line. For example, if LINC=6, every sixth line (lines 1, 7, 13, and so on) is replaced.

LINC must be less than the number of lines in the output window (DBOW(4)), except when LINC is 1. If DBOW(4) is 1, LINC must also be 1.


The program progress can be monitored by printing the percentage of processing completed. A system parameter, MONITOR, controls this activity.

Available options are:

Back to top


LRP replaces lines of image data in the selected output channels (DBOC) in a specified window (DBOW). Image data can be damaged due to a faulty sensor in the satellite or because of damage to the storage medium itself. LRP replaces each line with the line above it, below it, or the mean (average) of the lines above and below it. Every specified line in a defined window is replaced.

Target lines for replacement can be specified in increments, beginning with line number DBOW(2)+1 and ending with a line number equal to or less than DBOW(2)+DBOW(4).

LRP permanently changes the database output channels; use it with caution.

If LRP cannot allocate enough memory to store a line of image data, it throws a MemoryAllocationException exception. If this error occurs, run LRP with fewer output channels (DBOC) or with a smaller output window width (DBOW(3)).

This program does not operate on an image database that contains only one line.

Back to top


Replace a single line of data (line 127) with the line above it on channel 1 of a 512x512 image database.

EASI>FILE	=	"filename"   
EASI>DBOW	=	0,126,512,1


Replace every sixth line in a four-channel database file with the mean of the lines that are above and below it, starting with the third line in the database. DBOW(2) specifies the line offset to the first line that is replaced (in this case, DBOW(2) = 3-1).

EASI>FILE	=	"filename"   
EASI>DBOC	=	1,-4	! output channels 1, 2, 3, and 4


© PCI Geomatics Enterprises, Inc.®, 2024. All rights reserved.