ok, I´m getting close!
I have this minimum code, it will give me what I want, BUT I´m missing the depth information:
`from pathlib import Path
import cv2
import depthai
import time
class DepthAI:
def init(self):
self.device = depthai.Device('', False)
self.p = self.device.create_pipeline(config={
"streams": ["metaout", "depth"],
"ai": {
#blob compiled for maximum 12 shaves
#blob can be generated using: python3 depthai_demo.py -cnn mobilenet-ssd -sh 12
#it will be written to <path_to_depthai>/resources/nn/mobilenet-ssd/mobilenet-ssd.blob.sh12cmx12NCE1
"blob_file": "/home/pi/depthai/resources/nn/mobilenet-ssd/mobilenet-ssd.blob.sh12cmx12NCE1",
"blob_file_config": "/home/pi/depthai/resources/nn/mobilenet-ssd/mobilenet-ssd.json",
"shaves" : 12,
"cmx_slices" : 12,
"NN_engines" : 1,
},
})
self.detections = []
def run(self):
while True:
nnet_packets, data_packets = self.p.get_available_nnet_and_data_packets()
for nnet_packet in nnet_packets:
self.detections = list(nnet_packet.getDetectedObjects())
for detection in self.detections:
print (detection.get_dict())
del self.p
del self.device
DepthAI().run()
`
The output:
What am I missing?
Thanks,
Carl