xramp

From DavinciWiki
Jump to: navigation, search

Description

Calculates a 0 - 1 float ramp between two overlapping pictures in only the x direction

Arguments and Return Values

Arguments: Two numeric arrays of identical dimension and ignore value

Return Value: A numeric array the same dimension as the inputs

Usage

Syntax: ramp(image1, image2 [, ignore = VAL])

'image1' - may be any 2-d array - float, int, short, etc.

'image2' - may be any 2-d array - float, int, short, etc.

'ignore' - the non-data pixel values. Default is -32768.

ramp() creates a map of the overlapping section of both images. Pixels that have image data in one picture but are ignore values in the other are left out of the ramp calculation. The leftline and rightline of each image is calculated and then the differences between the two positions are used to create the proper ramp. This only works in the x direction. If a full ramp is needed, thm.ramp provides this functionality, but is a little slower.

NOTES:

  • Multiply ramp*$1 and (1-ramp)*$2 to achieve the proper blending of the images.
  • The ramp is only found for OVERLAPPING regions.
  • Non-overlapping regions from pic1 and pic2 need to be added to make a full blend. The source code of blendx demonstrates how this is done.

Examples

dv> pic1
400x300x3 array of byte, bip format [360,000 bytes]

dv> pic2
400x300x3 array of byte, bip format [360,000 bytes]

dv> ramp = ramp(pic1,pic2,ignore = 0)
400x300x1 array of float, bsq format [480,000 bytes]

Images

These examples are the same as for thm.ramp, but since they only demonstrate an x direction ramp, they are applicable for this situation as well. Images in order are: Image 1, Image 2 and the ramp

thmramp1.png thmramp2.png thmramp3.png

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

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

All other topics

  • See navigation on the left

Related Functions

Recent Library Changes

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

Personal tools