image enhancement by modified Gaussian high-pass filter

Dear Gen. I need your kind support in my issue, in my project i have to use a symmetrical modified Gaussian high-pass filter for image enhancement as in below two image,
the image in top is the gray input image and the image down is the filtered image.
the symmetrical modified Gaussian high-pass filter used the formula :
H(x,y)=a*(1-e^(-(distance^2)/(2*d^2)))+b
where : distance=sqrt((x-p)^2+(y-q)^2) , a=12.5 , b=-4 and d=12.
but when i coding the above formula and test it with a gray image there is no any change between the input and output image.
my code as below:
[m, n]=size(grayimage);
f_transform=fft2(croppedImage);
f_shift=fftshift(f_transform);
p=m/2;
q=n/2;
d0=12;
for i=1:m
for j=1:n
distance=sqrt((i-p)^2+(j-q)^2);
x(i,j)=12.5*(1-exp(-(distance^2)/(2*(d0^2))))-4 ;
end
end
filter_apply=f_shift.*x;
image_orignal=ifftshift(filter_apply);
image_filter_apply=abs(ifft2(image_orignal));
figure(5)
imshow(image_filter_apply,[])
please any kind support
Kind Regards

2 comentarios

Exactly what is the question? Is there anything wrong with your code? Tell me first so I don't have to run it. Also, attach the original image, not a screenshot.
haider alnaqeeb
haider alnaqeeb el 1 de Mzo. de 2016
Editada: haider alnaqeeb el 2 de Mzo. de 2016
Dear Image Analyst, Good Day, my question is that symmetrical modified Gaussian high-pass filter must enhance the input image as in above screenshot but when i test my code the filtered image is the same as input image. if there any missing in my coding? the input image is below: you must first resize the below image to 200*64 pixels before filtering.
Kind regards

Iniciar sesión para comentar.

Respuestas (1)

amal abbbes
amal abbbes el 10 de Abr. de 2018
i have the same problem with you if you find a solution please help me

Categorías

Preguntada:

el 1 de Mzo. de 2016

Respondida:

el 10 de Abr. de 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by