Hi,
I'm working through the examples in the SDK, starting with the very first example for the preview manager...
https://docs.luxonis.com/projects/sdk/en/latest/managers/preview_manager/
I have a very basic question, aimed at checking I've set up everything properly on Ubuntu. Using the very first example (shown below), I get no output.
from depthai_sdk import Previews
from depthai_sdk.managers import PipelineManager, PreviewManager
import depthai as dai
pm = PipelineManager()
pm.createColorCam(xout=True)
with dai.Device(pm.pipeline) as device:
pv = PreviewManager(display=[Previews.color.name])
pv.createQueues(device)
while True:
pv.prepareFrames()
pv.showFrames()
However_ if I add a line to import cv2, and a line to perform a waitKey() test (as shown below), I can see the output
from depthai_sdk import Previews
from depthai_sdk.managers import PipelineManager, PreviewManager
import depthai as dai
import cv2
pm = PipelineManager()
pm.createColorCam(xout=True)
with dai.Device(pm.pipeline) as device:
pv = PreviewManager(display=[Previews.color.name])
pv.createQueues(device)
while True:
pv.prepareFrames()
pv.showFrames()
if cv2.waitKey(1) == ord('q'):
break
Before I get more deeply involved in the use of the SDK. I just have a quick question - Is the problem due to something lacking in my setup, or is the example incomplete/out of date? Thanks.