I am working different types of filters to remove speckle noise in ultrasound image. I have taken the below paper as my base paper and trying to reproduce the results of this paper:
I designed all the filters and tested with the default matlab images. I was happy with the results. The Mean Square Error (MSE) of filtered image is less than that of Noisy image and the Signal to Noise Ratio (SNR) and Peak Signal to Noise Ratio (PSNR) of the filtered image is greater than that of Noisy image.
But Sadly, When I tried it for ultrasound images the results are opposite. That is the MSE of filtered image is greater than that of Noisy Image and the SNR & PSNR of the filtered image is lesser than that of Noisy Image.
I tried for many other ultrasound images but unable to get it right.
Results for Lena.jpg
*******Quality Measurements***********
*******Noisy Image***********
Mean Square Error = 0.0080186
Signal to Noise Ratio (SNR) = 69.4875
Peak Signal-to-Noise Ratio(PSNR) = 69.0898
*******3 x 3 Median filter***********
Mean Square Error = 0.00257916
Signal to Noise Ratio (SNR) = 74.4137
Peak Signal-to-Noise Ratio(PSNR) = 74.016
*******5 x 5 Median filter***********
Mean Square Error = 0.00188434
Signal to Noise Ratio (SNR) = 75.7769
Peak Signal-to-Noise Ratio(PSNR) = 75.3792
*******7 x 7 Median filter***********
Mean Square Error = 0.00208378
Signal to Noise Ratio (SNR) = 75.34
Peak Signal-to-Noise Ratio(PSNR) = 74.9423
Results for ultrasound.jpg
*******Quality Measurements***********
*******Noisy Image***********
Mean Square Error = 0.00153502
Signal to Noise Ratio (SNR) = 64.8881
Peak Signal-to-Noise Ratio(PSNR) = 76.2697
*******3 x 3 Median filter***********
Mean Square Error = 0.00770785
Signal to Noise Ratio (SNR) = 57.8799
Peak Signal-to-Noise Ratio(PSNR) = 69.2615
*******5 x 5 Median filter***********
Mean Square Error = 0.00810142
Signal to Noise Ratio (SNR) = 57.6637
Peak Signal-to-Noise Ratio(PSNR) = 69.0452
*******7 x 7 Median filter***********
Mean Square Error = 0.00853159
Signal to Noise Ratio (SNR) = 57.439
Peak Signal-to-Noise Ratio(PSNR) = 68.8205
I am unsure why I am getting results like this. I have added code that I have used for quality measures. Please correct me If I have done anything wrong.
function metrics = Metrics1(Orig_Image,Esti_Image)
%---Mean-Square Error(MSE) Calculation
Orig_Image = im2double(Orig_Image);%---Convert image to double class
Esti_Image = im2double(Esti_Image);%---Convert image to double class
[M N] = size(Orig_Image);%---Size of Original Image
err = Orig_Image - Esti_Image;%---Difference between two images
metrics.M_SE = (sum(sum(err .* err)))/(M * N);
%---Signal-to-Noise Ratio(SNR) Calculation
metrics.SNR = 10*log10((1/M*N)*sum(sum(Orig_Image.*Orig_Image))/(metrics.M_SE));
%---Peak Signal-to-Noise Ratio(PSNR) Calculation
if(metrics.M_SE > 0)
metrics.PSNR = 10*log10(255*255/metrics.M_SE);
else
metrics.PSNR = 99;
end
%---Mean and Standard Deviation
%---Beta Calculation
h = fspecial('laplacian');
I1 = imfilter(Orig_Image,h);
I2 = imfilter(Esti_Image,h);
I_1 = mean2(I1);
I_2 = mean2(I2);
metrics.Beta = sum(sum((I1 - I_1).*(I2 - I_2)))./(sqrt(sum(((I1 - I_1).^2).*((I2 - I_2).^2))));
end