Image Model

Work in progress. This note is still being written and incomplete.

An image is modeled as a function I(x,y)I(x,y) returning the light intensity at position (x,y)(x,y).

Here:

  • x,yx, y: spatial coordinates of a point in the image
  • I(x,y)I(x,y): light intensity at that point, bounded between a minimum and maximum

Analog Image Model

x,yx, y are continuous and range over a bounded region. II is defined at every point of that region and varies continuously.

Properties:

  • Infinite spatial resolution
    A value exists between any two points.
  • Continuous intensity
    No fixed set of allowed values.
  • Not directly computable
    Needs sampling and quantization before a computer can store or process it.

Examples:

  • Photographic film
  • Image projected on the retina
  • Analog video signal

Digital Image Model

A digital image is obtained from an analog image by 2 discretization steps.

  • Sampling
    The spatial domain is divided into an m×nm \times n grid. Each cell (i,j)(i,j) covers a small finite region.
  • Quantization
    The intensity of each cell is mapped to one of LL discrete levels.

I(i,j)I(i,j) is the average intensity over cell (i,j)(i,j) after quantization. The digital image is the matrix of these values. Each element is a pixel.

[I(0,0)I(0,1)I(0,n1)I(1,0)I(1,1)I(1,n1)I(m1,0)I(m1,1)I(m1,n1)]\begin{bmatrix} I(0,0) & I(0,1) & \cdots & I(0,n-1) \\ I(1,0) & I(1,1) & \cdots & I(1,n-1) \\ \vdots & \vdots & \ddots & \vdots \\ I(m-1,0) & I(m-1,1) & \cdots & I(m-1,n-1) \end{bmatrix}

Here:

  • mm: number of rows
  • nn: number of columns
  • ii: row index, 0im10 \le i \le m-1
  • jj: column index, 0jn10 \le j \le n-1
  • LL: number of intensity levels, usually L=2kL = 2^k for a bit depth kk

m×nm \times n is the spatial resolution. kk is the bit depth. An 8-bit grayscale image has L=256L = 256 levels, 00 for black and 255255 for white.

Storage size in bits is m×n×km \times n \times k for a single channel. A color image repeats this per channel.

In a computer program, an image is simply a matrix of integer values. Image processing means manipulating this matrix.

Coarse Sampling

Large grid cells, so a small m×nm \times n and low spatial resolution. Too sparse to record fine spatial variation.

  • Small features fall between sample points and disappear.
  • Edges and text look blocky. This is pixelation.
  • Fast repeating patterns reappear as a false slower pattern. This is aliasing.

Coarse Quantization

Few intensity levels, so a small LL and low bit depth. The gaps between levels are large.

  • Nearby intensities collapse to the same level.
  • A slow gradient becomes a set of flat steps with visible jumps between them. This is banding, also called contouring.
  • Most visible in skies and other large smooth regions.

Color Banding

Color banding visible in sky. Image by By Steve F, CC BY-SA 2.0.

Written by September 13, 2026 3 min read
Was this helpful?