clear;

f = double(imread('database/winston.TIF'));
g = double(imread('database/bria.TIF'));

% Discretize
%f = discretize(f, 70);
%g = discretize(g, 135);

%f = cropimg(f, 200, 327);
%g = cropimg(g, 200, 327);

colormap(gray);

% Make square box
% f = [ones(10,10)];
% f(N,N) = 255;
% f(5,5) = 150;
% f = fliplr(f);
% g = ones(16,16);
% g(N,N) = 20;

% Normalize
f = normalize(f);
g = normalize(g);
f2 = f;
g2 = g;

[corr2] = corrfft(f2, g2);
corr2



% Convolution
%[corr, rowshft, colshft] = correlation(f,g);
%corr
colshft = 64;
rowshft = 64;

% Plot
plotimg(f,g,rowshft,colshft);

