Velocity Reviews > Calculation of snr

# Calculation of snr

Kennedy McEwen
Guest
Posts: n/a

 05-27-2008
In article <(E-Mail Removed)>, Floyd L. Davidson
<(E-Mail Removed)> writes
>
>I am suggesting that the equation *necessarily* is a
>power ratio, and any time someone such as you are David
>J Taylor insists that either the left side (David's dBHz
>for example) or the right side (your part of this
>discussion) is *not*, by necessity and definition, a
>power ratio, then it is _WRONG_.
>

And hence you were WRONG when you stated "The numbers represent signal
power, regardless of what the signal actually is."

Clearly, the numbers do NOT represent a power ratio if the signal
(and/or noise) is not proportional to the square root of power.
>
>The problem is, generically, that you want to argue, and
>will twist words until the sun comes up to do so.
>

I am not twisting words at all. I have continually quoted YOUR
erroneous statement word for word and attempted to show you WHY it is
wrong. You have attempted to weasel away from that by continually
repeating a definition that nobody disagrees with. The simple fact is
that when you relaxed the requirements on the parameters for that
particular equation with the words "regardless of what the signal
actually is" you CEASED talking about the very subject that you thought

>>>If you cannot correctly summarize what I've said, it is
>>>invalid to attempt to draw conclusions from *your* invalid
>>>summary.
>>>

>>I have not summarised what you said, I quoted it directly! Go back and

>
>it summarized what I said. That is dishonest.
>

I quoted the statement that you made defining the input parameters to
the equation in question. That definition was WRONG, plain and simply
WRONG and you have been reduced to lies rather than admit your simple
error which, as I mentioned in my initial response to your post, is
extremely common.

>I'm not inclined to continue responding to your
>

The world benefits when errors cease to be propagated!
--
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)

Marc Wossner
Guest
Posts: n/a

 05-27-2008
On 27 Mai, 08:45, "David J Taylor" <(E-Mail Removed)-
this-bit.nor-this-bit.co.uk> wrote:
> John O'Flaherty wrote:
>
> []
>
> I don't agree that dBV is dimensionless - yes, it is a ratio of voltages
> but you could not equate dBV with dBm or dBA. *dBV defines a voltage
> level. *As with other uses of dB you can think of it as the ratio of a
> power at a particular impedance to the power from a one volt signal, hence
> 20 * log (V2/V1), but dBV is defining a voltage level and not a sound
> pressure level or power level or a bandwidth.
>
> I am slightly concerned that trying to use dB as a single measure of
> camera performance may be fraught with danger unless the effects of MTF,
> at least, are taken into account. *

Camera performance or image quality is not what I was after in the
first place. As far is that is concerned I think that you are right to
consider MTF as well.

> I would be happy with using voltage
> decibels to measure SNR, but with the OP mentioning things like 12-bit raw
> and 8-bit JPEG does bring up the whole issue of the non-linear processing
> in the camera (to get the 8-bit JPEG), and of the effects of the Poisson
> noise in the basic photon stream.

Ok, I understood that its not a good idea to look at 8-bit .jpeg
processed data due to the nonlinear effects of the applied tone curve.
So only raw data should be considered. I found a procedure to do that
but do not know if its correct:

- Take a pair of images of a uniformly lit, slightly out of focus
colorchecker chart.
- Take the sum of the two images, and separate the result into its
individual color channels. Measure the average raw value of each patch
in one of the two green channel subarrays of the Bayer color filter
array (or if desired, for each color channel). Divide by two (and, for
Canon cameras, subtract the bias offset) to get the average signal.
- Take the difference of the two images, split into color channels,
and measure the standard deviation in each color patch. Divide by
sqrt[2] to get the combined shot+read noise for that patch. (question:
If the signal is 12-bit do I have to take the signal as 4096 and
divide that figure by the number for the combined shot+read noise?)
- Plot the noise^2 vs. the signal, fit to a straight line. The
intercept is the square of the read noise, the slope is the inverse of
the gain.

Best regards!
Marc Wossner

David J Taylor
Guest
Posts: n/a

 05-27-2008
Marc Wossner wrote:
[]
> So only raw data should be considered. I found a procedure to do that
> but do not know if its correct:
>
> - Take a pair of images of a uniformly lit, slightly out of focus
> colorchecker chart.
> - Take the sum of the two images, and separate the result into its
> individual color channels. Measure the average raw value of each patch
> in one of the two green channel subarrays of the Bayer color filter
> array (or if desired, for each color channel). Divide by two (and, for
> Canon cameras, subtract the bias offset) to get the average signal.
> - Take the difference of the two images, split into color channels,
> and measure the standard deviation in each color patch. Divide by
> sqrt[2] to get the combined shot+read noise for that patch. (question:
> If the signal is 12-bit do I have to take the signal as 4096 and
> divide that figure by the number for the combined shot+read noise?)
> - Plot the noise^2 vs. the signal, fit to a straight line. The
> intercept is the square of the read noise, the slope is the inverse of
> the gain.
>
> Best regards!
> Marc Wossner

