API & MCP

Everything a person can do on Depth of Field, Field of View & Exposure Calculator, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Depth of Field, Field of View & Exposure Calculator

Enter the sensor, focal length, aperture and focus distance to get the near and far limits of acceptable sharpness, the total depth of field and the hyperfocal distance, with the circle of confusion taken from the sensor size, from a print and viewing distance or from your own value. The same input gives the horizontal, vertical and diagonal angle of view, the scene width covered, the full-frame equivalent focal length and aperture, the magnification, the exposure value, ND filter conversions (stops, optical density, filter factor) and the 500 and NPF rules for sharp stars. Part of the Lumina photo studio.

Inputs of Depth of Field, Field of View & Exposure Calculator
FieldTypeDefaultDescription
sensorselect (medium-format, full-frame, aps-c, aps-c-canon, mft, one-inch, type-1-1.3, type-1-1.7, type-1-2.3, type-1-3, custom)"full-frame"Sensor size. Typical dimensions from the manufacturers; “inch” types are a historical naming, not a measurement.
sensorWidthnumber—Custom sensor width. Only with “Custom size”.
sensorHeightnumber—Custom sensor height. Only with “Custom size”.
focalLength (required)number50Focal length. The real focal length printed on the lens (not the 35 mm equivalent).
fNumber (required)number8Aperture (f-number)
focusDistance (required)number3Focus distance. Distance from the lens to the subject in focus.
cocModeselect (standard, print, custom)"standard"Sharpness criterion
cocDivisorinteger1500Diagonal divisor. Classic standard only: 1500 gives 0.029 mm on full frame; Zeiss uses 1730, stricter users 3000.
printWidthnumber25.4Print width
printHeightnumber20.3Print height
viewingDistancenumber25Viewing distance
acuitynumber5Visual acuity at 25 cm. 5 line pairs per millimetre at 25 cm is the usual assumption for normal eyesight.
cocCustomnumber—Circle of confusion. Only with “My own circle of confusion”.
imageWidthPxinteger—Image width. Optional: long side of the full-resolution photo in pixels, for the pixel pitch (NPF rule).
shuttertext—Shutter time. For the exposure value and the ND filter: 1/125, 0.5 or 30 (seconds). Leave empty to skip that part.
isonumber100ISO
ndValuenumber0ND filter strength
ndUnitselect (stops, density, factor)"stops"ND filter given as
declinationnumber0Star declination. For the full NPF rule: 0° at the celestial equator (fastest trails), near ±90° at the celestial poles.

Example request

50 mm at f/8 on full frame, focused at 3 m

curl -X POST https://luminadepthoffield.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"sensor":"full-frame","focalLength":50,"fNumber":8,"focusDistance":3,"shutter":"1/125","iso":100}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "lumina-depth-of-field": { "type": "http", "url": "https://luminadepthoffield.usefulweb.site/mcp" }
  }
}