% Prepare the image for finding well-focused areas in a photo
% using 2D FFT.
%
% Samuli Siltanen Nov 2015

% Read in the image 
im_orig = imread('CladoniaFimbriana.jpg','jpg');

% Pick out one of the color channels (Green)
im = im_orig(:,:,2);

% Crop the image so that it has power-of-two size
im = im(1:1024,400+[1:1024]);

% Convert the image to floating-point numbers
im = double(im);

% Save image to file
save cladonia im


figure(1)
clf
%imagesc([im_orig(:,:,1),im_orig(:,:,2),im_orig(:,:,3)])
imagesc(im)
axis equal
axis off
colormap gray

figure(2)
clf
imshow(im_orig)
axis equal
axis off