FPRE -- Prewitt Edge Filter (3x3)

Performs PREWITT EDGE DETECTOR filtering for Image data. The Prewitt edge detector filter creates an image where edges (sharp changes in grey-level values) are shown.

See Also: FAV, FED, FME, FGA, FMO, FPR, FLE, FSOBEL, FSHARP

INPUT PORT(S)

Input

Type:Raster
Connection:Mandatory
Minimum Layers:1
Maximum Layers:1

Contains the input raster layer to be filtered.

Mask

Type:Bitmap
Connection:Optional
Minimum Layers:0
Maximum Layers:1

Contains the input area mask layer, consisting of a bitmap that indicates which area in the input raster should be processed. If no bitmap is provided, then the entire layer is filtered.

OUTPUT PORT(S)

Output

Type:Raster
Connection:Optional
Minimum Layers:0
Maximum Layers:1

Contains the output layer which receives the filtered raster data.

For more accurate results, "Output" should be a 32-bit real layer. If an 8-bit layer is used, all output values higher than 255 will be truncated to 255.

INPUT PARAMETER(S)

FPRE is controlled by the following input parameter:

Gain Factor

Name:GainFactor
Type:Real
Valid Values:x >= 0.00001
Default:1.0
Requirement:Optional

Specifies the gain multiplication factor to be applied to the filtered input layer.

NOTE: Values of 0.0 or negative real numbers are not allowed.

DETAILS

Prewitt edge detection produces an image where higher grey-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. It is one of the most popular 3X3 edge detection filters. See ALGORITHM for more details about the filter.

The user has the option of applying a factor (GainFactor) to each filtered input layer before averaging. A GainFactor of 1.0 (default) implies no gain.

A bitmap specifies the area within the input layer which will be processed. Only this area will be filtered and the rest of the image will be unchanged. If no bitmap is connected, the entire database is processed.

ALGORITHM

The Prewitt edge detection filter uses the 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:

    a1 .. a8   are the grey levels of each pixel in the filter window

    X = -1*a1 + 1*a3 - 1*a4 + 1*a6 - 1*a7 + 1*a9

    Y =  1*a1 + 1*a2 + 1*a3 - 1*a7 - 1*a8 - 1*a9

    Prewitt gradient = SQRT (X*X + Y*Y)
All pixels are filtered. In order to filter pixels located near the edges of an image, edge pixels values are replicated to give sufficient data.


About PCI Help Gateway