Reply by Fred Marshall December 7, 20112011-12-07
On 12/7/2011 3:22 AM, zqchen wrote:
> On Dec 7, 3:41 pm, Fred Marshall<fmarshallxremove_th...@acm.org> > wrote: >> On 12/6/2011 3:18 PM, zqchen wrote: >> >> >> >>> Is there any problem in my question? >> >> Since you mentioned pixels, which are usually only positive-valued, I'd >> understand better if you were to tell us if the noise is zero-mean >> before the sampling/digitizing limits are imposed. I suspect that's the >> case but it's not clear. >> >> Example: >> >> DC value at 128 before sampling / quantization. >> Noise zero mean with variance of 90 is added to the DC value. >> This means that the noisy data is both positive and negative at times. >> >> Now sample and quantize between 0 and 255. >> The negative-going noise is limited at 0. >> The positive-going noise is limited at 255. >> The mean of the data before sampling is 128. >> Since it's 128 then the mean after sampling is apparently also 128. >> >> But, if the data were something different, say 64 and the noise is as >> above, then after sampling there will be more sample points at 0 than at >> 255. The mean before sampling will be 64. The mean after sampling will >> be something else I do believe. >> >> Does this match with your situation? >> >> Fred > > Yes, it's what I imagined an image could be formed. I'm not sure > whether it reflects the fact of physics or not. English is not my > native language, so sorry for the ambiguity.
zqchen, OK. So, I'll paraphrase that back. I'm not sure that I presented it all that well: - There is an image sensor whose output is noiseless (for the sake of analysis). All of the output is magnitude information, thus positive. - Zero-mean Gaussian noise is added to the output. The resulting composite can have negative values as a result. - the composite signal S + N is sampled and quantized from 0 to 255. The resulting quantized output value distribution: - peaks at a value closest to the image sensor output (and because the noise is zero-mean). - has "spikes" at 0 and 255 due to the tails of the noise distribution. - the lower the sensor output value, the higher the "spike" at zero and vice-versa. I hope this helps clarify .. if I got it right. One of the nagging problems I've had with this is that the time frame hasn't been stated. This raises some issues in a practical sense: - can the image data change during the analysis period? If not then the notion of lowpass filters, etc. works better but the potential of the spikes at 0 and 255 will perturb the output. But, as someone mentioned, that would be a *really* noisy S + N !! So maybe the end spikes are only worthy of analytical mention and of no practical importance. Fred
Reply by Rune Allnor December 7, 20112011-12-07
On 7 Des, 12:22, zqchen <zhiqun.c...@gmail.com> wrote:
> On Dec 7, 3:41=A0pm, Fred Marshall <fmarshallxremove_th...@acm.org> > wrote: > > > > > > > On 12/6/2011 3:18 PM, zqchen wrote: > > > > Is there any problem in my question? > > > Since you mentioned pixels, which are usually only positive-valued, I'd > > understand better if you were to tell us if the noise is zero-mean > > before the sampling/digitizing limits are imposed. I suspect that's the > > case but it's not clear. > > > Example: > > > DC value at 128 before sampling / quantization. > > Noise zero mean with variance of 90 is added to the DC value. > > This means that the noisy data is both positive and negative at times. > > > Now sample and quantize between 0 and 255. > > The negative-going noise is limited at 0. > > The positive-going noise is limited at 255. > > The mean of the data before sampling is 128. > > Since it's 128 then the mean after sampling is apparently also 128. > > > But, if the data were something different, say 64 and the noise is as > > above, then after sampling there will be more sample points at 0 than a=
t
> > 255. =A0The mean before sampling will be 64. =A0The mean after sampling=
will
> > be something else I do believe. > > > Does this match with your situation? > > > Fred > > Yes, it's what I imagined an image could be formed. I'm not sure > whether it reflects the fact of physics or not. English is not my > native language, so sorry for the ambiguity.
The ambiguity is not in the language, but in the topic of your stated question. The estimators you ask for are textbook material if you find the simple Gaussian model acceptable. Since you *don't* want to use the estimators for the Gaussian case, we naturally assume that there is something about the stated problem that prevents you from using the Gaussian model. Most of the discussion has been about what that 'something' might be, and why it would be important. Rune
Reply by zqchen December 7, 20112011-12-07
On Dec 7, 3:41=A0pm, Fred Marshall <fmarshallxremove_th...@acm.org>
wrote:
> On 12/6/2011 3:18 PM, zqchen wrote: > > > > > Is there any problem in my question? > > Since you mentioned pixels, which are usually only positive-valued, I'd > understand better if you were to tell us if the noise is zero-mean > before the sampling/digitizing limits are imposed. I suspect that's the > case but it's not clear. > > Example: > > DC value at 128 before sampling / quantization. > Noise zero mean with variance of 90 is added to the DC value. > This means that the noisy data is both positive and negative at times. > > Now sample and quantize between 0 and 255. > The negative-going noise is limited at 0. > The positive-going noise is limited at 255. > The mean of the data before sampling is 128. > Since it's 128 then the mean after sampling is apparently also 128. > > But, if the data were something different, say 64 and the noise is as > above, then after sampling there will be more sample points at 0 than at > 255. =A0The mean before sampling will be 64. =A0The mean after sampling w=
ill
> be something else I do believe. > > Does this match with your situation? > > Fred
Yes, it's what I imagined an image could be formed. I'm not sure whether it reflects the fact of physics or not. English is not my native language, so sorry for the ambiguity.
Reply by glen herrmannsfeldt December 7, 20112011-12-07
Fred Marshall <fmarshallxremove_the_x@acm.org> wrote:

(snip)
> Since you mentioned pixels, which are usually only positive-valued, I'd > understand better if you were to tell us if the noise is zero-mean > before the sampling/digitizing limits are imposed. I suspect that's the > case but it's not clear.
(snip)
> DC value at 128 before sampling / quantization. > Noise zero mean with variance of 90 is added to the DC value. > This means that the noisy data is both positive and negative at times.
If the noise is that big, then there might not be much image left. Maybe I don't understand CCD sensor quite well enough to say, but as you increase the ISO value, as many cameras allow, you increase the noise level in the image. (Well, decrease the signal, and then adjust the gain.) Some of the noise is in the quantization of electrons in the pixel transistor. The transistor is charged to a known value, some charge leaves as photocurrent, and the result is measured. For small changes, the statistical distribution of electrons left is noise, but the noise depends on the signal. There can't be a negative number, either. Also, as I understand it, there is a ROM giving the properties (such as gain) for each pixel, such that they can be normalized to allow for variations in fabrication for each one. That might mean that the A/D converter has a wider range than the result, such that clipping to 0 and 255 is done after normalization.
> Now sample and quantize between 0 and 255. > The negative-going noise is limited at 0. > The positive-going noise is limited at 255. > The mean of the data before sampling is 128. > Since it's 128 then the mean after sampling is apparently also 128.
As with audio signals, you usually don't want to clip. Since you can't get darker than no light, maybe it doesn't matter on that end, but it is best not to reach 255. (Though for very white parts, maybe it doesn't matter so much.)
> But, if the data were something different, say 64 and the noise is as > above, then after sampling there will be more sample points at 0 > than at 255. The mean before sampling will be 64. The mean > after sampling will be something else I do believe.
> Does this match with your situation?
-- glen
Reply by Fred Marshall December 7, 20112011-12-07
On 12/6/2011 3:18 PM, zqchen wrote:

> > Is there any problem in my question?
Since you mentioned pixels, which are usually only positive-valued, I'd understand better if you were to tell us if the noise is zero-mean before the sampling/digitizing limits are imposed. I suspect that's the case but it's not clear. Example: DC value at 128 before sampling / quantization. Noise zero mean with variance of 90 is added to the DC value. This means that the noisy data is both positive and negative at times. Now sample and quantize between 0 and 255. The negative-going noise is limited at 0. The positive-going noise is limited at 255. The mean of the data before sampling is 128. Since it's 128 then the mean after sampling is apparently also 128. But, if the data were something different, say 64 and the noise is as above, then after sampling there will be more sample points at 0 than at 255. The mean before sampling will be 64. The mean after sampling will be something else I do believe. Does this match with your situation? Fred
Reply by Tim Wescott December 6, 20112011-12-06
On Tue, 06 Dec 2011 15:18:55 -0800, zqchen wrote:

