Interesting!
The way I understand it the XLinkIn node has to be bound to an inputqueue, like in the boilerplate from the docs:
pipeline = dai.Pipeline()
xIn = pipeline.create(dai.node.XLinkIn)
xIn.setStreamName("camControl")
# Create ColorCamera beforehand
xIn.out.link(cam.inputControl)
with dai.Device(pipeline) as device:
device.startPipeline()
qCamControl = device.getInputQueue("camControl")
# Send a message to the ColorCamera to capture a still image
ctrl = dai.CameraControl()
ctrl.setCaptureStill(True)
qCamControl.send(ctrl)
Can I just create an XLinkIn node called "cv2Frames" and then pipe that to the UVC output node?
pipeline = dai.Pipeline()
xIn = pipeline.create(dai.node.XLinkIn)
xIn.setStreamName("cv2Frames")
#create UVC node
# Create an UVC (USB Video Class) output node. It needs 1920x1080, NV12 input
uvc = pipeline.createUVC()
cam_rgb.video.link(uvc.input)
#Link xln node to UVC output
xln.out.link(uvc.input)
with dai.Device(pipeline) as device:
device.startPipeline()
cv2FrameStream = device.getInputQueue("cv2Frames")
#### MAKE SOME cv2 frames and convert them to NV12 ######
currentCv2Frame = X
# Send the cv2 image formatted to NV12 to the streem
cv2FrameStream.send(currentCv2Frame)
Something like that?