<< rgb2gray Image Types and Color Space Conversions rgb2ind >>

IPCV >> Image Types and Color Space Conversions > rgb2hsv

rgb2hsv

Convert a RGB image to the equivalent HSV image

Syntax

HSV = rgb2hsv(RGB)

Parameters

RGB :

A RGB image (matrix), the dimension of RGB should be M x N x 3 .

HSV :

Output image, which has the same size and type as RGB.

Description

rgb2hsv convert a RGB image to the equivalent HSV image

Supported classes: INT8, UINT8, INT16, UINT16, INT32, DOUBLE.

Examples

RGB = imread(fullpath(getIPCVpath() + "/images/baboon.png"));
HSV = rgb2hsv(RGB);
RGB = hsv2rgb(HSV);
imshow(RGB);

See also

Authors


Report an issue
<< rgb2gray Image Types and Color Space Conversions rgb2ind >>