SIVP Toolbox
Last update : August, 2006

hsv2rgb - Convert a HSV image to the equivalent RGB image.

Calling Sequence

RGB = hsv2rgb(HSV)

Parameters

Description

hsv2rgb convert a HSV image to the equivalent RGB image. The relationship between RGB and HSV described as follows:

V = max(R,G,B)
S = (V-min(R,G,B))/V if V<>0, 0 otherwise
H =
(G - B)/6/S, if V=R;
1/2+(B - R)/6/S, if V=G;
2/3+(R - G)/6/S, if V=B.

Supported classe: DOUBLE.

Examples


    RGB = imread('lena.png');
    HSV = rgb2hsv(RGB);
    RGB = hsv2rgb(HSV);
    imshow(RGB);

Authors

Shiqi Yu <shiqi.yu[at]gmail.com>

Availability

The latest version of SIVP can be found at

http://sivp.sourceforge.net

See Also

rgb2gray,  mat2gray,  rgb2hsv,  rgb2ycbcr,  ycbcr2rgb,  rgb2ntsc,  ntsc2rgb,