• All Spatial Detection files cannot be run on OAK D Pro W

Hello,

I am running some spatial files under Spatial Detection folder in depthai-python/exemples but having the IndexError. Could someone instruct me how to solve it? (I am running the camera on Ubuntu)

    Hi KwinT
    Change line 78:
    min_depth = np.percentile(depth_downscaled[depth_downscaled != 0], 1)

    with

    if np.all(depth_downscaled == 0):
        min_depth = 0  # Set a default minimum depth value when all elements are zero
    else:
        min_depth = np.percentile(depth_downscaled[depth_downscaled != 0], 1)

    This has already been fixed on "develop" if you wish to just checkout to that branch.

    Thanks,
    Jaka

      jakaskerl Hi Jaka, it works, you have been great, thank you so much!

      And could you send me the link of the 'develop' branch you were talking about?