Marc,

I haven't done such detailed tests as this, so I'm not really in a
position to comment. Best to ask someone like Roger Clark.

http://www.clarkvision.com/imagedetail/index.html

I can see that if the camera has fixed-pattern noise, taking the
difference of two frames will reduce the effect considerably. However,
after taking the difference of the images, I would further adjust the
difference so that its mean value was zero, if necessary. Adding (or
subtracting) two images with Gaussian noise will cause the noise to
increase as a sum-of-squares, so dividing the difference by sqrt (2) to
get the per-image noise also sounds valid. If the signal is 12-bit, then
you could divide both noise and signal by 4096 to produce a normalised
result, but it shouldn't affect the slope of your line. It will affect
the units in which the offset is reported, of course.

Have you checked out:

http://www.clarkvision.com/imagedeta...1d2/index.html

He uses DN = digital number, i.e. signal levels expressed as numbers.

Cheers,
David

David J Taylor
Guest
Posts: n/a

 05-27-2008
Floyd L. Davidson wrote:
[]
> Each is of course a *power* specification. (All
> definitions are from Federal Standard 1037C.)
>
> dBv does not define a voltage, it defines a "dB" value,
> which is power. The reference for 0 dBv is whatever
> power there is for a 1 volt peak-to-peak signal. (And,
> if you look further you'll find that is at a specified
> impedance too...)

[]

I'm not dragging this out further with you, but I will note that you are
wrong if, for example, you think of voltage as being measured as
peak-to-peak in the context of a power level. It is the RMS value which
is meaningful, and not the peak-to-peak level. Thus in the standard you
quote, dBV is being used simply as a ratio, and not as a comparison of
power levels. The power in an all-white signal will be different than the
power in an all-black signal, even if they are at the same dBV level.....

Cheers,
David

John O'Flaherty
Guest
Posts: n/a

 05-27-2008
On May 27, 1:45 am, "David J Taylor" <(E-Mail Removed)-
this-bit.nor-this-bit.co.uk> wrote:
> John O'Flaherty wrote:
>
> []
>
> I don't agree that dBV is dimensionless - yes, it is a ratio of voltages
> but you could not equate dBV with dBm or dBA. dBV defines a voltage
> level. As with other uses of dB you can think of it as the ratio of a
> power at a particular impedance to the power from a one volt signal, hence
> 20 * log (V2/V1), but dBV is defining a voltage level and not a sound
> pressure level or power level or a bandwidth.

Well, it does define a voltage level, but by reporting the resulting
power. It has no units, so is dimensionless in the usual sense of the
word. But I can see we aren't going to agree on this!

> I am slightly concerned that trying to use dB as a single measure of
> camera performance may be fraught with danger unless the effects of MTF,
> at least, are taken into account. I would be happy with using voltage
> decibels to measure SNR, but with the OP mentioning things like 12-bit raw
> and 8-bit JPEG does bring up the whole issue of the non-linear processing
> in the camera (to get the 8-bit JPEG), and of the effects of the Poisson
> noise in the basic photon stream.

I think that is right: considering the full range of the A/D system
gives one limiting value for SNR based on the sensor and digitizer.
The image SNR is another matter entirely, and will always be worse.

> It's a complex subject!

Amen to that.

> Cheers,
> David

Cheers to you too.
--
John

David J Taylor
Guest
Posts: n/a

 05-27-2008
John O'Flaherty wrote:
> On May 27, 1:45 am, "David J Taylor" <(E-Mail Removed)-
> this-bit.nor-this-bit.co.uk> wrote:

[]
>> I don't agree that dBV is dimensionless - yes, it is a ratio of
>> voltages but you could not equate dBV with dBm or dBA. dBV defines
>> a voltage level. As with other uses of dB you can think of it as
>> the ratio of a power at a particular impedance to the power from a
>> one volt signal, hence 20 * log (V2/V1), but dBV is defining a
>> voltage level and not a sound pressure level or power level or a
>> bandwidth.

>
> Well, it does define a voltage level, but by reporting the resulting
> power. It has no units, so is dimensionless in the usual sense of the
> word. But I can see we aren't going to agree on this!

OK, I'm happy to agree disagree.

