Velocity Reviews > Calculation of snr

# Calculation of snr

Don Stauffer in Minnesota
Guest
Posts: n/a

 05-24-2008
On May 23, 7:24 pm, "PDM" <pdcm99minus this (E-Mail Removed)> wrote:
> "Marc Wossner" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed)...
> On 23 Mai, 23:07, "PDM" <pdcm99minus this (E-Mail Removed)> wrote:
>
>
>
> > "Marc Wossner" <(E-Mail Removed)> wrote in message

>
> >news:(E-Mail Removed)...

>
> > Hi ng,

>
> > Iīd like to know about the signal to noise ratio of my digital camera.
> > According to a website I found this value is the ratio of total signal
> > to total noise expressed in decibels (dB) and can be calculated with
> > the following formula:

>
> > SNR = 20 log (Signal RMS / Noise RMS)

>
> > As math was always a horror for me, I have only a slight idea of "root
> > mean square" but donīt know how to deduce those values from simple

>
> > Best Regards!
> > Marc Wossner

>
> > For the life of me, I can not understand why you want to know. Please
> > amplify?

>
> > PDM

>
> I want to know because I want to get a better understanding of the
> underlying technique to make better use of it and to be able to rank
> the values I find written and on the web by hands-on knowledge.
>
> How will this help you to take better pictures? Afterall, this is what's
> it's all about, not science.
>
> PDM

Without science we wouldn't even have the camera. You can always do
painting of a scene, so you don't need to use science at all.

m II
Guest
Posts: n/a

 05-24-2008
Don Stauffer in Minnesota wrote:

> Without science we wouldn't even have the camera. You can always do
> painting of a scene, so you don't need to use science at all.
>

cough...cough..

Paints, cleaners, surface treatments, an understanding of light,
adhesion, cohesion, percentages, perspective, etc, etc....

mike

Kennedy McEwen
Guest
Posts: n/a

 05-24-2008
In article <(E-Mail Removed)>, Floyd L. Davidson
<(E-Mail Removed)> writes
>Kennedy McEwen <(E-Mail Removed)> wrote:
>>In article <(E-Mail Removed)>, Floyd L. Davidson
>><(E-Mail Removed)> writes
>>>ransley <(E-Mail Removed)> wrote:
>>>>On May 22, 5:28*am, Marc Wossner <(E-Mail Removed)> wrote:
>>>>> Hi ng,
>>>>>
>>>>> Iīd like to know about the signal to noise ratio of my digital camera.
>>>>> According to a website I found this value is the ratio of total signal
>>>>> to total noise expressed in decibels (dB) and can be calculated with
>>>>> the following formula:
>>>>>
>>>>> SNR = 20 log (Signal RMS / Noise RMS)
>>>>>
>>>>> As math was always a horror for me, I have only a slight idea of "root
>>>>> mean square" but donīt know how to deduce those values from simple
>>>>>
>>>>> Best Regards!
>>>>> Marc Wossner
>>>>
>>>>db is sound not what your eve sees, what is "this wedsite" for you id
>>>>say tb, trollbell
>>>
>>>dB has no particular attachment to sound, any more than
>>>it does to light. It's a ratio of two numbers, as shown
>>>in the formula above. The numbers represent signal
>>>power, regardless of what the signal actually is.

> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>Even if the signal is a voltage measurement, the numbers (and hence the
>decibel) _represent_ a *power* ratio.
>

I think you miss the point, and in the process, miss the error.

There are two ratios in this equation. One on the right hand side:
Signal/noise is a ratio. The other is on the left hand side and is a
single number which represents the POWER RATIO. "The numbers" in the
last sentence of your statement above is totally ambiguous. Whilst
correct when referring to the output of the equation on the left hand
side, it is completely wrong when referring to the numbers input to the
equation on the right hand side.

It is also completely wrong to state that this equation give the correct
power ratio measured in dB, "regardless of what the signal actually is"
- the correct power ratio depends critically on "what the signal
actually is".

20 Log (Sig/noise) gives the correct power ratio result in dB using the
units of volts and /or current as input. However it does NOT give the
correct power ratio in dB if the two numbers actually represent signal
power to begin with. Then the ratio on the right of the equation is
indeed a power ratio but, in that case the correct equation to use is
10 log (Sig/noise)

The bel is log(P1/P2) where P1 & P2 are power levels.
A decibel is 1/10th of a bell, ie. 10 log(P1/P2)

When the input units represent signal AMPLITUDE, which is the square
root of power, the ratio must be squared to convert it first to a power
ratio. That is the equivalent of multiplying the logarithm by 2, hence
20 log(A1/A2).
Note that this is precisely equal to 10 log(P1/P2).

You cannot just blindly take the log of the ratio of measurements and
multiply that by 20 to get the power ratio in decibels. First you need
to know how those measurements relate to power in their own right. That
relationship determines the normalisation multiplier used.

