rgb2hsv

From DavinciWiki
(Redirected from Rgb2hsv)
Jump to: navigation, search


Description

Convert a 3-plane RGB image into HSV

Arguments and Return Values

Arguments: A 3 band numeric array used as an RGB image

Return Value: A 3 band numeric array used as an HSV image

Usage

Syntax: rgb2hsv(object = VAL, maxval = VAL)

The rgb2hsv() function converts a 3-band RGB image of any type into a 3-band HSV image with values ranging from 0-1 for H and S channels.

If maxval is specified, it is taken to be the maximum intensity value or V. If no value is specified for maxval, its value is determined from the input type, so V may encompass a larger range than 0-1.

HSV values range from 0.0 to 1.0, so the return value has a type of FLOAT, unless maxval is not specified or the input type is not byte, where V may be a larger range than 0-1.

Examples

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

dv> hsv_pic1 = rgb2hsv(rgb_pic1)
400x300x3 array of float, bip format [1,440,000 bytes]

Images

rgb2hsv.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 Core Changes

Modified On: 09-22-2010

Personal tools