| Environments | PYTHON :: EASI :: MODELER |
| Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Example :: Related |
| Back to top |
| Back to top |
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| FILE * | String | Input file name | 1 - 192 | |
| DBIC * | Integer | Input raster channel or layer | 1 - 1 | |
| DBOC * | Integer | Output channel or layer | 1 - 1 | |
| FLSZ | Integer | Filter size | 0 - 2 | 1 | 3 | 5 | 7 | 9 | 11 | 13 | 15 | 17 | 19 | 21 | 23 | 25 | 27 | 29 | 31 | 33 Default: 3,3 |
| MASK | Integer | Area mask layer or channel | 0 - 4 | |
| FLTFIL | String | Text file of filter weights | 0 - 191 | |
| BGZERO | String | Set background to zero | 0 - 3 | Yes, No Default: Yes |
| MR01 | Float | Row 01 of the filter matrix | 0 - 11 | |
| MR02 | Float | Row 02 of the filter matrix | 0 - 11 | |
| MR03 | Float | Row 03 of the filter matrix | 0 - 11 | |
| MR04 | Float | Row 04 of the filter matrix | 0 - 11 | |
| MR05 | Float | Row 05 of the filter matrix | 0 - 11 | |
| MR06 | Float | Row 06 of the filter matrix | 0 - 11 | |
| MR07 | Float | Row 07 of the filter matrix | 0 - 11 | |
| MR08 | Float | Row 08 of the filter matrix | 0 - 11 | |
| MR09 | Float | Row 09 of the filter matrix | 0 - 11 | |
| MR10 | Float | Row 10 of the filter matrix | 0 - 11 | |
| MR11 | Float | Row 11 of the filter matrix | 0 - 11 | |
| REPORT | String | Report mode | 0 - 192 | Quick links |
| MONITOR | String | Monitor mode | 0 - 3 | ON, OFF Default: ON |
| Back to top |
FILE
The name of the file to process.
DBIC
The input channel or layer to filter.
DBOC
The output channel or layer to receive the output results.
The output channel or layer can be the same as the input channel or layer, and you can also specify more than one of either, if necessary.
Only the area under the mask is processed. If no mask is specified, FPR filters the entire channel.
FLSZ
The horizontal and vertical dimensions of the filter, in pixels. You can specify odd integers ranging from 1 through 33, inclusively. The filter need not be square. The minimum filter size is 1 x 3 or 3 x 1. The default size is 3 x 3 (3,3).
This parameter is optional.
MASK
The area in the input image to filter.
This parameter can be set by specifying a window size or a bitmap mask channel.
MASK=x-offset, y-offset, x-size, y-size
X-offset and y-offset define the upper-left starting pixel coordinates of the window. X-size is the number of pixels that define the window width. Y-size is the number of lines that define the window height.
If no bitmap is specified, the entire layer is processed.
This parameter is optional.
FLTFIL
The name of the text file that contains the filter weights that are used for a filter you have defined. The text file is a space-delimited matrix of weight values that correspond to the window size of the filter.
Each line of the text file must contain the coefficients of the corresponding row of the filter. Field i of line j of the text file must contain the coefficient of row j, column i of the filter. The fields must be whitespace-delimited.
BGZERO
Whether to set the background to zero or to keep the value outside the specified mask area.
If you use the default setting of the MASK parameter, this parameter is ignored.
MR01
The row elements of the filter matrix.
For more information, see Details.
MR02
The row elements of the filter matrix.
For more information, see Details.
MR03
The row elements of the filter matrix.
For more information, see Details.
MR04
The row elements of the filter matrix.
For more information, see Details.
MR05
The row elements of the filter matrix.
For more information, see Details.
MR06
The row elements of the filter matrix.
For more information, see Details.
MR07
The row elements of the filter matrix.
For more information, see Details.
MR08
The row elements of the filter matrix.
For more information, see Details.
MR09
The row elements of the filter matrix.
For more information, see Details.
MR10
The row elements of the filter matrix.
For more information, see Details.
MR11
The row elements of the filter matrix.
For more information, see Details.
REPORT
Specifies where to direct the generated report.
Available options are:
MONITOR
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 |
FPR performs programmable filtering on image data. The programmable filter averages image data according to weights you have specified. By using FPR, you can design filters for specific requirements, such as directional filters or Laplacian filters. The filter dimensions must be odd, with acceptable values ranging from 1 x 1 through 33 x 33. You must specify a matrix of real weights to apply to each pixel within the filter area. FPR does not normalize the filter weights.
Each row of the filter matrix is stored in a separate parameter (MR01, MR02, MR03...MR11).
The output channel or layer can be the same as the input channel or layer.
The MASK parameter specifies the area within the input channel to process. Only the area under the mask is filtered. The rest of the image is unchanged.
If you specify a single value for the MASK parameter, the value points to a bitmap segment that defines the area to filter. When you specify four values, the values define the x and y offsets and x and y dimensions of the rectangular window in the image to filter. By default, MASK processes the entire image.
Filter-matrix parameters
The filter-matrix parameters 01 through 11 define the matrix-row elements.
The implementation of a programmable filter consists of applying a set of weighting values (M) for each pixel (P) that you define. All pixels are filtered. To filter pixels located near the edges of the image, FPR replicates edge-pixel values to provide sufficient data.
Filtered window 3 x 3Weight values set by you
+---------+ +---------+
|P1 P2 P3 | |M1 M2 M3 |
|P4 P5 P6 | |M4 M5 M6 |
|P7 P8 P9 | |M7 M8 M9 |
+---------+ +---------+
The resulting gray-level value R for the smoothed pixel is:
R = (P1*M1 + P2*M2 + ... + P9*M9) / (M1 + M2 + ... + M9)
If the sum of filter weights is zero ( M1 + M2 + ... + M9 = 0):
R = (P1*M1 + P2*M2 + ... + P9*M9)
The following example applies a Laplacian mask Q on a 3 x 3 filter area of an 8 x 8 image:
+---------+
| 0 -1 0 |
|-1 5 -1 |
| 0 -1 0 |
+---------+
Image before filtering Image after filtering
8 8 9 9 9 7 6 6 6 6
+----------------+ +--------------------+
8 |8 9 9 9 7 6 6 6 | 6 | 7 10 9 13 7 5 6 6 |
8 |8 9 9 7 6 6 6 6 | 6 | 6 11 12 5 4 6 6 6 |
9 |9 8 8 6 6 6 6 6 | 6 |11 6 10 2 6 7 6 6 |
9 |9 8 7 7 6 5 6 6 | 6 |12 9 5 10 6 1 7 6 |
7 |7 7 7 6 6 6 6 6 | 6 | 6 7 9 4 6 7 6 6 |
6 |6 6 6 6 6 6 6 6 | 6 | 5 5 5 6 6 6 6 7 |
6 |6 6 6 6 6 6 6 5 | 5 | 6 6 6 6 6 6 7 1 |
6 |6 6 6 6 6 6 6 6 | 6 | 6 6 6 6 6 6 6 7 |
+----------------+ +--------------------+
6 6 6 6 6 6 6 6 6 6
| Back to top |
A 3 x 3 programmable filter (Laplacian mask Q) is used under 8-bit signed channel 1, which contains blue-green data, and uses the file irvine.pix. The Laplacian mask Q filter computes the Laplacian edge enhancement and adds it back to the original image. The output channel equals the input channel.
EASI>FILE = "IRVINE.PIX" EASI>DBIC = 1 ! Channel to be filtered EASI>DBOC = 1 ! Overwrite input channel EASI>FLSZ = 3,3 ! Uses a 3 x 3 filter EASI>MASK = ! Process entire image EASI>FLTFIL = ! No text file of filter weights EASI>BGZERO = ! Defaults to Yes, set background to zero EASI>MR01 = 0,-1, 0 ! EASI>MR02 = -1, 5,-1 ! Laplacian mask Q EASI>MR03 = 0,-1, 0 ! EASI>RUN FPR
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.