Home

Quick Links

Software Manual
GitHub
API Reference

Documentation Versions

Latest Release
Dev
8.3.0
8.2.0
8.1.0
8.0.0
7.2.0
7.1.0
7.0.0
6.0.0
3.9.0
3.5.0
USGS

ISIS Application Documentation


gradient

Printer Friendly View | TOC | Home

Apply Sobel or Roberts gradient to a cube

Overview Parameters Example 1 Example 2

Description

This program will apply a Sobel or Roberts gradient filter to a cube. These gradient filters will highlight edges of an image. Gradient filters typically are used to highlight the differences in the brightness of adjacent pixels in a cube, and also the edges of the transitions in the image data. The output will contain the calculated magnitude of the spatial graident of the input cube. The calculation method can be set to either exact or approximate and can be specified with the 'METHOD' parameter. NOTE: When a calculation must be done where one or more values are special pixels, the output will be NULL. If this causes unexpected results, you can run stretch to change ithe input special pixel(s) to a Digital Number (DN) that is appropriate for calculation. For example, if the image contains High Instrument Saturation (HIS) values, you may choose to stretch these to 255 prior to running the gradient filter.

Categories


History

Tracie Sucharski2002-12-18 Original version
Kim Sides2003-05-13 Added application test
Stuart Sides2003-05-16 Modified schema location from astogeology... to isis.astrogeology..."
Stuart Sides2003-07-29 Modified filename parameters to be cube parameters where necessary
Drew Davidson2005-08-16 Added examples
Brendan George2005-11-07 Modified to handle Special Pixels
Ian Humphrey2015-05-18 Added METHOD parameter to allow for either exact or approximate calculation of the gradient magnitude. Updated and added tests. Updated documentation. Fixes #1741.

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 02/21/2025 19:28:10
X

Files: FROM


Description

Use this parameter to select the filename. All bands within the file will have the gradient applied.

Type cube
File Mode input
Filter *.cub
Close Window
X

Files: TO


Description

This file will contain the estimated or exact absolute magnitude of the gradient.

Type cube
File Mode output
Pixel Type real
Close Window
X

Gradient Settings: GRADTYPE


Description

This chooses the gradient type. The possibilities are Sobel, which uses a 3 x 3 boxcar to calculate the gradient magnitude, or Roberts, which uses a 2 x 2 boxcar to calculate the gradient magnitudes.

Type string
Default SOBEL
Option List:
Option Brief Description
SOBELSobel gradient (3x3) The Sobel gradient uses a 3 x 3 boxcar that makes the gradient calculation slow but less susceptible to noise. It will also create higher output for edges than the Roberts gradient.
ROBERTSRoberts gradient (2x2) The Roberts gradient uses a 2 x 2 boxcar that makes the gradient caluclation fast but sensitive to noise. It also works best on sharp, obvious edges.
Close Window
X

Gradient Settings: METHOD


Description

This specifies how the gradient magnitudes are calculated. The possibilities are exact, which uses the square root of the sum of squares, or approximate, which uses the sum of absolutes.

Type string
Default APPROXIMATE
Option List:
Option Brief Description
APPROXIMATEApproximate the gradient magnitudes An approximate calculation can be achieved using the sum of absolute values of the gradient components. This method is a bit faster than the exact calculation method. The approximate gradient magnitude is calculated as follows:
              G = |Gx| + |Gy|
              
EXACTCalculate the exact values of the gradient magnitudes An exact calculation can be achieved using the square root of the sum of the squares of the gradient components. This method is slower than the approximate calculation method. The exact gradient magnitude is calculated as follows:
              G = sqrt(Gx2 + Gy2)
              
Close Window