%DIP Class Demo
%Shreekanth Mandayam, Rowan University
%
%High Pass and High Boost Filtering


clear; close all;

r=imread('retina.jpg');

r=mat2gray(double(r));
imshow(r);
title('Image of Human Retina');

pause;

mask_hp=1/9*[-1 -1 -1; -1 8 -1; -1 -1 -1];

r_hp=mat2gray(filter2(mask_hp,r));
figure(2); imshow((r_hp));
title('High pass filtered');

pause;

mask_hb=1/9*[-1 -1 -1; -1 20 -1; -1 -1 -1];

r_hb=mat2gray(filter2(mask_hb,r));
figure(3); imshow((r_hb));
title('High boost filtered');

pause;

figure(4); imshow(histeq(r_hb));
title('Histogram equalized');