do rgb

From DavinciWiki
Jump to: navigation, search

Description

A quick shortcut to make RGB images with any three bands of a single data array

Arguments and Return Values

Arguments: A numeric array 3 or more bands deep, and three band numbers to use as red, green and blue

Return Value: A three band bip byte RGB image.

Usage

Syntax: do_rgb(data, band1, band2, band3 [, ignore = VAL] [,var = VAL])

'data' - a multiband numeric array of greater than three bands

'band1 - band3' - the red, green and blue bands in the dcs calculation

'ignore' - an optional null value of the data, default = -32768

'var' - variance value used in thm.sstretch algorithm, default = 40.

Each band will be sstretched individually and pasted together to form a byte image.

Requires the thm module.

Examples

dv> a
376x376x3 array of float, bsq format [1,696,512 bytes]

dv> t = do_rgb(a)
376x376x3 array of byte, bip format [424,128 bytes]

dv> t1 = do_rgb(a,3,2,1)
376x376x3 array of byte, bip format [424,128 bytes]

dv> t2 = do_rgb(a,3,2,1,var=70)
376x376x3 array of byte, bip format [424,128 bytes]

Images

do rgb1.png t = do_rgb(a)

do rgb2.png t1 = do_rgb(a,3,2,1)

do rgb3.png t2 = do_rgb(a,3,2,1,var=70)

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

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

All other topics

  • See navigation on the left

Major Sub-Functions

Related Functions

Recent Library Changes

Created On: 02-15-2006
Modified On: 01-17-2008

Personal tools