OptixwiseOptixwise

Learn / Depth of field

Choosing a circle of confusion for small sensors

Photography defaults overstate depth of field on camera modules. Here is how to pick CoC from pixel pitch.

3 min read · Related tool: Depth-of-field calculator

Every depth-of-field number depends on one input that is easy to get wrong: the circle of confusion, or CoC. It is the largest blur spot you are willing to call "sharp". Photography calculators default to values chosen for prints of full-frame film. On a small camera-module sensor those values can overstate depth of field by a factor of four or more. This article explains where the defaults come from and how to pick a CoC from the pixels you actually have.

What the circle of confusion is

A lens focuses one distance perfectly. A point nearer or farther than that focuses in front of or behind the sensor, so on the sensor it becomes a small disk instead of a point. As long as that disk is smaller than the CoC, the point counts as in focus. Depth of field is simply the range of object distances whose blur disks stay under the CoC, so a CoC twice as large roughly doubles the depth of field you calculate.

Where the photography default comes from

The familiar 0.025–0.030 mm for full-frame 35 mm cameras comes from human vision: a print of about 20 × 25 cm viewed at reading distance, where a blur spot of about 1/1500 of the frame diagonal looks sharp to the eye. That is a perfectly good definition for photographs, but it has two problems in engineering work:

  • It is defined relative to the frame size, so it must shrink with the sensor. A full-frame value on a 1/2.8″ sensor is about six times too large by the photographer's own rule.
  • It is defined by a person looking at a print. A machine-vision algorithm, a barcode decoder or a face-recognition model looks at pixels, not prints.

Choosing CoC from pixel pitch

For a camera module, the natural unit of blur is the pixel. A practical rule is CoC = k × pixel pitch, with k chosen by how the image is used:

  • k ≈ 1 for measurement and monochrome machine vision, where edge position matters at the single-pixel level.
  • k ≈ 1.5–2 for color (Bayer) sensors in viewing and general detection. Demosaicing already spreads detail over neighboring pixels, so a blur of about two pixels costs little visible sharpness.
  • k > 2 only when the image is downscaled before use, for example a 4K sensor feeding a 1080p stream.

How much the choice matters

Take a common security-camera setup: a 2.8 mm f/2.0 lens on a 1920 × 1080 sensor with 2.9 µm pixels (6.39 mm diagonal). Hyperfocal distance is H = f² / (N · c), and focusing there makes everything from H/2 to infinity acceptably sharp:

CoC choicecHyperfocal HSharp from (at H)
Full-frame photo default (wrong here)25 µm0.16 m0.08 m
Diagonal / 1500 (print viewing)4.3 µm0.92 m0.46 m
2 pixels5.8 µm0.68 m0.34 m
1 pixel2.9 µm1.35 m0.68 m

The full-frame default claims everything beyond 8 cm is sharp. With a pixel-based CoC the honest answer is 34 cm for two-pixel blur and 68 cm for one-pixel blur. Between one and two pixels, the near limit changes by a factor of two, which can decide whether a fixed-focus design works at all.

Set CoC from pixel pitch and see near and far limits update.

Depth-of-field calculator →

Diffraction sets a floor

A CoC smaller than the lens can actually deliver is meaningless. At f/2 and 550 nm the Airy disk is about 2.7 µm across, smaller than one 2.9 µm pixel, so a one-pixel CoC is achievable. At f/8 the Airy disk is about 10.7 µm, more than three pixels wide, and no object is sharper than that regardless of focus. If you stop down to gain depth of field, check that diffraction blur stays below your CoC.

Compare the Airy disk with your pixel pitch at any f-number.

Diffraction & resolution →

Key points

  • Photography CoC values are tied to full-frame prints and overstate depth of field on small sensors.
  • Use CoC = k × pixel pitch, with k about 1 for measurement and 1.5–2 for color imaging.
  • Depth of field scales almost directly with CoC, so state the CoC whenever you quote a DoF number.
  • Keep diffraction blur below the CoC, or the depth-of-field result is optimistic.