NV5 GEOSPATIAL SOFTWARE
>  Docs Center  >  Libraries  >  Coyote  >  GMASCL

GMASCL

GMASCL

## Purpose

This is a utility routine to perform basic gray-level pixel
transformations of images. I think of it as BYTSCL on steroids.
It is similar to IMADJUST in _Digital Image Processing with MATLAB_
by Gonzales, Wood, and Eddins. It performs a log scaling of the
image array.

## Author

FANNING SOFTWARE CONSULTING
David Fanning, Ph.D.
1645 Sheely Drive
Fort Collins, CO 80526 USA
Phone: 970-221-0438
E-mail: david@idlcoyote.com
Coyote's Guide to IDL Programming: http://www.idlcoyote.com

Utilities

## Calling Sequence

scaledImage = GMASCL(image)

## Arguments

image: The image to be scaled. Written for 2D images, but arrays
of any size are treated alike.

## Keywords

GAMMA: The exponent in a power-law transformation (image^gamma). A gamma
value of 1 results in a linear distribution of values between
OMIN and OMAX. Gamma values less than 1 map darker image values
into a wider range of output values, and Gamma values
greater than 1 maps lighter image values into a wider
range of output values. The gamma value is constrained to
be greater than 1.0e-6.
MAX: Any value in the input image greater than this value is
set to this value before scaling.
MIN: Any value in the input image less than this value is
set to this value before scaling.
NEGATIVE: If set, the "negative" of the result is returned.
OMAX: The output image is scaled between OMIN and OMAX. The
default value is 255.
OMIN: The output image is scaled between OMIN and OMAX. The
default value is 0.

## Return Value

scaledImage: The output, scaled into the range OMIN to OMAX. A byte array.

None.

## Examples

LoadCT, 0 ; Gray-scale colors.
image = cgDemoData(11) ; Load image.
TV, GmaScl(image, Min=30, Max=100) ; Similar to BytScl.
TV, GmaScl(image, /Negative) ; Produce negative image.
power = Shift(ALog(Abs(FFT(image,-1))), 124, 124) ; Create power spectrum.
TV, GmaScl(power, Gamma=2.5) ; View power specturm with gamma correction.
TV, GmaScl(power, Gamma=2.5, /Negative) ; Reverse power spectrum.

## Restrictions

Requires SCALE_VECTOR from the Coyote Library:
http://www.idlcoyote.com/programs/scale_vector.pro

## Modification History

Written by: David W. Fanning, 17 February 2006.
Fixed a problem with output scaling. 1 July 2009. DWF (with input from Bo Milvang-Jensen).
Now setting NAN keyword on all MIN and MAX functions. 2 Dec 2011. DWF.

© 2024 NV5 Geospatial Solutions, Inc. |  Legal
Contact Us