But, what do these suggest?

(A) 5dBV - 3dB (loss) => 2dBV
(implies mutliplication, power loss)

(B) 5dBV + 5dBV => 10dBV
(implying power addition, not doubling the voltage)

(C) 4dB + 6dB = 10dB
(two attenuators in series)

(D) 5dBm + 7dBV => nonsense.

I'm happy with (C), less happy with the mixtures in (A) and (B), hence
writing "=>" rather than "=". (D) is completely invalid, as the units are
mixed.

Cheers,
David

John O'Flaherty
Guest
Posts: n/a

 05-27-2008
On May 27, 9:54 am, "David J Taylor" <(E-Mail Removed)-
this-bit.nor-this-bit.co.uk> wrote:
> John O'Flaherty wrote:
> > On May 27, 1:45 am, "David J Taylor" <(E-Mail Removed)-
> > this-bit.nor-this-bit.co.uk> wrote:

> []
> >> I don't agree that dBV is dimensionless - yes, it is a ratio of
> >> voltages but you could not equate dBV with dBm or dBA. dBV defines
> >> a voltage level. As with other uses of dB you can think of it as
> >> the ratio of a power at a particular impedance to the power from a
> >> one volt signal, hence 20 * log (V2/V1), but dBV is defining a
> >> voltage level and not a sound pressure level or power level or a
> >> bandwidth.

>
> > Well, it does define a voltage level, but by reporting the resulting
> > power. It has no units, so is dimensionless in the usual sense of the
> > word. But I can see we aren't going to agree on this!

>
> OK, I'm happy to agree disagree.
>
> But, what do these suggest?
>
> (A) 5dBV - 3dB (loss) => 2dBV
> (implies mutliplication, power loss)

That one is ok.

> (B) 5dBV + 5dBV => 10dBV
> (implying power addition, not doubling the voltage)

That wouldn't be a power addition, since dBV is a power ratio, not a
power. I'd disallow this expression entirely.

> (C) 4dB + 6dB = 10dB
> (two attenuators in series)

That one's fine.

> (D) 5dBm + 7dBV => nonsense.
>
> I'm happy with (C), less happy with the mixtures in (A) and (B), hence
> writing "=>" rather than "=". (D) is completely invalid, as the units are
> mixed.

I think only (A) and (C) are allowable, since they link to an absolute
reference either not at all (C), or only once (A). The examples do
support that the expressions with a reference aren't completely unit-
free, though. I guess they're hybrid expressions; I wouldn't be happy
using any of them on a physics exam without resolving them into
fundamental units first.
--
John

David J Taylor
Guest
Posts: n/a

 05-27-2008
John O'Flaherty wrote:
[]
> I think only (A) and (C) are allowable, since they link to an absolute
> reference either not at all (C), or only once (A). The examples do
> support that the expressions with a reference aren't completely unit-
> free, though. I guess they're hybrid expressions; I wouldn't be happy
> using any of them on a physics exam without resolving them into
> fundamental units first.

Thanks for your response, John. I didn't realise that physicists even
knew about dB - I thought it was just engineers! <G>

Cheers,
David

David J Taylor
Guest
Posts: n/a

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

[]
> It is by *definition* a power ratio. Everytime you deny the
> fact that the definition defines it that way, it is again
> clear that the rest of what you are saying is based on not
> being able to understand what the terms actually mean.
>
>> The power in an all-white signal will be different than the
>> power in an all-black signal, even if they are at the same dBV
>> level.....

>
> First, it is dBv, not dBV. Second, an all black signal
> does not have the same level as as an all white signal.

Floyd,

I understand /exactly/ what the terms mean, and I can assure you that an
all-black signal has exactly the same levels as an all-white signal (e.g.
measuring sync voltage) while having greatly different power levels. It
is the voltage level which is important to the television engineer.

dBV is a voltage ratio measurement, for convenience expressed as a power
ratio into a hypothetical resistive load at the point of measurement.

By the way - were I to look for a definition, I would not cite a
national-level document - I would look for an International-level
document.

Cheers,
David

David J Taylor
Guest
Posts: n/a

 05-28-2008
John O'Flaherty wrote:
[]
> I meant I wouldn't use them while taking, not making, a physics exam.
> I'm an engineer, but I've taken a few such physics exams in the past
> few years.

Yes, agreed.

An example of where this might be important is where you might want to
calculate the power level in a given circuit from a 1V television signal.
Whereas the voltage level from sync to white in the signal is fixed, the
rms signal level varies a lot between all-black and all-white, so there is
no single conversion from voltage to power - it is signal content
dependant.

Cheers,
David