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.
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.
Approximate 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|
Calculate 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:
This example shows the use of the roberts filter in order to highlight
Screenshot of the GUI with parameters set to filter using a roberts
The image before the filter
Input image before the filter.
This is the image as it was taken originally.
The image after the filter
Output image after the roberts gradient
The use of the Roberts gradient here creates an output image which
helps to highlight the edges. Since the Roberts filter uses a smaller
boxcar, less of the image is taken into consideration at each processing
step and thus the image can be created faster. The tradeoff is that images
that have had the Roberts gradient applied tend be effected more by noise
in the image.