function Out = gray_scale(img)
% converts a jpeg image into gray scale image
temp = (0.35 * double(img(:,:,1)) + 0.5 * double(img(:,:,1)) + 0.15 * double(img(:,:,1)));
size(temp)
temp(60:70, 60:70)
temp = uint8(floor(temp)); 
Out(:,:,1) = temp; Out(:,:,2) = temp; Out(:,:,3) = temp;