| Environments | PYTHON :: EASI :: MODELER |
| Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Example :: Algorithm |
| Back to top |
| Back to top |
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| FILI * | String | Input file name | 1 - 192 | |
| FILO | String | 0 | 0 - 192 | |
| DBIC * | Integer | Input raster channel | 1 - | |
| DBOC_MAG | Integer | Gradient magnitude output channel | 0 - | 1 - |
| DBOC_DIR | Integer | Gradient direction output channel | 0 - | 1 - |
| NEED_DIR | String | Create gradient direction channels | 0 - 3 | YES | NO Default: YES |
| RADIUS | Integer | Filter radius (pixels) | 0 - 1 | 1 - Default: 5 |
| REPORT | String | Report mode | 0 - 192 | Quick links |
| MONITOR | String | Monitor mode | 0 - 3 | ON, OFF Default: ON |
| Back to top |
FILI
Specifies the name of the image file that contains raster channels to filter.
FILO
Specifies the name of the image file to receive the output channels. If this parameter is not specified, it is assumed to be the same as FILI. If the specified output file exists, it must have the same projection as FILI.
If the specified output file does not exist, a new PCIDSK file will be created. By default, the georeferencing information from the input file will be copied to the new output file.
DBIC
Contains the input unfiltered channel(s).
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.
DBOC_MAG
Specifies the output channel(s) to receive the output magnitude channel(s).
If the output file (FILO) is an existing file, the output magnitude channel (DBOC_MAG) type must be CHN_8U and the number of output channels must be the same as the number of input channels (DBIC). If the output file is created, this parameter is ignored.
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.
DBOC_DIR
Specifies the output channel(s) to receive the output gradient direction channel(s).
If the output file (FILO) is an existing file, the output gradient direction channel (DBOC_DIR) type must be CHN_8U and the number of output channels must be the same as the number of input channels (DBIC). If the output file is created, this parameter is ignored.
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.
NEED_DIR
Specifies whether to create gradient direction channels in the output file.
RADIUS
Specifies the size of the Gaussian filter's radius, in pixels. The filter is applied as the first step of edge detection. The filter size determines the smallest feature to be detected. The default value is 5.
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 |
EDGE applies a Canny Edge Detector filter. This process produces an output image where higher gray-level values indicate the presence of an edge between two objects. An optional gradient direction image can also be created.
For more information about the method used, see the Algorithm section.
| Back to top |
This example demonstrates the use of EDGE.
EASI>FILI = "irvine.pix" ! input file EASI>FILO = "output.pix" ! create new output file EASI>DBIC = 1,-5 ! input channel list EASI>DBOC_MAG = 6,-10 ! gradient magnitude output channels EASI>DBOC_DIR = 11,-16 ! gradient direction output channels EASI>NEED_DIR = EASI>RADIUS = ! filter radius, defaults to 5 EASI>MONITOR = "ON" EASI>RUN EDGE
| Back to top |
In the PCI implementation, the Gaussian filter and gradient operator are decomposed into two 1-dimensional filters: a 1D Gaussian filter and a 1D DOG (difference of Gaussian) filter. One of these two 1D filters is applied to rows; the other is applied to the columns. The choice of which one to apply to the rows/columns provides either the X gradient or Y gradient.
When the gradients are computed, the magnitude at each pixel is compared to those of its neighbors. Along the gradient direction, if the gradients of neighbor pixels (computed via interpolation) are larger then the gradient of the current pixel (thus it is non-maximum), the gradient of the current pixel is suppressed (set to zero).
The output gradient magnitude represents edge strength. The output is scaled based on the dynamic range of the input image.
An optional output of gradient direction image can be created. Each pixel is in the range of [0,255], scaled from [0, 2*PI].
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.