Sunday, April 9, 2017

rgb2gray in MATLAB: code and output

Code:


RGB = imread('peppers.png');
subplot(2,1,1);
imshow(RGB)
title('original image');
I = rgb2gray(RGB);
subplot(2,1,2);
imshow(I)
title('grayscale image');


Output:


No comments:

Post a Comment