3
votes

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:

My Base 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

Lena

*******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

Results for ultrasound image

*******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
1
Have you tried it with different images to see if there is an evident correlation between MSE and filter size? The image of Lena may just be a special case where MSE decreases with filter size initially. But you can even see that for the 7x7 median filter MSE starts to increase. Can you make any comments on how the image size affects this relationship? A larger image may profit from a larger median mask than a small image with the same mask.Falimond
To verify your PSNR calculation, can you do a quick comparison with the function shown here?Roger Rowland

1 Answers

2
votes

The reason your filtered ultrasound images have a higher MSE (and lower SNR) is just because your ultrasound.jpg is not noise-free, whereas Lena.jpg is quite clean by comparison.

Your filtering does in fact remove salt-and-pepper/speckle noise, but that has the effect of making the filtered image more dissimilar from the original image, which likely has frequency characteristics similar to this type of noise. Sure, adding noise creates error, but when you filter the image with added noise, it actually becomes more dissimilar to the original image, at least in the sense of MSE.

You don't have a hypothetical perfect ultrasound image.