• DepthAI-v2
  • Spatial position calculation based on intrinsic parameters.

In my previous 3D camera, based on intrinsic parameters like following.

x_mm = (px - intrinsics.ppx) * pz / intrinsics.fx
y_mm = (py - intrinsics.ppy) * pz / intrinsics.fy

Does depthai SDK have equivalent parameters?
I also think about calculate intrinsic parameters based on bb_x_pos, bb_ypos and HFOV.
If you have any concerns about this process, please share your insight.
Thank you!

  • erik replied to this.

    Hi izumi ,
    I think the calc-spatials-on-host demo you linked is what you are looking for, but I am not sure what you meant with calculate intrinsic parameter? As in the demo we read intrinsics from the calibration.
    Thanks, Erik

    Hi @erik ,
    Sorry for unclear post. I want to get intrinsic parameters of OAK-D camera in previous camera format(ppx, ppy, fx, fz). I'll try following way:

    ppx = frame.shape[1]/2.0
    ppy = frame.shape[0]/2.0
     fx = 1 / (math.tan(HFOV / 2.0) / (frame.shape[1] / 2.0))
     fy = 1 / (math.tan(HFOV / 2.0) / (frame.shape[1] / 2.0))

    But if we have this format of the data somewhere in depthai, please share. Thanks!

    • erik replied to this.

      Hi izumi ,
      Sorry it's still not clear to me - why aren't you just using our API (example: calibration reader) to get intrinsics?
      Thanks, Erik