Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
SNR and imnosie

Subject: SNR and imnosie

From: Rami AbouSleiman

Date: 1 Jul, 2009 19:49:02

Message: 1 of 11

when i use the imnoise function as for example:

I=imnoise(input, 'gaussian', 0 , 0.1)
mean is always zero but all i vary is the variance.
What does that mean as SNR of I?

Any help is greatly appreciated.
Thanks

Subject: SNR and imnosie

From: ImageAnalyst

Date: 1 Jul, 2009 22:41:42

Message: 2 of 11

On Jul 1, 3:49 pm, "Rami AbouSleiman" <rdabo...@oakland.edu> wrote:
> when i use the imnoise function as for example:
>
> I=imnoise(input, 'gaussian', 0 , 0.1)
> mean is always zero but all i vary is the variance.
> What does that mean as SNR of I?
>
> Any help is greatly appreciated.
> Thanks

---------------------------------------------------------------------------------
Well let's see. Signal = input, and average noise = std dev = sqrt
(variance), so isn't the SNR (on average) at (x,y) just input(y, x)/
sqrt(0.1) ? Or you can say that the actual noise = (I-input) so
then SNR(y, x) = input(y, x) / (I(y, x) - input(y,x)).

No, that can't be it, that's too obvious - you would have figured that
out - so what aren't you telling us? If you really simply want to
know what SNR means (like you said), then you can use a nifty tool
called Google, where you might find sites like this:
http://en.wikipedia.org/wiki/Signal-to-noise_ratio

Subject: SNR and imnosie

From: Oliver Woodford

Date: 1 Jul, 2009 23:00:04

Message: 3 of 11

ImageAnalyst wrote:
> If you really simply want to
> know what SNR means (like you said), then you can use a nifty tool
> called Google, where you might find sites like this:
> http://en.wikipedia.org/wiki/Signal-to-noise_ratio

Yes, you could Bing SNR...

Subject: SNR and imnosie

From: Rami AbouSleiman

Date: 1 Jul, 2009 23:33:01

Message: 4 of 11

Mr. Image Analyst,
I know what is SNR and Gaussian noise,
but can you relate in a function SNR to the variance of the imnoise function thats my question?
Thanks



ImageAnalyst <imageanalyst@mailinator.com> wrote in message <1665e067-91c2-4141-a55b-189f8862d9a8@s6g2000vbp.googlegroups.com>...
> On Jul 1, 3:49?pm, "Rami AbouSleiman" <rdabo...@oakland.edu> wrote:
> > when i use the imnoise function as for example:
> >
> > I=imnoise(input, 'gaussian', 0 , 0.1)
> > mean is always zero but all i vary is the variance.
> > What does that mean as SNR of I?
> >
> > Any help is greatly appreciated.
> > Thanks
>
> ---------------------------------------------------------------------------------
> Well let's see. Signal = input, and average noise = std dev = sqrt
> (variance), so isn't the SNR (on average) at (x,y) just input(y, x)/
> sqrt(0.1) ? Or you can say that the actual noise = (I-input) so
> then SNR(y, x) = input(y, x) / (I(y, x) - input(y,x)).
>
> No, that can't be it, that's too obvious - you would have figured that
> out - so what aren't you telling us? If you really simply want to
> know what SNR means (like you said), then you can use a nifty tool
> called Google, where you might find sites like this:
> http://en.wikipedia.org/wiki/Signal-to-noise_ratio

Subject: SNR and imnosie

From: Rami AbouSleiman

Date: 1 Jul, 2009 23:41:02

Message: 5 of 11

to be more clear,

I have an image and I am inducing Gaussian noise through imnoise.

I use this image as an input into a specific system and the system fails when i put imnoise var of 0.15. (it works for var < 0.15)

I want to be able to say that the system was able to tolerate a SNR of X?
Find X?

Thanks

Subject: SNR and imnosie

From: ImageAnalyst

Date: 2 Jul, 2009 01:07:03

Message: 6 of 11

On Jul 1, 7:41 pm, "Rami AbouSleiman" <rdabo...@oakland.edu> wrote:
> to be more clear,
>
> I have an image and I am inducing Gaussian noise through imnoise.
>
> I use this image as an input into a specific system and the system fails when i put imnoise var of 0.15. (it works for var < 0.15)
>
> I want to be able to say that the system was able to tolerate a SNR of X?
> Find X?
>
> Thanks

