This application computes edge features on every pixel of the input image selected channel


This application computes edge features on a selected channel of the input.It uses different filters such as gradient, Sobel and Touzi

This application has several output images and supports “multi-writing”. Instead of computing and writing each image independently, the streamed image blocks are written in a synchronous way for each output. The output images will be computed strip by strip, using the available RAM to compute the strip size, and a user defined streaming mode can be specified using the streaming extended filenames (type, mode and value). Note that multi-writing can be disabled using the multi-write extended filename option: &multiwrite=false, in this case the output images will be written one by one. Note that multi-writing is not supported for MPI writers.


Input Image -in image Mandatory
The input image on which the features are computed.

Feature Output Image -out image [dtype] Mandatory
Output image containing the edge features.

Selected Channel -channel int Default value: 1
The selected channel index

Edge feature -filter [gradient|sobel|touzi] Default value: gradient
Choice of edge feature

  • Gradient
    This filter computes the gradient magnitude of the image at each pixel.
  • Sobel
    This filter uses the Sobel operator to calculate the image gradient and then finds the magnitude of this gradient vector.
  • Touzi
    This filter is more suited to radar images. It has a spatial parameter to avoid speckle noise perturbations. The larger the radius is, the less sensitive the filter is to the speckle noise, but micro edge will be missed.

Touzi options

X radius of the neighborhood -filter.touzi.xradius int Default value: 1

Y radius of the neighborhood -filter.touzi.yradius int Default value: 1

Available RAM (MB) -ram int Default value: 256
Available memory for processing (in MB).


From the command-line:

otbcli_EdgeExtraction -in qb_RoadExtract.tif -channel 1 -out Edges.tif

From Python:

import otbApplication

app = otbApplication.Registry.CreateApplication("EdgeExtraction")

app.SetParameterString("in", "qb_RoadExtract.tif")
app.SetParameterInt("channel", 1)
app.SetParameterString("out", "Edges.tif")


See also

otb class