However, I am encountering an issue with my OAK-D lite camera: the depth value consistently reads as zero. I would greatly appreciate any guidance or suggestions you might have to resolve this issue.
Based on the information provided in the extracts, it seems like you might be deploying to an OAK device without Depth capabilities. If this is the case, you should set depth=False when creating the rf object. OAK devices with Depth capabilities have a “D” attached to the model name, like OAK-D and OAK-D-Lite.
Here is the relevant code snippet:
from roboflowoak import RoboflowOak
import cv2
import time
import numpy as np
# When creating the 'rf' object, set 'depth=False' if your OAK device doesn't have Depth capabilities
rf = RoboflowOak(depth=False)
Also, if your device doesn’t have Depth capabilities, you should comment out the following lines:
# Comment these lines out if your OAK device doesn't have Depth capabilities
# max_depth = np.amax(depth)
# cv2.imshow("depth", depth/max_depth)
If you’ve done all of this and you’re still having issues, it might be a problem with the model or the device itself. In that case, I would recommend reaching out to Roboflow’s support for further assistance.
Hi! I’m Roboflow’s AI powered bot. This is an automated response powered using AI with knowledge from our docs, blog, knowledge base, and previous forum responses. If you find this to be a helpful answer, please mark it as the solution using the checkbox icon below. If this doesn’t solve your issue, please follow up with what you’ve tried/why, and the community will continue to chime in as usual.
It’s before cv2 the issue occurs : predictions contains a depth value equal to zero.
I’m not talking about ‘depth’ frame (that’s contains the frame from the camera), but predictions[‘depth’]. Please look the first message.
any update on this thread? i have the same issue as well…have a OAK D Pro with depth, depth works very well with the Luxonis pipeline code, but get zero depth as the return when using the RoboflowOak module.