X=imread('IMG_8979.jpg');
x=double(x);
r=x(:,:,1);g=x(:,:,2);b=x(:,:,3);
xgray=0.2126*r+0.7152*g+0.0722*b;
xgary=uint8(xgray);
imagesc(xgray);colormap(gray)