SIVP Toolbox
Last update : April, 2006

rgb2gray - Convert RGB images to gray images

Calling Sequence

G = rgb2gray(RGB)

Parameters

Description

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

Examples


    RGB = imread('lena.png');
    G = rgb2gray(RGB);
    imshow(G);

Bugs and Shortcomings

The algorithm should be optimized to improve performance.

Authors

Shiqi Yu <shiqi.yu[at]gmail.com>

Availability

The latest version of SIVP can be found at

http://sivp.sourceforge.net

See Also

im2bw,  mat2gray,