f = imread('moon.tif');
h = fspecial('laplacian',0);
subplot(2,3,1);
imshow(f,[]),title('original image');
fl = imfilter(f,h,'replicate');
subplot(2,3,2);
imshow(fl,[]),title('Laplacian image') ;
g = f-fl;
subplot(2,3,3);
imshow(g,[]),title('filtered image');

fd = im2double(f);
subplot(2,3,4);
imshow(fd,[]),title('original image (double)');
fld = imfilter(fd,h,'replicate');
subplot(2,3,5);
imshow(fld,[]),title('Laplacian image (double)') ;
gd = fd-fld;
subplot(2,3,6);
imshow(gd,[]),title('filtered image');





