RGB2LAB_CVIP
rgb2lab_cvip() - Converts Red-Green-Blue Color value to L* a* b* Color value.
Contents
SYNTAX
OutputImage = rgb2lab_cvip(InputImage, type)
Input parameters include:
- InputImage - RGB Image
- type - output image preference (0,1)
(0 = Forward non normalized output)
(1 = gives normalized output)
Output parameter includes:
- OutputImage - Resultant output image.
DESCRIPTION
This function converts the input image from the RGB color space to the L*a*b* color space. The L*a*b* color space is perceptually uniform color space.
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 = rgb2lab_cvip(X,0); S2 = rgb2lab_cvip(X,1); % Display input image figure;imshow(X);title('Input image'); % Display output images figure;imshow(remap_cvip(S1),[]);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