%  script to read in image of lincoln and 
%  select a 512 x 512 sub-image

   X=imread('lincoln.png');
   size(X)  % MATLAB converts file to a 3-D array
   X=rgb2gray(X) % convert to a 2-D black/white array 
   figure
   imshow(X);  % see full image
   Lincoln_image=X(21:532,301:812);  % choose 512x512 subset
   figure
   imshow(Lincoln_image);   %  view selected subset
   return

