LUMINANCE_CVIP

luminance_cvip() - Creates a gray-scale image from a color image.

Contents

SYNTAX

OutputImage = luminance_cvip(InputImage)

Input parameters include:

Output parameter includes:

DESCRIPTION

This function Performs an RGB to luminance transform on the input image according to the formula P = 0.299 r + 0.587 g + 0.114 b.

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 = luminance_cvip(X);

% Display input image

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

% Display output images

 figure;imshow(S1,[]);title('Output image');

CREDITS

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