RGB2XYZ_CVIP

rgb2xyz_cvip() - Converts Red-Green-Blue Color value to XYZ Chromaticity Color value.

Contents

SYNTAX

OutputImage = rgb2xyz_cvip(InputImage, type)

Input parameters include:

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

Output parameter includes:

DESCRIPTION

This function converts the input image from the RGB color space to the XYZ Chromaticity color space. The XYZ color space is based on the Trisitmulus curves. The Chromaticity color space normalizes the RGB values to the sum of all the three colors. Tristimulus values of the reference white

Xo = 95.047/100 ;Yo =100.00/100 ;Zo = 108.883/100;( Using   D65 )
Xo = 96.42/100 ;Yo =100.00/100 ;Zo = 82.51/100;( D50)
Xo = 1 ;Yo =1 ;Zo = 1;

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 = rgb2xyz_cvip(X,0); % forward transform image

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

% Display input image

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

% Display output images

 figure;imshow(S1,[]);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