2014-09-03 3 views
0

소금 후추와 포아송 노이즈를 추가하고 제거해야합니다. 내 코드 : 나는 소금 & 고추를 해결하는데 알고 있기 때문에포아송 노이즈 제거, Matlab

clear all; close all; clc; 


    a = double(imread('spine.tif'))/255; 
     a1 = imnoise(a, 'salt & pepper', 0.015); 
    a2 = imnoise(a1, 'poisson'); 

     b = medfilt2(a2); 


     grade= sum(sum(abs(a - b))); 
     disp(grade); 

subplot(221); imshow(a); 
subplot(222); imshow(a1); 
subplot(223); imshow(a2); 
subplot(224); imshow(b); 

나는 medfilt2을 사용하고 있습니다,하지만 난 포아송를 제거하고 내 성적 기능을 향상시키는 방법을 몰라? 다른 필터를 시험해보고 있었지만, 더 많이 시도해도 더 나쁜 성적이 나옵니다. 이 예에서

답변

0

봐 : http://www.mathworks.com/help/images/remove-noise-from-images.html

I = imread('eight.tif'); 
imshow(I) 
J = imnoise(I,'salt & pepper',0.02); 
figure, imshow(J) 
K = filter2(fspecial('average',3),J)/255; 
figure, imshow(K) 
L = medfilt2(J,[3 3]); 
figure, imshow(L) 

는 중간 필터 뒤에 평균 필터를 사용합니다. 평균 필터를 사용하지 않는 것 같습니다.

+0

흠, 답변 해 주셔서 감사합니다.하지만 평균 필터를 추가하면 학년 기능이 악화됩니다. – user3748496