I am trying to sharpen an image by designing a Gaussian High-Pass Filter. I would like to do this using the fact that the high-pass filter is equivalent to the identity matrix minus the low-pass filter, so I did the following:
image= imread('Question3_Data-Cats.jpg'); % read image
H = 1 - fspecial('gaussian' ,[5 5],2); % create unsharp mask
sharpened = imfilter(image,H); % create a sharpened version of the image using that mask
imshow([image sharpened]); %showing input & output images
I did not get a sharpened image. Instead, I got a white image with some colors on a small region of the image. Can someone help? Thank you.