Dithering

From Helpful
(Redirected from Dither)
Jump to navigation Jump to search

The physical and human spects dealing with audio, video, and images

Vision and color perception: physics, numbers, and (non)linearity · objectively describing color · the eyes and the brain · color spaces · references, links, and unsorted stuff · Lux and lumen

Image: file formats · image noise reduction · halftoning, dithering · illuminant correction · Image descriptors · Reverse image search · image feature and contour detection · OCR · Image - unsorted

Displays: · On display speed · Screen tearing and vsync · Arguments for 60fps / 60Hz in gaming‎‎ · Video display notes ·· Before framebuffers · Simpler display types · Display DIY


Video: file format notes · video encoding notes ·

Subtitle format notes


Audio physics and physiology: Sound physics and some human psychoacoustics · Descriptions used for sound and music · Sound level meter notes

Digital sound and processing: capture, storage, reproduction · on APIs (and latency) · programming and codecs · some glossary · audio noise reduction · Audio and signal processing - unsorted stuff

Music electronics: device voltage and impedance, audio and otherwise · amps and speakers · basic audio hacks · Simple ADCs and DACs · digital audio · multichannel and surround
On the stage side: microphones · audio levels & technical gritty · devices you'll use · cables, connectors, adapters · Effects · sync



Noise stuff: Stray signals and noise · sound-related noise names · electronic non-coupled noise names · electronic coupled noise · ground loop · strategies to avoid coupled noise · Sampling, reproduction, and transmission distortions · (tape) noise reduction


Electronic music:

Electronic music - musical and technical terms
MIDI ·
approaches to making sounds
Gaming synth ·
VCO, LFO, DCO, DDS notes
microcontroller synth
Modular synth (eurorack, mostly):
sync · power supply · formats (physical, interconnects)
DIY
physical
Electrical components, small building blocks
Learning from existing devices
Electronic music - modular - DIY


DAW: Ableton notes · MuLab notes · Mainstage notes


Unsorted: Visuals DIY · Signal analysis, modeling, processing (some audio, some more generic) · Music fingerprinting and identification

For more, see Category:Audio, video, images

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

Intro

💤 There is a story that dithering (from Middle English didderen, trembling) was introduced when WW2 engineers realized that bomb trajectory computers -- mechanical cog-and-gear things -- performed better in a airplane than on the ground because any possible give and stickiness would average out due to the vibration -- so they so basically built in some vibrators to the ground units. Tapping a sticky gauge today could be considered dithering in this sense.


Image dithering

Thresholding

Halftoning

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.


Halftone originates in a physical printing process, which creates printing plates which approximates shades using dots of varied size.

The choice of doing it with (density of) dots are not the only option, it is a specific choice, but it is both more predictable, more preceptually useful (more randomness might cause distracting patterns), and relates to the physical printability of the plates (both the etching and the inking might be mo)


Halftoning technically refers only to that part, and not the printing part; that is typically offset printing,

Offset printing is more about the ink transfer.

Offset printing color is done with multiple distinct plates, and with the dots created at specific angles to each other primarily to avoid moire patterns.


Technically, there are other methods of both halftoning, and of the actual printing, more so if aiming for different media, but on paper it's mostly offset (or laser or inkjet at home), and offset still uses metal halftone plates for images.


That is a much wider topic that we address here - e.g. when referring to printing newspapers, and packaging, and shirts, this involves processes like offset printing and, to a lesser degree, screen printing. If you care about historical accuracy, e.g. the printing of comics, you will have to look into the details of these processes, that varied over time.

Even the resolution has not changed a lot since early newspaper days. It has doubled from around 60 to 80 dpi, to 100 to 150(verify) in modern times.

Laser printers tend to do dithering instead, but the processing has some halftone-like qualities too, in part because dithering for ink and the laser process has to consider properties of ink and substrate.

(which relates to why inkjet can be better color[1], than at least same-price laser printers, at the cost of speed, and are also worse at e.g. fine lines).


Even digital halftoning has a wider context, originally referring to (the illusion of continuous-tone images) during preparation for digitally geared reproduction, e.g. imagesetters(verify).

...but also to what is very similar to (ordered) dithering.

...and sometimes even to mimicing much larger dots artificially.


https://en.wikipedia.org/wiki/Halftone

https://www.youtube.com/watch?v=CkKiJDeML5c


Halftoning could be considered a type of stippling -- doing shading by using small dots, though stippling is more frequently an aesthetic choice (with dots larger than necessary) than an optimal-approximation one.

Dithering

Dithering and halftoning live in the same area, of approximating shades in a medium that itself is binary (there or not),


Useful properties of dithering include:

  • minimal introduced patterns
  • minimal influence of neighbouring pixels
  • high frequency noise can be spread more than lower frequency noise
  • ability to use an arbitrary color palette (or at least be specialized to a specific one)


Randomized dithering

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

Ordered dithering

To imitate gradients of continuous-tone images, ordered dithering uses a fixed, regular pattern.

Now that we've just mentioned random dithering, consider again stepping through pixels, but the threshold is now taken from a small dither matrix (effectively tiled over the image), and again setting to black or white as a result.

In ordered dithering, both the size of that matrix, and the arrangement of the values in there, have a distinct effect on the result.


Upsides:

  • Is simplest to implement, fast to execute, and requires minimal memory (neighbouring pixels have no effect).
  • extended to RGB easily enough

Limitations:

  • This will often have noticeable grid and/or crosshatch patterns.
on a larger scale, that may look like diagonal lines
  • harder to combine colors and multiple levels

https://en.wikipedia.org/wiki/Ordered_dithering


dispersed dot ordered dither

Bayer
blue noise

clustered dot ordered dither

Error diffusion dithering

Error diffusion amounts to mean that whenever a pixel color choice introduces error, it is allowed to travel to a nearby pixel (that has not yet been decided).


It steps through the pixels as before, but after thresholding it calculates how much too bright or dark we just made that pixel, and moves that to neighbouring somehow (affecting their decisions).

So if we made a pixels too bright, a neighbouring pixel will be made darker, and the other way around.


Upsides:

  • Error diffusion methods tend to look better than ordered,
in part because they end up mostly pushing around the higher-frequency information more than the coarser detail,
while avoiding at least some kinds of patterns
  • Limitations:
we're still fighting patterns, just less


Simple error diffusion dithering

Floyd-Steinberg dithering

Jarvis-Judice-Ninke dithering

Stucki dithering

Burkes dithering

Sierra dithering

Atkinson dithering

Electrostatic Halftoning

Riemersma dither

Yliluoma dithering

Fan dithering

Unsorted

Blue noise in dithering

Lattice-Boltzmann dithering

Implementation variations

Non-rectangular dithering

Supercell dithering

void-and-cluster

Also related

Color dithering

Dithering as an aesthetic

Inverse halftoning/dithering

Duotones, tritones, etc.

Dithering and movement

Stippling

https://en.wikipedia.org/wiki/Stippling

Audio dithering