Home > freetb4matlab > image > rgb2gray.m

rgb2gray

PURPOSE ^

% Converts an RGB image to a gray scale image, or a color map

SYNOPSIS ^

function gray = rgb2gray (rgb)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} @var{gray}= rgb2gray (@var{rgb})
% Converts an RGB image to a gray scale image, or a color map
% to a gray map.
%
% If the input is an RGB image, the conversion to a gray image
% is computed as the mean value of the color channels.
%
% If the input is a color map it is converted into the YIQ space
% of ntsc. The luminance value (Y) is taken to create a gray color map.
% R = G = B = Y
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003