do hsv

From DavinciWiki
Jump to: navigation, search

Description

Overlay a color (or numeric image colorized on the fly) on a grayscale image using a Hue, Saturation, Value combination where the Value term is replaced by the second input grayscale image.

Arguments and Return Values

Arguments: A 3 band byte image and a 1 band byte image

Return Value: A 3 band combination of $1 and $2 as an HSV image

Usage

Syntax: do_hsv(color, bw [, colorize = BOOL] [, ignore = FLOAT])

'color' is either a 3 band byte color image or a single band image with the colorize option set to > 1, where it will be colorized on the fly. This image will have HSV computed

'bw' is the replacement for Value in the color image

'colorize' colorize the one band 'color' on the fly. This uses the same color options as colorize(). Default is 0.

'ignore' ignore value for the colorize option. Default is -32768.

Examples

1st Usage

2nd Usage

dv> day
2964x2964x1 array of byte, bsq format [8,785,296 bytes]

dv> night
2964x2964x1 array of byte, bsq format [8,785,296 bytes]

dv> out2do_hsv(night,day,colorize=2)
255,000,255 = 0.000000
000,000,255 = 42.333336
000,255,255 = 84.666672
000,255,000 = 127.000000
255,255,000 = 169.333344
255,128,000 = 211.666656
255,000,000 = 254.000000
2964x2964x3 array of byte, bip format [26,355,888 bytes]

Usage 2:

dv> color
2964x2964x3 array of byte, bip format [26,355,888 bytes]

dv> day
2964x2964x1 array of byte, bsq format [8,785,296 bytes]

dv> out2=do_hsv(color,day)
2964x2964x3 array of byte, bip format [26,355,888 bytes]


Images

1st Usage: Input images where the color is already present (left) and the right is the replacement "Value"

night hsv.pngday hsv.png

Resulting output:

color hsv.png


2nd Usage: Input images where the left will be colorized on the fly and the right is the replacement "Value"

night color hsv.pngday hsv.png

Resulting output:

color2 hsv.png

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: 09-22-2010
Modified On: 09-22-2010

Personal tools