You are on page 1of 5

jothibasu New File

i=imread('fabric.png');
imshow(i)

Convert the image into Grayscale

i1=rgb2gray(i);
imshow(i1)

1
To extract RGB Compnent from the original image

R=i(:,:,1);
G=i(:,:,2);
B=i(:,:,3);
imshow(R)

2
imshow(G)

3
imshow(B)

4
5

You might also like