>>The most common mistake of all is that in the formula above, the numbers
>>represent signal and noise AMPLITUDE, eg. voltage, current, digital
>>units, and NOT power!

>
>The most common mistake is that a dB represents anything
>other than a power ratio!

Nobody suggested it was anything other than that, only that you MUST use
the correct units to begin with and hence select the correct
normalisation term.

> In the example above the
>power ratio is calculated using only voltage or current,
>but it is still a power ratio.
>

Power is proportional to voltage or current SQUARED, and that is the
ONLY reason why the 20x multiplier exists in the original equation.

For example, consider the power dissipated by a fixed 10ohm resistor.
P = I^2 R = V^2/R

With 1V across the resistor, 0.1W of power is dissipated.
With 10V across the resistor, 10W of power is dissipated.

The two power levels are in the ratio of 100, which is 20dB.

However, using the dissipated powers in the original equation yields a
power ratio of 20 log (10/0.1) = 40dB, which is a factor two HIGHER than
it should be.

The correct equation when the input measurements actually do represent
power is 10 log(P1/P2). The original equation is correct if, and only
if, the original units are proportional to signal amplitude, NOT power.
The resulting decibel value certainly represents the power ratio.

This becomes more complex when the sensor, as in the case of the
photodiode, actually outputs a current which is proportional to incident
power, or light intensity. In that case it is quite wrong to use 20 log
(Signal/noise) to assess input power ratios on the sensor even if the
signal and noise are measured in amps.

Now, consider the context of this thread and how the power ratio in dB
should be determined in this context.
--
Kennedy
Yes, Socrates himself is particularly missed;
A lovely little thinker, but a bugger when he's ****ed.
Python Philosophers (replace 'nospam' with 'kennedym' when replying)

David J Taylor
Guest
Posts: n/a

 05-24-2008
Don Stauffer in Minnesota wrote:
[]
> While a bar chart target is not a sine wave, which is what MTF is
> designed for, a normal bar chart target is a 50-50 square wave. Hence
> there is no second harmonic. The first actual overtone that comes
> into effect is the third. If there is reasonable anti-aliasing
> filtering, then one can use modulation measured from a bar chart to do
> MTF calcs. Yeah, a sine wave chart is better, but harder to find,
> especially for IR.

Indeed, yes, but you can predict the SNR on the retina of a square-wave
bar target, and then compare the results with what actual observers
achieve. IIRC, if you do a Fourier analysis of a square-wave target, the
fundamental comes out with a peak-to-peak amplitude exceeding the
peak-to-peak amplitude of the original target, so the ideal LPF might
actually increase the amplitude!

The other interesting topic for sine-wave charts is: what gamma-law should
apply to them? Linear? Log? Something more resembling the response of
the eye? For low-contrast targets (or low temperature difference
targets), perhaps it doesn't really matter.....

So in photography, is the accurate rendition of low-contrast detail more
important than a "crisp" rendition of high-contrast detail? I think the

Cheers,
David

David J Taylor
Guest
Posts: n/a

 05-25-2008
Floyd L. Davidson wrote:
[]
> Exactly. The right side is a *power* ratio.

However, dB are actually a ratio, and can be used to measure other things
than power (as I'm sure you will know).

David

PDM
Guest
Posts: n/a

 05-25-2008

"Marc Wossner" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
On 24 Mai, 02:24, "PDM" <pdcm99minus this (E-Mail Removed)> wrote:
> "Marc Wossner" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed)...
> On 23 Mai, 23:07, "PDM" <pdcm99minus this (E-Mail Removed)> wrote:
>
>
>
> > "Marc Wossner" <(E-Mail Removed)> wrote in message

>
> >news:(E-Mail Removed)...

>
> > Hi ng,

>
> > Iīd like to know about the signal to noise ratio of my digital camera.
> > According to a website I found this value is the ratio of total signal
> > to total noise expressed in decibels (dB) and can be calculated with
> > the following formula:

>
> > SNR = 20 log (Signal RMS / Noise RMS)

>
> > As math was always a horror for me, I have only a slight idea of "root
> > mean square" but donīt know how to deduce those values from simple

>
> > Best Regards!
> > Marc Wossner

>
> > For the life of me, I can not understand why you want to know. Please
> > amplify?

>
> > PDM

>
> I want to know because I want to get a better understanding of the
> underlying technique to make better use of it and to be able to rank
> the values I find written and on the web by hands-on knowledge.
>
> How will this help you to take better pictures? Afterall, this is what's
> it's all about, not science.
>
> PDM

Better pictures, yes thatīs what we are after. But to understand what
a good picture is one needs science. Because we perceive pictures
visually, science is necessary to understand how our visual system
works. And it is important as well to understand how photography as a
technical medium works. Looking at our visual system you can learn
that noise, together with resolution, is an important measure of
sharpness and sharpness in turn is the most important factor in image
quality. So understanding noise and its implications on how we
*perceive* sharpness (it is something our visual system creates) helps
in taking pictures that are judged as superior.

