Image Formation & Foundations

image quantization

Quantization is the value half of digitizing a picture: after sampling fixes where each pixel sits, quantization decides what number to store there by rounding the continuous measured intensity to one of a finite set of levels. The sensor responds to a continuum of light, but storage allows only discrete values, so each true intensity is snapped to the nearest available level — much like reading an analog thermometer and writing down the nearest degree.

The number of levels is set by the bit depth: n bits give 2^n levels, and for an intensity range divided into L uniform levels the quantization step is the range divided by L. The rounding introduces quantization error, the difference between the true value and the stored level, bounded by half a step; treated as noise it has an approximately uniform distribution and yields the familiar rule that each extra bit improves the signal-to-quantization-noise ratio by about 6 dB. Uniform quantization spaces the levels evenly, while non-uniform schemes (such as gamma encoding or companding) place more levels where the eye is more sensitive, getting better perceived quality from the same number of bits.

Quantization's signature artifact is banding (also called posterization or false contours): in regions where intensity changes very gradually, too few levels turn a smooth gradient into visible flat bands separated by abrupt steps. The fix when levels are scarce is dithering — adding a small, carefully shaped noise before rounding so the steps break up into a finer-looking texture that the eye averages back to smoothness. Quantization is the direct partner of sampling: sampling discretizes space and can cause aliasing, while quantization discretizes value and can cause banding; together, sampling plus quantization is exactly what turns a continuous optical image into a finite digital one.

Quantizing an intensity of 130.7 on a 0-255 (8-bit) scale stores 131, an error of 0.3 out of 256 levels — invisible. Quantizing the same scene to 3-bit (8 levels, step 32) snaps it to 128, and a smooth wall now shows roughly 8 flat bands of brightness.

Also called
intensity quantizationamplitude quantization