----------------------------------------------------------------------
Rami:
I don't know what this system is, nor the manner of failure. But
apparently you do, so the only way is to try increasing the noise
until the system fails, according to your definition of "fail." At
that point, you will know X. Since you know "input" and I, you can do
SNRWhenFailedAveragedOverAllPixels = mean(mean(input ./ (I - input)));
(Note the dot slash instead of just slash)
Good luck,
ImageAnalyst

Subject: SNR and imnosie

From: Sadik

Date: 2 Jul, 2009 01:08:01

Message: 7 of 11

Hey, I don't see any "humour" here. If the people to ask questions will always be those who already know the answer, what is the point of this newsletter? All of us may ask very simple questions, simple according to others, but the questions can in deed be equally difficult for the owners of the questions probably because they are not very familiar with the subject. Let us please be a little more understanding and polite, we shall not discourage people from asking questions. If a person repeatedly asks very simple questions which have already been answered in one or more of his previous posts, only then can we to some extent decide that he is trying to be lazy and he does not make the effort he has to.

"We" in the above paragraph refers to the set of considerate and mindful posters. I hope all of us are in "we".

Best.


"Rami AbouSleiman" <rdabousl@oakland.edu> wrote in message <h2gs6d$8o6$1@fred.mathworks.com>...
> to be more clear,
>
> I have an image and I am inducing Gaussian noise through imnoise.
>
> I use this image as an input into a specific system and the system fails when i put imnoise var of 0.15. (it works for var < 0.15)
>
> I want to be able to say that the system was able to tolerate a SNR of X?
> Find X?
>
> Thanks

Subject: SNR and imnosie

From: Oliver Woodford

Date: 2 Jul, 2009 11:01:03

Message: 8 of 11

"Sadik " wrote:
> Hey, I don't see any "humour" here.

I made the "homourous" comment. It was subtle...

Subject: SNR and imnosie

From: Rami AbouSleiman

Date: 2 Jul, 2009 16:09:01

Message: 9 of 11

Image analyst,

I was using SNR as mean(input)/sqrt(sigma)
thats the definition from binging or googling the snr, but mean(input)/mean(input-noisyimage) makes more sense. Thanks

BTW you don't need ./ since they are the same size.




"Oliver Woodford" <o.j.woodford.98@cantab.net> wrote in message <h2i41f$p0j$1@fred.mathworks.com>...
> "Sadik " wrote:
> > Hey, I don't see any "humour" here.
>
> I made the "homourous" comment. It was subtle...

Subject: SNR and imnosie

From: Alan B

Date: 2 Jul, 2009 17:03:01

Message: 10 of 11

"Rami AbouSleiman" <rdabousl@oakland.edu> wrote in message <h2im2t$cg2$1@fred.mathworks.com>...
> Image analyst,
>
> BTW you don't need ./ since they are the same size.
>

this would have been a quick way for you to (fail to) verify your own declaration:

a=rand(2); b=rand(2);
a/b, a./b

Subject: SNR and imnosie

From: ImageAnalyst

Date: 2 Jul, 2009 17:30:10

Message: 11 of 11

On Jul 2, 1:03 pm, "Alan B" <mongui...@yahoo.com> wrote:
> "Rami AbouSleiman" <rdabo...@oakland.edu> wrote in message <h2im2t$cg...@fred.mathworks.com>...
> > Image analyst,
>
> > BTW you don't need ./ since they are the same size.
>
> this would have been a quick way for you to (fail to) verify your own declaration:
>
> a=rand(2); b=rand(2);
> a/b, a./b

--------------------------------------------------------------------------
Rami:
I just want to re-emphasize Alan's note. Alan and I are right and you
are mistaken. You do need the dot slash - and the matching or non-
matching size is not the reason why.

Also, it depends on how you define noise. If you just say that noise
is the observed distance between your actual signal and your true
signal, then you can use this definition
noise = mean(mean(abs(noisyImage - trueImage)));
Note the absolute value in there - otherwise your noise will be close
to zero. If you want to say the noise is the standard deviation of
the differences between your noisy pixel values and your true values,
then you might use this:
noiseOnly = abs(noisyImage - trueImage);
noise = std(noiseOnly(:));
Or you could use the RMS (root mean square) definition for your
noise. Something like
squaredImage = noiseOnly .^ 2 % Note the dot.
RMS = sqrt(mean(mean(squaredImage))); % I think that's it.

Good luck,
ImageAnalyst

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us