RGB2HSV_CVIP

rgb2hsv_cvip() - Converts Red-Green-Blue Color value to Hue-Saturation-Value Color value.

Contents

SYNTAX

OutputImage = rgb2hsv_cvip(InputImage, type)

Input parameters include:

             (0 = Forward non normalized output)
             (1 = gives normalized output)

Output parameters include:

DESCRIPTION

This function converts the input RGB image to a Hue-Saturation-value color space image. The HSV color space is more easily understood by Human beings than the RGB color space. Hue is the color present in the image, Saturation is the amount of white present in the color and Value is the Brughtness of the color.

To view the 8-bit image of type double, divide by 255. To view the 16-bit image of type double, divide by 65535.

REFERENCE

1. Scott E Umbaugh. DIGITAL IMAGE PROCESSING AND ANALYSIS: Applications with MATLAB and CVIPtools, 3rd Edition.

EXAMPLE

% Read image

 X = imread('Car.bmp');

 % Call function

 S1 = rgb2hsv_cvip(X,0);

 S2 = rgb2hsv_cvip(X,1);

% Display input image

 figure;imshow(X);title('Input image');

% Display output images

 figure;imshow(S1./255,[]);title('Output image1');

 figure;imshow(S2,[]);title('Output image2');

CREDITS

Author: Deependra Mishra, March 2017
Copyright © 2017-2018 Scott E Umbaugh
For updates visit CVIP Toolbox Website