Sunday, 29 November 2015

MATLAB CODE FOR CONVERT RGB TO GRAY IMAGE

Query=> How to convert colour  image into gray image using MATLAB?...

Ans=> To convert colour image into gray image we have to use the syntax “rgb2gray”...An example is given below for reference...

a=imread('peppers.png');          %reading an image
b=rgb2gray(a);                          %coverting to gray image
figure,                                        %opening figure window
subplot(1,2,1),subimage(a);title(‘colour’);        %display colour image
subplot(1,2,2),subimage(b);title(‘gray’);           %display gray image
FOR MORE DETAILS
                                 click here

1 comment:

  1. hi, could you me the matlab code to my email atikahbasid@gmail.com
    thank you.

    ReplyDelete