LUM_AVERAGE_CVIP

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

Contents

SYNTAX

OutputImage = lum_average_cvip(InputImage)

Input parameter includes:

Output parameter Includes:

DESCRIPTION

This function converts a color image to a gray scale image. It performs an RGB to luminance transform according to the formula

       P = (band1 + band2 + band3)/3

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

% Display Input Image

  figure;imshow(X);title('Input Image - Color Image');

% Display Output Image

  figure;imshow(S1,[]);title('Output Image - Gray-scale Image');

CREDITS

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