Convert RGB images to gray images
G = rgb2gray(RGB)
RGB
should be
M x N x 3
.M x N
and has the same data type as
RGB
.rgb2gry
convert RGB images to gray scale images
using G = 0.299*R + 0.587*G + 0.114*B
.
RGB = imread(fullpath(getSIVPpath() + "/images/lena.png")); G = rgb2gray(RGB); imshow(G); | ![]() | ![]() |
The algorithm should be optimized to improve performance.
http://sivp.sf.net