Go to the USGS Home Page

USGS MIPS Derive Documentation






This program calculates the first derivative, or first difference, between adjacent pixels  in an image . The difference can be in any one of three user specified directions: horizontal, vertical, or diagonal. The following equations are used to calculate the difference:

Horizontal = A - B + Addback
Vertical   = A - C + Addback
Diagonal   = A - D + Addback
where,

A, B, C and D are pixels adjacent to each other in the image

---------
| A | B |
----+----
| C | D |
---------

and,

Addback is either a user specified constant or a default value used to ensure that positive unsigned 8-bit numbers are generated if the input is unsigned 8-bit, or to center the output DN  range somewhere else than zero if the input file is 16 or 32-bit.
  

Files

This program requires as input an unsigned 16-bit , or one labels 
Mosaic labels
Projection labels
Sonar labels
Navigation  file
History  file
     

Parameters

HORZ, VERT or DIAG

These parameters are used to select the desired direction of the first derivative and can be either horizontal, vertical or diagonal. The default direction is HORZ.

ADBK

This parameter is used to keep the output DNs in the desired range depending on the bit type of the input image. For unsigned 8-bit images the default is 127 so that only positive 8-bit integer values are generated(0 - 255), and for signed 16-bit and 32-bit floating point the default value is 0.

Uses

This program is useful for enhancing edges in an image; however, since it applies directional filters it will not enhance edges which are in the same direction as the filter. For example, the horizontal option will enhance vertical/all non-horizontal edges, but will not enhance horizontal edges(it will actually remove/suppress horizontal features/linear features). Also, if applied to either DEM or Bathy data it generates a shaded relief image having a 45 degree sun elevation angle.

Examples

From left to right, original Landsat MSS Band 6, horizontal derivative and vertical derivative.

[Example Image] [Example Image] [Example Image]


See Also

Filter 
Grad 
Maplin 
U.S. Department of the Interior | U.S. Geological Survey | Jobs
Home | Search | Disclaimers & Privacy Web Rings
Send comments to webman@TerraWeb.wr.usgs.gov
URL:
Last Modified: Thu Oct 31 15:08:24 MST 2002
FirstGov: Your First Click to the U.S. Gov ernment