Algorithm For Implementing Gaussian High Pass:
- This is Matlab code to implement Gaussian High pass filter previous i posted about Low pass filter.
- Gaussian High Pass filter is used sharpening of an image which is inverse of smoothing.
- First image is read and then it’s shown as a figure just below in screen shots.
- Calculate size of image.
- Shift time domain of image into fourier or frequency domain by this command fft2(input-image).
- Shift the origin of this transform into Center by this command fftshift(f_transform).
- And then apply the equation of High pass filter that is 1 – exp(-(distance)^2/(2*(d0^2))) or 1 – lowPass.
- After taking transform again shift and convert the image back into the time domain this is done my taking inverse fourier by this command ifftshift();
- abs function is used to convert the negative values into the postive values.
Matlab Code :
Input image :
Output Image (Sharpening):