Personal IDL library for M. Galloy

single page | use frames     summary     class     fields     routine details     file attributes


includes main-level program


top mg_scaleimage

result = mg_scaleimage(im, dividers=1-dimensional array, outputs=1-dimensional array)

Piecewise-linearly scale an image.

Return value

image of the same dimensions as the original and type float


im in required type=2-dimensional array

input image (single band)


dividers in required type=1-dimensional array

divider values in the scale of the input image

outputs in required type=1-dimensional array

output values corresponding to the DIVIDERS values


Try the main-level example program at the end of this file:

IDL> .run mg_scaleimage
This example does the following scaling:
im = mg_scaleimage(elev, dividers=[0, 1, 256], outputs=[0, 144, 256])
Here, the interval 0..1 in the input image is scaled to 0..144, and 1..256 is scaled to 144..245.

File attributes

Modification date: Wed May 14 15:07:15 2014
Lines: 21
Docformat: rst rst
Personal library of Michael Galloy
Contact me if you have enhancement requests or bug fixes.