sharpening picture using unsharp - please check my code
조회 수: 7 (최근 30일)
이전 댓글 표시
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
Chandra Kurniawan
2011년 12월 1일
Would you upload your image??
I just wonder how can 'tomato' image becomes 'predator' image after you perform edge_detection on that.
Walter Roberson
2011년 12월 1일
http://www.mathworks.com/matlabcentral/answers/7924-where-can-i-upload-images-and-files-for-use-on-matlab-answers
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Particle & Nuclear Physics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!