• DepthAI-v2
  • X e Y coordinates in Spatial Location Calculator node

Hi all,

looking at the documentation and at the examples, it seems that the coordinate reference system origin used in the Spatial Location Calculator node is placed in the sensor's geometrical center.

Wouldn't it be more correct to use as origin the optical center obtained in calibration and available between the intrinsic parameters (cx,cy)?

If so and if the depth image is aligned to RGB, does it make sense to use the optical center of the RGB sensor as origin or is it better to use, even in this case, the RGB geometrical center?

Can anyone help me clarify this matter?

Many thanks!

Alessandro

    Hi AlessandroB
    The Spatial Location Calculator node uses the center of the depth map as the origin for the x, y, z coordinates. The x, y coordinates are the relative positions of the center of the Region of Interest (ROI) to the center of the depth map.

    While it might seem more intuitive to use the optical center as the origin, the choice of the depth map center is due to the fact that the depth map is the primary source of spatial information in DepthAI. The depth map is generated by the stereo pair of cameras, and the center of this map is a logical choice for the origin of the spatial coordinate system.

    When the depth image is aligned to RGB, the depth map is scaled to match the resolution of the RGB sensor. Therefore, even in this case, the center of the depth map (now aligned and scaled to the RGB image) is used as the origin of the spatial coordinates.

    The OAK camera uses a right-handed (Cartesian) coordinate system for all spatial coordinates.

    Thanks,
    Jaka