lstretch

From DavinciWiki
Jump to: navigation, search

Description

Performs a linear stretch of an input 1 band image of any format. The usage is very simple relative to stretch.

Arguments and Return Values

Arguments: Input image, low input value, high input value, low output value, high output value, ignore value.

Return Value: A single band (grayscale) byte image.

Usage

Syntax: lstretch(input_image [, in_low = VALUE] [, in_high = VALUE] [, out_low = VALUE] [,out_high = VALUE] [, ignore = VALUE])

input_image: single band image (m x n x 1 array)

in_low: low value of the input that corresponds to the low value of the input (default input image minimum value)

in_high: high value of the input that corresponds to the low value of the input (default input image maximum value)

out_low: low value of the input that corresponds to the low value of the output (default is 0)

out_high: low value of the input that corresponds to the high value of the output (default is 255)

ignore: value in the input image to ignore when determining default input values (default is -32768)

Examples

dv> b
272x242x1 array of float, bsq format [263,296 bytes]
dv> c = lstretch(b)
272x242x1 array of byte, bsq format [65,824 bytes]
dv> d = lstretch(b, out_low = 50, out_high = 200)
272x242x1 array of byte, bsq format [65,824 bytes]

Images

Images showing the output from the two examples above (c is left image, d is right image): lstretch1.png

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Recent Library Changes

Created On: 01-01-2008
Modified On: 01-17-2008

Personal tools