Lens Focal Length and Stereo Baseline Calculator

This calculator helps you selecting the right lenses for your cameras. It does so by computing the desired focal length, the corresponding field of view and the expected depth of field. In case of a stereo camera, such as our Karmin2 3D stereo camera, the calculator also helps you selecting the baseline distance and it provides information on the expected depth error.

You have several options for determining the focal length: you can enter the focal length manually, specify the desired field of view, or determine the focal length from the desired projective transformation. In the latter case you enter the size and distance of a hypothetical reference object and its desired projection size in the camera image.

For computing the baseline distance of a stereo camera you further have to enter the minimum depth at which you want to be able to perform stereo matching and the considered disparity range. The baseline distance is then computed such that depth measurements at the minimum depth will have the maximum disparity value.

Stereo camera geometry

Image Sensor Properties

Sensor size:
Sensor resolution: × pixels
× pixels

Focal Length

° (with respect to ROI)
Object size:
Object distance:
Desired projection size:  pixels

Depth of Field (DoF)

Aperture: f/
Focused distance:
Circle of confusion: × pixel pitch

Stereo Geometry

Minimum depth:
Baseline distance:
Disparity range:
Expected disparity error: pixels


Image Sensor Metrics

Sensor width: mm ( pixels)
Sensor height: mm ( pixels)
Pixel pitch: µm (after binning)
ROI width: mm ( pixels)
ROI height: mm ( pixels)

Lens Metrics

Focal length: mm
Horizontal angle of view (ROI): °
Vertical angle of view (ROI): °
Diagonal angle of view (ROI): °

Depth of Field

Hyperfocal distance:
Near limit:
Far limit:
Total depth of field:

Stereo Geometry Metrics

Baseline distance:
Minimum depth:
ROI with full disparity range: pixels ()
ROI with half disparity range: pixels ()

Depth Error Chart

Link to this result