sharpening picture using unsharp - please check my code

8 visualizaciones (últimos 30 días)
Hasbullah Hady
Hasbullah Hady el 1 de Dic. de 2011
I have a grayscale picture, uint8 jpeg. The picture is about a blurred tomato. I tried to do some unsharp, I tried to blur it, take it edges, and add to the original one. But it seems different. Im using matlab 7.9.0(r2009b)
_____________________________________________________
blur_filter = [1/9 1/9 1/9; 1/9 1/9 1/9; 1/9 1/9 1/9];
tomato = imread('tomato.jpg');
blur_filter = blur_filter / sum(sum(blur_filter));
blur_tomato = imfilter(tomato, blur_filter);
edge_filter = [-1,-1,-1;-1,8,-1;-1,-1,-1];
edge_tomato=imfilter(blur_tomato, edge_filter);
sharp_tomato = tomato + edge_tomato;
subplot(2,2,1), image(tomato), title('Original tomato');
subplot(2,2,2), image(blur_tomato), title('Blur tomato');
subplot(2,2,3), image(edge_tomato), title('The edge taken from the
blur');
subplot(2,2,4), image(sharp_tomato), title('Sharp tomato');
__________________________________________________________________
sorry i dont know how to attach the picture here.
The problem is, I get pictures like a vision of predator from the predator movie, if you get what i mean.
  2 comentarios
Chandra Kurniawan
Chandra Kurniawan el 1 de Dic. de 2011
Would you upload your image??
I just wonder how can 'tomato' image becomes 'predator' image after you perform edge_detection on that.
Walter Roberson
Walter Roberson el 1 de Dic. de 2011
http://www.mathworks.com/matlabcentral/answers/7924-where-can-i-upload-images-and-files-for-use-on-matlab-answers

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Particle & Nuclear Physics en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by