Hacker News new | ask | show | jobs
by luismarques 4018 days ago
Isn't this (just) dithering noise?

AFAIK, the reason it's so effective in the example is that adding the noise helps the quantization process in the posterization better represent the original color spectrum. Without the dithering the quantization error can keep adding up in a way that the posterization filter cannot control (but which the image author can engineer to be problematic, as surely was the case here). With the dithering you have a statistical guarantee that the quantization errors average out.

2 comments

Yes, as described in the article, this is just dithering. I've never heard of "stochastic resonance", but from what I can discern from the wikipedia article, it's essentially the same thing except applied to systems that are merely "nonlinear" and "bistable", as opposed to outright quantized.

It appears we are not the first to note the connection: http://www.ncbi.nlm.nih.gov/pubmed/11046260

In effect yes they are essentially the same thing. One of the (potentially annoying) things you'll see going through the literature is that the term has very broad meaning. Other times it'll be a very narrow term. The broadest is basically "random noise can be used to improve signal." Under that definition, dithering would be a form of stochastic resonance. This biology article actually touches on the definition issues.(http://journals.plos.org/ploscompbiol/article?id=10.1371/jou...)

There's also a case to be made that the definition of SR should be narrowed, and a lot of what's called resonance isn't resonance at all.(http://www.nipslab.org/files/PRE1995-SR-and-dithering-p4691_...)

> With the dithering you have a statistical guarantee that the quantization errors average out.

Could you point me towards somewhere this statement is made precise?

I don't know where to link you to, but here is a more detailed statement, which I think could be straightforwardly expanded into something precise.

Consider a signal S[i], i=1...N. The human eye isn't actually perceiving S[i], it's perceiving some convolution of it S[i] \conv w[i] (for a window function w). I.e., an area with 50% white pixels and 50% black pixels appears grey.

Suppose for simplicity w[i] = 1/k on i=0...k.

Now add noise g[i] to the signal in a region where S[i] = alpha. Then S[i] + g[i] = alpha + g[i]. The number of pixels above a threshold T within the window are then 1-cdf(T-alpha), where cdf is the cdf of the distribution of g.

Assuming your cdf is approximately linear near T, then 1-cdf(T-alpha) \approx C + alpha.

http://xiph.org/video/vid2.shtml

This video (23min) explains, among other things, how dithering of audio signals works in the frequency domain. Note: the main subject of the video is about digital vs analog signals, but he explains dithering as well. It's also just a very well done video, I like the way he presents and explains things.