I'm having some trouble running the sample Python code to align depth and RGB frames provided on https://docs.luxonis.com/software/depthai/examples/rgb_depth_aligned/.

When I try to run this, the camera initially turns on to display the cv2 windows, but after a few seconds the program crashes and the following error message is displayed on the terminal while the cv2 window streams freeze:

[1844301081769C0F00] [169.254.1.222] [1725494696.320] [host] [warning] Monitor thread (device: 1844301081769C0F00 [169.254.1.222]) - ping was missed, closing the device connection

To try to solve the issue, I have re-flashed the camera to use the latest bootloader, lowered the fps to 10 and removed two of the three cv2 windows, but the program continues to crash after a few seconds of runtime. Can someone look into this? Thanks!

    ZhifeiShen

    • make sure depthai is 2.28; then update bootloader (factory - you will get a prompt)
    • There should be some logs before the crash. What do they say?
    • Check the power delivery / connection with POE.
    • Do other scripts work as expected?

    Thanks,
    Jaka

    Thanks, updating depthai to 2.28 solved the problem. Also, is it possible to use depthalign with an rgb videoencoder bitstream?

      ZhifeiShen
      Yep, fully possible. Setting the depth.setDepthAlign(CAM_A) should work because extrinsics are separate from image frame.

      Thanks,
      Jaka