Best regards!
Marc Wossner

Sorry Mark but I can not agree with you. I spend three years at a
photography college learning all sorts of useless stuff like this. It did
not help one jot with my photography. Ok, some theory helps, but the depth
you want to go to doesn't. You will just get bogged down in detail. Your
pictures will probably suffer. What is a superior picture? One of the best
pictures I ever saw was grainy and out of focus. It gave it a far superior
quality that a technically perfect image would not. Sharpness and resolution
are not the be all of photography and sometimes actually detracts from the
picture. Your approach to photography appears to be by the numbers. It
doesn't work like this.

I feel there are better areas of photography to concentrate on learning
than this.

PDM

Marc Wossner
Guest
Posts: n/a

 05-25-2008
On 25 Mai, 09:23, "PDM" <pdcm99minus this (E-Mail Removed)> wrote:
> "Marc Wossner" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed)...
> On 24 Mai, 02:24, "PDM" <pdcm99minus this (E-Mail Removed)> wrote:
>
>
>
> > "Marc Wossner" <(E-Mail Removed)> wrote in message

>
> >news:(E-Mail Removed)...
> > On 23 Mai, 23:07, "PDM" <pdcm99minus this (E-Mail Removed)> wrote:

>
> > > "Marc Wossner" <(E-Mail Removed)> wrote in message

>
> > >news:(E-Mail Removed)....

>
> > > Hi ng,

>
> > > Iīd like to know about the signal to noise ratio of my digital camera.
> > > According to a website I found this value is the ratio of total signal
> > > to total noise expressed in decibels (dB) and can be calculated with
> > > the following formula:

>
> > > SNR = 20 log (Signal RMS / Noise RMS)

>
> > > As math was always a horror for me, I have only a slight idea of "root
> > > mean square" but donīt know how to deduce those values from simple

>
> > > Best Regards!
> > > Marc Wossner

>
> > > For the life of me, I can not understand why you want to know. Please
> > > amplify?

>
> > > PDM

>
> > I want to know because I want to get a better understanding of the
> > underlying technique to make better use of it and to be able to rank
> > the values I find written and on the web by hands-on knowledge.

>
> > How will this help you to take better pictures? Afterall, this is what's
> > it's all about, not science.

>
> > PDM

>
> Better pictures, yes thatīs what we are after. But to understand what
> a good picture is one needs science. Because we perceive pictures
> visually, science is necessary to understand how our visual system
> works. And it is important as well to understand how photography as a
> technical medium works. Looking at our visual system you can learn
> that noise, together with resolution, is an important measure of
> sharpness and sharpness in turn is the most important factor in image
> quality. So understanding noise and its implications on how we
> *perceive* sharpness (it is something our visual system creates) helps
> in taking pictures that are judged as superior.
>
> Best regards!
> Marc Wossner
>
> Sorry Mark but I can not agree with you. I spend three years at a
> photography college learning all sorts of useless stuff like this. It did
> not help one jot with my photography. Ok, some theory helps, but the depth
> you want to go to doesn't. You will just get bogged down in detail. Your
> pictures will probably suffer. What is a superior picture? One of the best
> pictures I ever saw was grainy and out of focus. It gave it a far superior
> quality that a technically perfect image would not. Sharpness and resolution
> are not the be all of photography and sometimes actually detracts from the
> picture. Your approach to photography appears to be by the numbers. It
> doesn't work like this.
>
> *I feel there are better areas of photography to concentrate on learning
> than this.
>
> PDM

Your are perfectly right of course and I should have added four more
words to make myself clear: "Better pictures *in a technical sense*".
Photography surely is more than counting line pairs as well as any
other medium that has the potential to express yourself. It all is
about emotion and how to transport it to get in touch with the viewer.
That is perfectly clear to me. But as viewing takes place inside our
heads it does no harm to understand how this machninery works. If you
know that it surely makes it easier to get your massage through.
Anyway, that might not be 100 percent true for snr, but once I pick up
on a topic I canīt stop until I really understood it .

Best regards!
Marc Wossner

David J Taylor
Guest
Posts: n/a

 05-25-2008
Floyd L. Davidson wrote:
> "David J Taylor"

