Thursday, March 24, 2011
Monday, March 7, 2011
How to convert rgb image to gray image
How to convert RGB image to GRAY level image?
Already we know how to read and show the image. So, first we have to read the input image.To convert rgb to gray the syntax is”rgb2gray”.
a=imread('1.jpg');
figure,imshow(a);
gray=rgb2gray(a)
figure,imshow(gray)
Original image:
Gray image:
Gray image ranges from 0 - 255.
Subscribe to:
Comments (Atom)


