DSPRelated.com
Forums

Dthering....

Started by Piergiorgio Sartor October 10, 2003
robert bristow-johnson wrote:

> In article Xi6jb.56767$mQ2.43304@newsread1.news.atl.earthlink.net, Randy > Yates at yates@ieee.org wrote on 10/15/2003 03:03: > > >>>Randy Yates <yates@ieee.org> wrote in message >>>news:<iniib.24587$Eo2.10343@newsread2.news.atl.earthlink.net>... >>> >>> >>>>I would say that anyone who isn't using dither when digitizing a signal >>>>isn't doing digital "right." >>> >>> >>>unless there is something inherent in the algorithm function that it >>>does no quantization. two examples: moving sum (not average) filter >>>or a mean-square function that returns a double word width relative to >>>that of the input and window coefs. >> >>Wouldn't dither be useful in these examples too? E.g., in the moving >>sum, not dithering may hide an offset that is < 1/2 LSB that would >>otherwise be picked up. No? > > > how would that offset exist in the moving sum filter? i am assuming that > there is no quantization. is my assumption faulty?
I think I see what's happening here Robert. I'm talking about dither in the input signal, not within the moving sum itself. Let's say the source has a DC offset that is at 1/4 LSB. If the analog signal is real clean and there's no dither, then you'll just see zero and when you moving sum you'll get zero instead of N/4.
> r b-j > > (finally home and detoxing from AES trip to NYC. and i didn't get killed in > the ferry accident, but the wind was so bad that the wingtip of the Jet Blue > A-320 came within 12" of the ground upon landing at Burlington.)
Wow. Glad you're safe buddy. -- % Randy Yates % "...the answer lies within your soul %% Fuquay-Varina, NC % 'cause no one knows which side %%% 919-577-9882 % the coin will fall." %%%% <yates@ieee.org> % 'Big Wheels', *Out of the Blue*, ELO http://home.earthlink.net/~yatescr
Jerry Avins wrote:

> I suspect -- another to say that I'm willing to make a wild guess -- > that fraction saving will work better than a sawtooth, and it's easier > to implement in the bargain. It will certainly push most of the added > noise to the upper end of the spectrum, and it may minimize it.
As usual Jerry as a long eye... :-) Just two words: Floyd Steinberg bye, -- piergiorgio
Piergiorgio Sartor wrote:

> Jerry Avins wrote: > >> I suspect -- another to say that I'm willing to make a wild guess -- >> that fraction saving will work better than a sawtooth, and it's easier >> to implement in the bargain. It will certainly push most of the added >> noise to the upper end of the spectrum, and it may minimize it. > > > As usual Jerry as a long eye... :-)
Thanks (I think!)
> > Just two words: > > Floyd Steinberg
Piergiorgio, Thanks for pointing me to this. Floyd-Steinberg Dithering, being two dimensional, isn't exactly the same as my suggestion, but the idea of saving and redistributing an error is common to both. For an extreme case of Floyd-Steinberg in action -- gray scale to black and white -- see http://www.visgraf.impa.br/Courses/ip00/proj/Dithering1/floyd_steinberg_dithering.html Note that this isn't half-toning. With a true halftone, the dots (or holes) vary in size. Here, each pixel is either all black or all white. Unless the error is redistributed, the result is equivalent to rounding even when the quantizing level is carefully chosen. http://www.visgraf.impa.br/Courses/ip00/proj/Dithering1/average_dithering.html Shows how much cruder rounding is.
> > bye, >
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;
Jerry Avins wrote:

>> As usual Jerry as a long eye... :-) > > Thanks (I think!)
Of course. Actually I made a typo, should be "has" not "as"...
> Floyd-Steinberg Dithering, being two dimensional, isn't exactly the > same as my suggestion, but the idea of saving and redistributing an > error is common to both. For an extreme case of Floyd-Steinberg in > action -- gray scale to black and white -- see
I think you got exactly the point, in the picture case it is very convenient to redistribute the error to the pixels around. Looking for this things, I found also something else, it seems that, in case dithering with noise is required, the best noise is not "white", but "blue"...
> http://www.visgraf.impa.br/Courses/ip00/proj/Dithering1/floyd_steinberg_dithering.html > > Note that this isn't half-toning. With a true halftone, the dots (or > holes) vary in size. Here, each pixel is either all black or all white. > > Unless the error is redistributed, the result is equivalent to rounding > even when the quantizing level is carefully chosen. > http://www.visgraf.impa.br/Courses/ip00/proj/Dithering1/average_dithering.html > Shows how much cruder rounding is.
Thanks for the links, very useful. bye, -- piergiorgio
On Wed, 15 Oct 2003 22:10:49 -0400, Jerry Avins <jya@ieee.org> wrote:

>Adjusting according to the MSB of the lopped part only is feedback too. >If you don't save the rest for later, one bit is the best you can do, as >you concluded. I first ran into this when accumulating energy over a >long period of time to calculate the internal temperature of a motor >accurately enough to know when to shut it down. 16-bit integer quotient >wasn't precise enough. The values calculated with rounding showed a >random walk away from The One True Value. Mr. Fixit -- me -- got called >in, and I came up with the scheme of accumulating the entire 8-bit >remainder, and adjusting the accumulated quotient whenever the remainder >register overflowed. (Two's complement with truncating toward negative >infinity makes that easy -- no need to round.) That's why I called it >"remainder saving" until Randy's more general "fraction saving" came to >my attention. However you look at it, it keeps all of the information in >the original signal as quantized, instead of giving some away in the >gain divider. When forcing the signal to fewer bits, it keeps the >original precision on average, yielding the closest possible to how the >signal would have looked had it been originally sampled with the lower >bit count. > >Had this been clear to me before, I would have trumpeted it loudly. It >was just one of those things I knew in another context and didn't think >much about. After all, it was a quick and dirty trick I dreamed up in >the days before you guys taught me DSP. That said, I'm convinced of its >utility. I think we're onto something. > >Jerry
I think I'm following now, and this is actually what I had in mind. Cheers, Eric Eric Jacobsen Minister of Algorithms, Intel Corp. My opinions may not be Intel's opinions. http://www.ericjacobsen.org
Hi Piergiorgio,

"Piergiorgio Sartor" <piergiorgio.sartor@nexgo.REMOVETHIS.de> wrote in
message news:sqi861-e31.ln1@lazy.lzy...
> Looking for this things, I found also something else, > it seems that, in case dithering with noise is required, > the best noise is not "white", but "blue"...
Yes. There is a really nifty halftoning technique called the "blue noise mask" that has been patented and licensed to various printer manufacturers: http://www.ece.rochester.edu/projects/blue_noise_mask/index.html It is much prettier and simpler to use than F-S diffusion dithers, and doesn't suffer from the same clipping (overaccumulation) problems. The patent means that I'm not going to use it for anything, but it might be worth it for someone in the signal processing business to evaluate the obvious one-dimensional analog as an alternative to noise shaping.