Skip to navigation

Depth Origin

Where depth is measured from on each ZED stereo camera, relative to its mounting thread
Open in ClaudeOpen in ChatGPT

The depth map, the point cloud, ZED SLAM and every other 3D output of the ZED SDK are expressed relative to one point inside the camera: the depth origin. This point is not on the front face of the camera, so a depth of zero does not correspond to the front face. Its position changes with the camera model and the lens option.

You need its position to:

  • Place the camera in your robot description (URDF, CAD model, TF tree).
  • Compare ZED depth with a ground truth measured with a tape measure, a laser rangefinder or another sensor.
  • Initialize a hand-eye or camera-to-robot calibration with a good first estimate.

This page gives the position of the depth origin of the ZED X, ZED X Mini, ZED X Nano and ZED 2i, measured from the center of the bottom mounting thread.

What is the depth origin

The depth origin is the center of the entrance pupil of the lens of the left camera (left eye) of the stereo pair. Left is defined as seen from behind the camera, looking forward.

The entrance pupil is the image of the lens aperture seen from the front of the lens. The rays coming from the scene are directed toward its center when they enter the lens, so this center is the point from which the camera sees the scene and from which the ZED SDK computes distances. On ZED cameras, it sits inside the lens, close to its front element, about 3 to 5 mm behind the front glass of the camera. It is not located at the image sensor.

In practice:

  • The depth of a pixel of the depth map is the depth of the point seen by that pixel of the left image.
  • The X, Y and Z coordinates of the point cloud start from the depth origin.
  • The Camera Frame of Positional Tracking uses the same origin, and so do the 3D positions returned by Object Detection and Body Tracking when they are expressed in the camera reference frame (REFERENCE_FRAME::CAMERA).

The axes of the frame at the depth origin follow the coordinate system selected in InitParameters. With the default IMAGE coordinate system, X points to the right, Y points down and Z points forward, away from the camera.

How to read the offsets

Each offset gives the position of the depth origin relative to the mounting point: the center of the bottom 1/4”-20 UNC mounting thread, on the bottom face of the camera. This is where a tripod or a standard camera mount screws in.

The X, Y and Z offsets are given, with the camera upright, in a frame attached to the mounting point. This frame follows the ROS convention:

OffsetDirectionMeaning
XForward, toward the sceneDistance along the optical axis between the thread axis and the depth origin
YLeft, toward the left camera, seen from behind the cameraHorizontal distance between the thread axis and the depth origin
ZUp, toward the top of the cameraHeight of the depth origin above the bottom face
Behind front glassBackward, away from the sceneDistance along the optical axis between the front glass of the camera and the depth origin

This frame is fixed to the camera body: it does not depend on the coordinate system selected in the ZED SDK. All values are in millimeters.

  • X is measured on a test bench, with a precision of about 1 mm.
  • Behind front glass is computed from the position of the front glass in the mechanical design and the measured X.
  • Y and Z are design values from the mechanical model of the camera. Y is half the baseline.

The position of the depth origin can differ slightly from one camera to another. When you need sub-millimeter accuracy, refine the camera position with a hand-eye calibration, using these values as the starting point.

Depth origin per camera

CameraLensX (mm)Y (mm)Z (mm)Behind front glass (mm)
ZED XWide12.260.016.03.3
ZED XNarrow11.160.016.04.4
ZED X MiniWide10.425.016.05.1
ZED X MiniNarrow10.925.016.04.6
ZED X NanoFixed9.69.015.253.2
ZED 2iWide18.260.015.03.0

The ZED 2i narrow lens is not measured yet. The ZED Mini has no 1/4”-20 thread, so it is not covered by this page.

ZED X, ZED X Mini and ZED X Nano

ZED X wide lens depth origin

Behind front glass: 3.3 mm.

ZED 2i

ZED 2i wide lens depth origin

Behind front glass: 3.0 mm (wide lens).

ZED X One and ZED X One Core stereo rigs

A stereo rig built from two ZED X One or two ZED X One Core cameras follows the same rule: the depth origin is on the left camera. Its position depends on how you mount the two cameras, so there is no fixed offset for these rigs.

To place the depth origin in your rig:

  1. Locate the left camera in your mechanical design, for example on the Dual Camera Mount.
  2. Use the technical drawings of the ZED X One or the ZED X One Core to estimate the position of its lens relative to your mount.
  3. Check the result against the baseline measured by the stereo calibration of the rig.

Using the offsets

In a robot description

In a robot description, place the depth origin at (X, Y, Z) from the mounting point, with no rotation.

The ZED ROS 2 wrapper uses the same two points: <camera_name>_camera_link is the mounting thread and <camera_name>_left_camera_frame is the depth origin. The transform between them goes through <camera_name>_camera_center: the first part comes from the URDF of the zed_description package, and the node publishes the second part.

The ZED ROS 2 wrapper up to v5.6 and zed_description up to v0.2 place <camera_name>_left_camera_frame at a nominal X offset (3.5 to 5 mm behind the thread axis) that does not match the measured values on this page. When you need an accurate position of the depth origin in your TF tree, use the values of this page.

The ZED ROS 2 wrapper v5.7 and zed_description v0.3.0, available in the ROS 2 binaries, use the measured values. With a ZED X or ZED X Mini narrow lens, add camera_lens:=narrow to the launch command.

In the default IMAGE coordinate system of the ZED SDK, the mounting thread is at the following position relative to the depth origin. Lowercase x, y and z are the axes of the ZED SDK (x right, y down, z forward). Uppercase X, Y and Z are the offsets of your camera in the table above:

x = +Y
y = +Z
z = -X

Apply this translation, in the coordinate_units set in InitParameters, to express ZED SDK poses and 3D positions relative to the mounting point, as described in Frame Transforms.

Comparing with a ground truth

When you measure the distance to a target from the front glass of the camera, with a tape measure or a laser rangefinder, add the Behind front glass offset of your camera to get the ZED depth:

ZED depth = distance measured from the front glass + Behind front glass offset

Use a flat target perpendicular to the optical axis, such as a wall facing the camera, so that the depth is the same across the whole target. The ZED depth is a Z distance, along the optical axis: it is not comparable with a straight-line distance measured to a tilted target or to a point away from the optical axis.

Other transforms from the ZED SDK

The ZED SDK does not report the position of the mounting thread, but it provides the transforms between the depth origin and the other sensors of the camera. Their translations are expressed in the coordinate_system and coordinate_units set in InitParameters:

sl::CameraInformation info = zed.getCameraInformation();
// Transform from the left camera (depth origin) to the right camera
sl::Transform left_to_right = info.camera_configuration.calibration_parameters.stereo_transform;
// Transform from the IMU to the left camera (depth origin)
sl::Transform camera_imu = info.sensors_configuration.camera_imu_transform;

These values come from the calibration of your camera. stereo_transform is the transform between the rectified left and right images; its translation is the baseline. For the raw stereo extrinsics, use calibration_parameters_raw instead, as described in Camera Calibration.