Image Processing Signal To Noise Ratio

13 views (last 30 days)
Marco Rossi
Marco Rossi on 19 Apr 2016
Commented: Marco Rossi on 19 Apr 2016
I have a .bmp image from my professor and i have to calculate the signal to noise ratio and enhance it. The problem is i don't know how calculate it and by searching in the net i found different definitions and formulas. I tried with the ratios between mean and standard deviation but i don't know if it is ok. I have anther question: is it correct tha the SNR is bigger after an histogram equalization of the image?
This is the very simple code i used to calculate the SNR
Im = imread('naca23012_dinamico_24deg_fin1_1_b.bmp');
Im = im2double(Im);
mu = mean(Im(:));
sigma = std(Im(:));
snr= mu/sigma;
My image is this one
Thanks for help

Answers (1)

Image Analyst
Image Analyst on 19 Apr 2016
Edited: Image Analyst on 19 Apr 2016
The standard deviation of an image is not necessarily noise (this is a common misperception). Anyway, since your signal seems to be that white region, I'd simply threshold it and then take the largest blob
% Find the dark background.
mask = grayImage < 128; % or whatever value works.
% Extract the largest region only.
mask = bwareafilt(mask, 1);
% Erase background from original image
grayImage(mask) = 0;
% Display the "fixed" image.
imshow(grayImage);
This will give you the original white blob but the dark background will be completely black and noise free.
After histogram equalization, the SNR will be lower since it amplifies gray level values (makes more "noise").
  1 Comment
Marco Rossi
Marco Rossi on 19 Apr 2016
Hi Image Analyst, primarly thank you for your rapid answer.
Sorry but i didn't explain the problem correctly. The objective of my work is to find the velocity vector field of the air particles around the airfoil by a spatial correlation between two frames (the image i posted is the first frame). To this aim i have to equlize the istogram to make the particles more visible, make a min/max filter and also evaluate and enhance the SNR in a manner to improve the SNR but at the same time to guarantee a successful correlation.
If i understood well i have to calculate the grayImage std (this is the standard deviation of the noise). Then i make the ratio mu/sigma where mu is the mean of the signal (original image?). is it right?
Another question: is the SNR strongly affected by the value used to define the mask (128)? and how must i choose it?
sorry for my terrible english and noob question. Thanks a Lot

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!