| Environments | PYTHON :: EASI :: MODELER |
| Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Example :: Algorithm :: Related |
| Back to top |
| Back to top |
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| FILE * | String | Input file name | 1 - 192 | |
| DBIC * | Integer | Input image channel | 1 - 1 | 1 - |
| DBOC * | Integer | Output filtered image channel | 1 - 1 | 1 - |
| MASK | Integer | Area mask | 0 - 4 | |
| FACTOR | Float | Gain factor | 0 - 1 | 0.00001 - Default: 1.0 |
| BGZERO | String | Set background to zero | 0 - 3 | YES | NO Default: YES |
| MONITOR | String | Monitor mode | 0 - 3 | ON, OFF Default: ON |
| Back to top |
FILE
Specifies the name of the file that contains the image data to be filtered. The specified file will also receive the output.
DBIC
Specifies the channel containing the unfiltered image to be processed.
DBOC
Specifies the output channel to receive the filtered image.
The specified output channel can be the same as the input channel. For more accurate results, the output channel should be 32-bit real. If an 8-bit channel is specified, all output values higher than 255 will be truncated to 255.
If a mask area is specified, only the area under the mask is written to the output channel.
MASK
Optionally specifies the window or bitmap that defines the area to be processed within the input raster. If this parameter is not specified, the entire channel is processed.
If a single value is specified, that value represents the segment number of the bitmap in the input file. All the pixels within the specified segment, having a pixel value of 1, define the area to be processed.
If four values are specified, they define the X,Y offsets and X,Y dimensions of a rectangular window identifying the area to process. 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.
Only the area under the mask is written to the output. Pixels that are outside the mask but within the filter size window will be used to determine the output pixel values.
FACTOR
Specifies the gain multiplication factor to be applied to the filtered input channel.
Values of 0.0 or negative real numbers are not allowed. The default value is 1.0.
BGZERO
Specifies how the background pixels are processed. Background pixels can be identified as not being covered by a mask you specify. If no mask is specified, BGZERO is ignored. By default, background pixels will be set to the NoData of the output channel, or zero when NoData is not defined. Alternatively, by specifying BGZERO=NO, the background pixels will not be altered in the output and the value of the pixels prior to processing is retained.
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 |
FPRE performs Prewitt Edge Detector filtering on image data. Prewitt edge detection produces an image where higher gray-level values indicate the presence of an edge between two objects. The Prewitt edge detection filter computes the root mean square of two 3X3 templates. For more information about this filter, see the Algorithm section.
The FILE parameter specifies the input image file; this file also receives the output results.
The specified input channel (DBIC) can be the same as the output channel (DBOC).
The user has the option of applying a gain factor (FACTOR) to each filtered input channel before averaging. The default factor of 1.0 implies no gain.
The MASK parameter specifies the area in the input channel that is processed. If no mask is specified, the entire image is processed by default.
| Back to top |
Use the demo file 'irvine.pix' to calculate the Prewitt edge detection gradient.
EASI>file = 'irvine.pix' EASI>dbic = 1 ! channel to be filtered EASI>dboc = 8 EASI>mask = 11 ! process area under bitmap 11 EASI>factor = 1.0 ! gain factor EASI>bgzero = ! default YES, outside bitmap set to 0 EASI>monitor = EASI>RUN FPRE
| Back to top |
The Prewitt edge detection filter uses two 3X3 templates to calculate the gradient value.
-1 0 1 1 1 1
-1 0 1 0 0 0
-1 0 1 -1 -1 -1
X Y
Consider the following 3X3 image window:
+---------+
| a1 a2 a3|
| a4 a5 a6| <--- Filter window 3 X 3
| a7 a8 a9|
+---------+
All pixels are filtered. To filter pixels located near the edges of an image, edge pixel values are replicated to provide sufficient data.
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.