<< ntsc2rgb Image Types and Color Space Conversions rgb2hsv >>

IPCV - Image Processing and Computer Vision Toolbox for Scilab >> Image Types and Color Space Conversions > rgb2gray

rgb2gray

Convert RGB images to gray images

Syntax

G = rgb2gray(RGB)

Parameters

RGB :

A RGB image (hypermat), the dimension of RGB should be M x N x 3 .

G :

Output image, a gray image which dimension is M x N and has the same data type as RGB .

Description

rgb2gry convert RGB images to gray scale images using G = 0.299*R + 0.587*G + 0.114*B.

Examples

RGB = imread(fullpath(getIPCVpath() + "/images/baboon.png"));
G = rgb2gray(RGB);
imshow(G);

See also

Authors


Report an issue
<< ntsc2rgb Image Types and Color Space Conversions rgb2hsv >>