Preprocessing using median filter and imfilter command

2 visualizaciones (últimos 30 días)
hi,
I have following image http://www.flickr.com/photos/95383933@N08/8876902700/ I want to do some preprocessing I did like this
if true
f=imread('brp.jpg');f=f(:,:,1);
med=medfilt2(f,'symmetric');
ed=[-1 2 -1; 0 0 0;1 -2 1];
f=im2double(f);
ed=f-imfilter(f, ed,'replicate');
Pre=ed+f;
figure, imshow(Pre)
% code
end
after doing this I can get following types of Images

Respuesta aceptada

Image Analyst
Image Analyst el 29 de Mayo de 2013
I don't see the difference between the original image and the desired output image. What is the difference? Also, I don't understand why you're taking the vertical Sobel edge filter and then subtracting it from the original? What do you expect that to produce? Are you trying to suppress edges for some reason?
  4 comentarios
Muhammad Ali Qadar
Muhammad Ali Qadar el 29 de Mayo de 2013
but there is nothing that seems to enhance the image, can you show me your results, I am getting Same image as original one, in first case it is the there is some addtional artifacts in image but in second case same as original image, can you elaborate more
thank you
Muhammad Ali Qadar
Muhammad Ali Qadar el 5 de Jun. de 2013
if true
med=medfilt2(f,'symmetric');
ed=[-1 2 -1; 0 0 0;1 -2 1];
Pre =f-imfilter(med, ed);
Pre=Pre+f;
% code
end
And I got enhanced Image its Bright but as much as was Previous Image

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by