FPRE

Prewitt edge filter (3x3)


EnvironmentsPYTHON :: EASI :: MODELER
Batch ModeYes
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Algorithm :: Related

Back to top

Description


Performs Prewitt edge detector filtering on image data. The Prewitt edge detector filter creates an image where edges (sharp changes in gray-level values) are shown.
Back to top

Parameters


Name Type Length Value range
Input: Input image channel * Raster port 1 - 1 1 -
Output: Output filtered image channel * Raster port 1 - 1 1 -
Mask: Area mask Bitmap port 0 - 4
Gain Factor Float 0 - 1 0.00001 -
Default: 1.0
Port Settings: Resample mode Raster port 1 - 1024 Nearest | Bilinear | Cubic
Default: Nearest

* Required parameter
Back to top

Parameter descriptions

Input: Input image channel

Specifies the channel containing the unfiltered image to be processed.

Output: Output filtered image channel

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: Area mask

Optionally specifies the bitmap that defines the area to be processed within the input raster. If this parameter is not specified, the entire layer is used by default.

To define a bitmap mask, you must specify the bitmap segment that you want to use. All of the pixels within the specified segment, having a pixel value of 1, define the area to be processed.

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.

Gain 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.

Port Settings: Resample mode

Specifies the type of image resampling desired.

Supported methods include:
Back to top

Details

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 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

Algorithm

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|
         +---------+
where:

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.