1

I'm currently developing a web app that uses very, very dark images as background. To prevent color banding, I'm adding some randomized noise to the images:

enter image description here

Now, it's very easy to just overlay an image with noise and set the opacity to a low value, but that's not dithering, right? That's just film grain. If I understand it correctly, dithering is the act of actually shifting pixels around, not just adding some noisy overlay.

My two questions are whether that mindset is correct, and secondly what the actual artistic implications are when choosing one over the other. In particular, I wanna know if dithering looks better than a noise overlay.

2 Answers 2

2

Adding noise definitely is dithering when you use it to prevent too apparent banding which is caused by sparse brightness quantization levels in the image displaying system. Dither means the added noise, when the noise is added intentionally to make the sparseness of the quantization levels less apparent.

The dither, of course, can be a deterministic, even repeating quantity as long as it does not correlate with the variations of the too sparsely quantized thing. For ex. black & white printing of grayscale photos use regular dithering pattern (the raster) which rarely correlates with the photographed content. But when such correlation occurs we can see very disturbing interferences (for ex moire patterns).

Dithering has got numerous forms in different technology areas. Read this Wikipedia compilation of the subject: https://en.wikipedia.org/wiki/Dither

Dither can as well be randomness of placements and positions as random variations in signal levels. The linked article claims that the original form of dither was the mechanical vibration in WW2 aircrafts. It reduced calculation errors in 1940's mechanical firing and bombing computers.

An example of image dithering with noise

enter image description here

Both halves of the next BW photo are posterized to only 6 brightness levels. Both halves have also got in Photoshop a few percents of noise. Both halves look quite equally noisy. The half above the diagonal has no large bands, but the lower half has large bands which looks disturbing.

The difference is this: The upper half got its noise before the posterization. This dithers the sparse grayscale quantization effectively. In high zoom in it's still banded, but the bands are so small that the smoothing caused by distant looking partially restores the missing levels. The lower half got its noise after the posterization. That's only adding noise, it's not dithering.

1

If the dark image already has banding, then neither noise nor dithering will really fix that. At most it will make the banding less obvious.

In your case it seems like the banding is introduced when you reduce an image to a narrow dynamic range within an 8bit precision.

Solution: in your retouching app, switch to 16 bit precision, then perform your darkening corrections. Now either your retouching app has a dither feature when converting back to 8bit, or you just add 0.5 to 1% of noise prior to converting to 8bit.

Good luck!

2
  • Thanks, but I probably forgot to clarify something in my OP. When I say I'm developing a webapp, I mean that I'm applying this dithering stuff in real time in the web browser. That's why I was asking if a noise overlay is good enough (easy) or if I need to implement some actual dithering algorithm like Floyd-Steinberg (not easy).
    – Selbi
    Sep 28, 2023 at 16:52
  • @Selbi User Kris Van Bael has said the essential shortly but clearly. Do the dithering by adding the noise BEFORE you adjust the image so that the levels become sparse. Nothing fixes it if the levels already are so sparse that there's visible bands. Noise, blur and Floyd-Steinberg half-toning can make them less obvious by removing information, but as well you could paint some fake details to obscure the bands. Sep 29, 2023 at 11:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.