MATLAB: High pass filter implement on a image

ideal high pass filter on a image

hello. i want to apply a high pass filter on a image. i m not understanding how apply a ideal high pass filter on image.please any one guide me.

Best Answer

There may be no ideal filter. Here's one possibility:
kernel = [-1 -1 -1;-1 8 -1;-1 -1 -1];
filteredImage = imfilter(grayImage, kernel, 'same');
You could also do filtering in the Fourier domain if you want.
Related Question