RGB2SCT_CVIP

rgb2sct_cvip() - Converts Red-Green-Blue Color value to SCT i.e. Spherical Coordinates Color value.

Contents

SYNTAX

OutputImage = rgb2sct_cvip(InputImage, type)

Input parameters include:

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

Output parameter includes:

DESCRIPTION

This funcion converts the input image from the RGB color space to the Spherical Coordinate Color space. The Spherical coordinate color transform maps the RGB bands into one-dimensional brightness space and a two-dimensional color space. This transform is mostly used in the color segmentation algorithms.

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. Jain, Anil K., Fundamentals of Digital Image Processing,Prentice-Hall, ISBN 0-13-336165-9, 1989.

EXAMPLE

% Read image

 X = imread('Car.bmp');

% Call function

 S1 = rgb2sct_cvip(X,0); % forward transform

 S2 = rgb2sct_cvip(X,1); % forward transform, normalized

% Display input image

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

% Display output images

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

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

CREDITS

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