function harris_corner_test()

I1 = rgb2gray(imread('house1.jpg'));
corners1 = harris_corners(I1, 7,1.5);
I2 = rgb2gray(imread('house1-rotated.jpg'));
corners2 = harris_corners(I2, 7,1.5);

subplot(2,3,[1:2]); imshow(I1); hold on;
plot(corners1(:,1), corners1(:,2), 'ro');
subplot(2,3,3); imshow(I2); hold on;
plot(corners2(:,1), corners2(:,2), 'ro');
set(gcf, 'color', 'w');

% a) The image on the right is a rotated (out of the plane) copy of the
% image on the left. With very few exceptions, the Harris Corner Detector
% finds the same corners in both images.

I3 = rgb2gray(imread('house1-2down.jpg'));
corners3 = harris_corners(I3, 7,1.5);
I4 = rgb2gray(imread('house1-4down.jpg'));
corners4 = harris_corners(I4, 7,1.5);

subplot(2,3,4); imshow(I1); title('Full size'); hold on;
plot(corners1(:,1), corners1(:,2), 'ro');
subplot(2,3,5); imshow(I3); title('1/2 size');hold on;
plot(corners3(:,1), corners3(:,2), 'ro');
subplot(2,3,6); imshow(I4); title('1/4 size'); hold on;
plot(corners4(:,1), corners4(:,2), 'ro');
set(gcf, 'color', 'w');

% b) The Harris Corner Detector finds diffent corners in each of the
% images, even though they are the same image scaled differently.

end