IMAGE commands
PROGRAM NAME
igradient - Gradient Operators (Roberts, Sobel, Prewitt, Isotropic)
DESCRIPTION
igradient
takes an image and performs the differentiation (high pass spatial filtering or
edge enhancement) operation by using standard gradient operators. The standard
gradient operators supported by the
igradient
routine are: Robert's, Sobel, Prewitt and Isotropic. The Robert's operators
use a 2x2 kernel, whereas the other three use a 3x3 kernel. Each operator uses
two templates to enhance edges in the horizontal and vertical directions only.
For edge enhancements in other directions other operators should be used.
There are two approximations to the true gradient. The user can select between
calculating the magnitude of the gradient by using squares and square roots
(Euclidean distance evaluation), or by using absolute differences. The latter
is computationally faster.
Mask data is ignored.
REQUIRED ARGUMENTS
- -i
-
type: infile
desc: input image filename
- -o
-
type: outfile
desc: output image filename
Mutually Exclusive Group; you must specify ONE of:
- -roberts
-
type: flag
desc: Perform Roberts gradient operation
OR
- -sobel
-
type: flag
desc: Perform Sobel gradient operation
OR
- -prewitt
-
type: flag
desc: Perform Prewitt gradient operation
OR
- -isotropic
-
type: flag
desc: Perform Isotropic gradient operation
OPTIONAL ARGUMENTS
- -abs
-
type: boolean
desc: Calculate gradient using absolute value or square root
default: false
EXAMPLES
% igradient -i source_image.viff -o dest_image.viff
performs edge enhancement using the default values, i.e., uses the Sobel
templates and uses absolute differences to approximate the gradient.
% igradient -i source_image.viff -o dest_image.viff -isotropic -abs 1
performs edge enhancement using the Isotropic templates and determines the
gradient by evaluating Euclidean distances.
SEE ALSO
klinearop(1)
RESTRICTIONS
COMPLEX data processing is not supported.
REFERENCES
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.