[]
>> However, dB are actually a ratio, and can be used to measure other
>> things than power (as I'm sure you will know).

>
> That is what gets people into big trouble trying to use
> dB.
>
> dB is *defined* as a power ratio. It only makes sense
> when the right side of the equation is a formula that
> equates to a *power* ratio.

I have seen the dB used for voltage levels (typically relative to 1
microvolt or 1 millivolt - dBuV or dBmV), in digital audio (relative to
full scale - dBFS), and in bandwidth (dBHz). In all of these, it is used
as a ratio, with an implication of power, although the voltage
measurements may not be at the same impedance.

I completely agree that you need to be very careful!

Cheers,
David

Kennedy McEwen
Guest
Posts: n/a

 05-25-2008
In article <(E-Mail Removed)>, Floyd L. Davidson
<(E-Mail Removed)> writes
>Kennedy McEwen <(E-Mail Removed)> wrote:
>>In article <(E-Mail Removed)>, Floyd L. Davidson
>><(E-Mail Removed)> writes
>>>Kennedy McEwen <(E-Mail Removed)> wrote:
>>>>In article <(E-Mail Removed)>, Floyd L. Davidson
>>>><(E-Mail Removed)> writes
>>>>>ransley <(E-Mail Removed)> wrote:
>>>>>>On May 22, 5:28*am, Marc Wossner <(E-Mail Removed)> wrote:
>>>>>>>
>>>>>>> SNR = 20 log (Signal RMS / Noise RMS)
>>>>>
>>>>>dB has no particular attachment to sound, any more than
>>>>>it does to light. It's a ratio of two numbers, as shown
>>>>>in the formula above. The numbers represent signal
>>>>>power, regardless of what the signal actually is.
>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

>
>Read what I wrote very carefully Kennedy; it should be
>very apparent that right from the start I know exactly
>what you are referring to.

I have, and I think you will realise that, from the start I have
considered what you wrote to be ambiguous at best or indeed, if your
words are interpreted in a logical manner but not necessarily the manner
you meant, completely wrong.

"Its a ratio of two numbers" followed by "the numbers" (ie. the SAME
numbers) "represent signal power, regardless..."

That is completely wrong. "The numbers" do NOT represent signal power,
they are voltages. The ratio (signal / noise) is a VOLTAGE ratio.

The ratio (signal^2 / noise^2) IS a power ratio, but that does not
directly appear in the equation because the square terms have been taken
outside of the logarithm. The step means that the remaining ratio in
the equation CANNOT be a power ratio, even if the entire expression
which it is a part of REPRESENTS a power ratio.
>
>There is always a lot of confusion by people who believe
>there are voltage dB's and that those are different from
>power dB's

The confusion comes from people learning 20log(a/b) and applying that
universally, independent of the starting parameters or what they are
trying to determine. Sadly, I have seen far too many engineering
graduates make this very mistake when expressing ratios of light
intensity (ie. starting unit already proportional to power) for it to be
down to chance.

In the context of this thread, which power ratio is required? Is it the
power ratio of the maximum non-saturating light intensity compared to
the minimum detectable light intensity, both incident at the camera
aperture? Or is it the ratio of the power dissipated by the sensor
output stage under those same conditions? Answer that question and you
may understand the reason for my objection.
>
>It is a *power* ratio. That is true regardless of what
>the two numbers actually represent.

No it isn't! If the numbers represent voltage or current then the
entire expression is a power ratio. If the numbers represent, for
example, light intensity transmitted through an attenuating filter, then
that expression does NOT represent the power ratio. In fact it would
yield TWICE the power ratio.

> It is true that if
>one uses numbers from signal voltage the equation is not
>the same as if numbers from something else are used; but
>that was not what was said.
>

Actually that is precisely what you said, or at least a very common
interpretation of what you said:

"SNR = 20 log (Signal RMS / Noise RMS)
....
The numbers represent signal power, regardless of what the signal
actually is."

I don't see any reference in your original post, or its immediate
follow-up, that "the equation is not the same" if something other than
voltages are used. Quite the opposite, you imply that the equation is
the same REGARDLESS of what the input numbers represent. They could be
volts, watts, lux, tangerines or elephants. As demonstrated, that is
incorrect, whether that is what you meant by your statement or not.

>>>

>>Power is proportional to voltage or current SQUARED, and that is the
>>ONLY reason why the 20x multiplier exists in the original equation.

>
>Exactly. The right side is a *power* ratio.
>

The entire expression is a representation of a power ratio ONLY when the
units are in a form where they are proportional to the square root of
power, as voltage and current are. It is NOT a power ratio regardless
of those units.
--
Kennedy
Yes, Socrates himself is particularly missed;
A lovely little thinker, but a bugger when he's ****ed.
Python Philosophers (replace 'nospam' with 'kennedym' when replying)

David J Taylor
Guest
Posts: n/a

 05-25-2008
Floyd L. Davidson wrote:
[]
> But your post is not. Decibels are relative to _power_,
> every time.

No, decibels are a ratio every time. It's quite possible to have a
voltage amplifier where the input impedance is very high, so that while
the voltage gain may be 20dB, the power gain is huge. Another example, a
photodetector working as a current source, into a near zero-resistance

As I said, you need to be careful in such circumstances.

David