> On Dec 7, 12:58&nbsp;am, Jerry Avins <j...@ieee.org> wrote: >> On 12/5/2011 9:43 PM, Fred Marshall wrote: >> >> > On 12/5/2011 1:38 PM, Jerry Avins wrote: >> >> &nbsp; &nbsp;... >> >> >> >> >> >> >> >> >> >> >> I think I get it. The noise is zero mean, and the signal isn't. >> >> Well, the noise _was_ zero mean before clipping, and if there's not >> >> much clipping, its mean isn't far off zero. In that case, a low-pass >> >> filter gives the mean pretty accurately. Since images are >> >> (ordinarily) finite, we don't need specify which filter might be >> >> optimal, simply add all the pixels and divide by the number of them. >> >> That's what the mean is, eh? >> >> >> Jerry >> >> > But images are always unipolar as in always positive. In this case >> > the image data varies from 0 to 255. Now, I can imagine zero mean >> > noise added to the image data and THEREAFTER have the composite >> > represented from 0 to 255. In which case the composite will be >> > clipped at 0 AND at 255. But I can't imagine zero mean noise >> > represented by itself by 0 to 255 if zero is zero. To make any sense >> > at all, zero would have to be around 128 for the noise. >> > And then added to image data that's also from 0 to 255. >> >> > if the temporal window is great enough then Vlad suggested an >> > approach for the noise.... >> >> Here's the original post: >> >> Consider an unknown DC level in a white Gaussian noise with zero mean >> and unknown variance. The value of the DC level is restricted to a >> range of [A0, A1], the observations, that is the DC level plus WGN are >> also restricted in this range. Then what is the optimal estimator for >> the DC level and the variance of the noise? >> >> I see nothing in your message, mine, or the original question that is >> contradictory if taken together. Am I ossifying? >> >> Jerry >> -- >> Engineering is the art of making what you want from things you can get. > > Is there any problem in my question?
"Consider an unknown DC level in a white Gaussian noise with zero mean and unknown variance." could either be parsed as meaning "a DC level with zero mean, corrupted by white Gaussian noise", or "a DC level corrupted by white, zero mean, Gaussian noise". I think most of us just assumed that you must have meant the latter, because the former does not make sense. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com
Reply by zqchen December 6, 20112011-12-06
On Dec 7, 12:58=A0am, Jerry Avins <j...@ieee.org> wrote:
> On 12/5/2011 9:43 PM, Fred Marshall wrote: > > > On 12/5/2011 1:38 PM, Jerry Avins wrote: > > =A0 =A0... > > > > > > > > > > >> I think I get it. The noise is zero mean, and the signal isn't. Well, > >> the noise _was_ zero mean before clipping, and if there's not much > >> clipping, its mean isn't far off zero. In that case, a low-pass filter > >> gives the mean pretty accurately. Since images are (ordinarily) finite=
,
> >> we don't need specify which filter might be optimal, simply add all th=
e
> >> pixels and divide by the number of them. That's what the mean is, eh? > > >> Jerry > > > But images are always unipolar as in always positive. > > In this case the image data varies from 0 to 255. > > Now, I can imagine zero mean noise added to the image data and > > THEREAFTER have the composite represented from 0 to 255. In which case > > the composite will be clipped at 0 AND at 255. > > But I can't imagine zero mean noise represented by itself by 0 to 255 i=
f
> > zero is zero. To make any sense at all, zero would have to be around 12=
8
> > for the noise. > > And then added to image data that's also from 0 to 255. > > > if the temporal window is great enough then Vlad suggested an approach > > for the noise.... > > Here's the original post: > > Consider an unknown DC level in a white Gaussian noise with zero mean > and unknown variance. The value of the DC level is restricted to a > range of [A0, A1], the observations, that is the DC level plus WGN are > also restricted in this range. Then what is the optimal estimator for > the DC level and the variance of the noise? > > I see nothing in your message, mine, or the original question that is > contradictory if taken together. Am I ossifying? > > Jerry > -- > Engineering is the art of making what you want from things you can get.
Is there any problem in my question?
Reply by Jerry Avins December 6, 20112011-12-06
On 12/5/2011 9:43 PM, Fred Marshall wrote:
> On 12/5/2011 1:38 PM, Jerry Avins wrote:
...
>> I think I get it. The noise is zero mean, and the signal isn't. Well, >> the noise _was_ zero mean before clipping, and if there's not much >> clipping, its mean isn't far off zero. In that case, a low-pass filter >> gives the mean pretty accurately. Since images are (ordinarily) finite, >> we don't need specify which filter might be optimal, simply add all the >> pixels and divide by the number of them. That's what the mean is, eh? >> >> Jerry > > But images are always unipolar as in always positive. > In this case the image data varies from 0 to 255. > Now, I can imagine zero mean noise added to the image data and > THEREAFTER have the composite represented from 0 to 255. In which case > the composite will be clipped at 0 AND at 255. > But I can't imagine zero mean noise represented by itself by 0 to 255 if > zero is zero. To make any sense at all, zero would have to be around 128 > for the noise. > And then added to image data that's also from 0 to 255. > > if the temporal window is great enough then Vlad suggested an approach > for the noise....
Here's the original post: Consider an unknown DC level in a white Gaussian noise with zero mean and unknown variance. The value of the DC level is restricted to a range of [A0, A1], the observations, that is the DC level plus WGN are also restricted in this range. Then what is the optimal estimator for the DC level and the variance of the noise? I see nothing in your message, mine, or the original question that is contradictory if taken together. Am I ossifying? Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by Fred Marshall December 5, 20112011-12-05
On 12/5/2011 1:38 PM, Jerry Avins wrote:
> On 12/5/2011 3:47 PM, Fred Marshall wrote: >> On 12/5/2011 9:13 AM, Rune Allnor wrote: >>> On 5 Des, 16:13, Jerry Avins<j...@ieee.org> wrote: > > ... > >>>> I keep coming back to my earlier question. How can there be a >>>> substantial DC level in a signal specified to be zero mean? >>> >>> The signal was indicated by the OP to be an image, >>> which is not zero mean. >>> >>> Rune >> >> I was just wondering how there can be zero mean noise in image data? >> That is, since there are no negative values? Zero mean implies zero >> noise in that case. >> >> Of course, I'm assuming that the image data goes from 0-255 and 0 means >> *zero*. >> >> Fred > > I think I get it. The noise is zero mean, and the signal isn't. Well, > the noise _was_ zero mean before clipping, and if there's not much > clipping, its mean isn't far off zero. In that case, a low-pass filter > gives the mean pretty accurately. Since images are (ordinarily) finite, > we don't need specify which filter might be optimal, simply add all the > pixels and divide by the number of them. That's what the mean is, eh? > > Jerry
But images are always unipolar as in always positive. In this case the image data varies from 0 to 255. Now, I can imagine zero mean noise added to the image data and THEREAFTER have the composite represented from 0 to 255. In which case the composite will be clipped at 0 AND at 255. But I can't imagine zero mean noise represented by itself by 0 to 255 if zero is zero. To make any sense at all, zero would have to be around 128 for the noise. And then added to image data that's also from 0 to 255. if the temporal window is great enough then Vlad suggested an approach for the noise.... Fred
Reply by Jerry Avins December 5, 20112011-12-05
On 12/5/2011 3:47 PM, Fred Marshall wrote:
> On 12/5/2011 9:13 AM, Rune Allnor wrote: >> On 5 Des, 16:13, Jerry Avins<j...@ieee.org> wrote:
...
>>> I keep coming back to my earlier question. How can there be a >>> substantial DC level in a signal specified to be zero mean? >> >> The signal was indicated by the OP to be an image, >> which is not zero mean. >> >> Rune > > I was just wondering how there can be zero mean noise in image data? > That is, since there are no negative values? Zero mean implies zero > noise in that case. > > Of course, I'm assuming that the image data goes from 0-255 and 0 means > *zero*. > > Fred
I think I get it. The noise is zero mean, and the signal isn't. Well, the noise _was_ zero mean before clipping, and if there's not much clipping, its mean isn't far off zero. In that case, a low-pass filter gives the mean pretty accurately. Since images are (ordinarily) finite, we don't need specify which filter might be optimal, simply add all the pixels and divide by the number of them. That's what the mean is, eh? Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;