USGS

Isis 3 Application Documentation

# deriv

Apply horizontal or vertical derivative

Description
Categories
Groups
Examples
History

## Description

This program will apply a horizontal or vertical derivative to a cube. This will highlight edges in the image created by groups of contrasting DN values. The horizontal derivative utilizes a two sample by one line boxcar convolution for its solution, and will highlight horizontal linear changes. The vertical derivative utilizes a one sample by two line boxcar convolution for the output, and will highlight vertical linear changes. Please refer to the following 2 by 2 pixel example image:

In this image, the horizontal derivative for A would be:

            A_NewDN = A - B

The vertical derivative for A would be:

            A_NewDN = A - C

NOTE: If this program needs to do calculations where special pixels are involved, it will simply output NULL. If this causes undesireable results, you should run the image through the stretch program to change all special pixels to valid data. For example, if you have a number of HRS pixels, you might want to stretch those to 255 prior to running the deriv filter.

## Categories

- Filters

## Parameter Groups

### Files

Name | Description
--- | ---
FROM | Input cube
TO | Output cube

### Derivative Direction

Name | Description
--- | ---
DIRECTION | Direction of derivative

### Files: FROM

Type | cube
File Mode | input
Filter | *.cub

#### Description

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

### Files: TO

Type | cube
File Mode | output
Pixel Type | real

#### Description

This is the output file.

### Derivative Direction: DIRECTION

Type | string
Default | HORZ
Option List: |
Option | Brief | Description | Exclusions | Inclusions
--- | --- | --- | --- | ---
HORZ | Horizontal derivative (2x1) | The horizontal derivative uses a 2x1 kernel. |  |
VERT | Vertical derivative (1x2) | The vertical derivative uses a 1 x 2 kernel. |  |

#### Description

This chooses the derivative direction. The possibilities are: HORZ which uses a 2x1 kernel and VERT which uses a 1x2 kernel.

## Examples

### Example 1

Horizontal

#### Description

Use horizontal derivative option.

#### Command Line

`deriv f=peaks.cub t=deriv.horz d=h`
In this example the derivative direction is horizontal.

#### GUI Screenshot

Derivative Gui | Example Gui Screenshot of GUI with parameters filled in to perform a horizontal derivative of the input image.

#### Input Image

Input image | Input image for deriv Parameter Name: FROM This is the input image for the horizontal direction option of deriv.

#### Output Image

Output image showing results of the deriv application with direction: horizontal. | Output image for deriv Parameter Name: TO This is the output image for the horizontal example of deriv. The horizontal features fade and vertical features are enhanced.

### Example 2

Vertical

#### Description

Use vertical derivative option.

#### Command Line

`deriv f=peaks.cub t=deriv.vert d=v`
In this example the derivative direction is vertical.

#### GUI Screenshot

Derivative Gui | Example Gui Screenshot of GUI with parameters filled in to perform a vertical derivative of the input image.

#### Input Image

Input image | Input image for deriv Parameter Name: FROM This is the input image for the vertical direction option of deriv.

#### Output Image

Output image showing results of the deriv application with direction: vertical. | Output image for deriv Parameter Name: TO This is the output image for the vertical example of deriv. The vertical features fade and horizontal features are enhanced.

## History

All history entries are shown, including those marked hidden

Tracie Sucharski | 2002-12-24 | Original version
Tracie Sucharski | 2003-01-28 | Fixed application name in xml file, misnamed as gradient.
K Teal Thompson | 2003-04-10 | Added examples.
Kim Sides | 2003-05-13 | Added application test
Stuart Sides | 2003-05-16 | Modified schema location from astogeology... to isis.astrogeology..."
Stuart Sides | 2003-07-29 | Modified filename parameters to be cube parameters where necessary
Brendan George | 2005-11-07 | Modified to handle special pixels
Jac Shinaman | 2007-02-08 | Updated xml documentation with examples

footer will appear here