Hi
I'm trying to use imagemanip on a still frame from a camera. The intent is to feed the still frame to a neural net rather than the preview or video streams (which won't have the same data due to cropping). I'm creating a very simple pipeline as shown below (code is below picture). Without an imagemanip node I get the image out just fine. When I do use the imagemanip node and send a trigger I get the error
[14442C10E134C8D600] [1.2] [21.756] [system] [critical] Fatal error. Please report to developers. Log: 'ResourceLocker' '358'```
#!/usr/local/bin/python3
import cv2 # opencv - display the video stream
import depthai # depthai - access the camera and its data packets
import time
import numpy as np
import json
dai = depthai
pipeline = depthai.Pipeline()
cam_rgb = pipeline.create(depthai.node.ColorCamera)
cam_rgb.setPreviewSize(100, 100)
cam_rgb.setInterleaved(False)
cam_rgb.setBoardSocket(depthai.CameraBoardSocket.CAM_A) # Same as CameraBoardSocket.RGB
manip = pipeline.create(dai.node.ImageManip)
manip.initialConfig.setResize(640, 480)
manip.initialConfig.setFrameType(dai.RawImgFrame.Type.BGR888p)
cam_rgb.setResolution(depthai.ColorCameraProperties.SensorResolution.THE_4000X3000)
cam_rgb.initialControl.setAutoFocusMode(depthai.RawCameraControl.AutoFocusMode.CONTINUOUS_VIDEO)
cam_rgb.initialControl.setAutoFocusTrigger()
trigger_in = pipeline.create(depthai.node.XLinkIn)
trigger_in.setStreamName("trigger")
trigger_in.out.link(cam_rgb.inputControl)
cam_rgb.still.link(manip.inputImage)
xout_preview = pipeline.create(depthai.node.XLinkOut)
xout_preview.setStreamName("preview")
manip.out.link(xout_preview.input)
with depthai.Device(pipeline) as device:
device.setLogLevel(dai.LogLevel.DEBUG)
device.setLogOutputLevel(dai.LogLevel.DEBUG)
with open("/code/tmp/pipeline.json", "w") as ff:
ff.write(json.dumps(pipeline.serializeToJson()))
q_preview = device.getOutputQueue("preview", maxSize=1, blocking=False)
q_trigg = device.getInputQueue("trigger")
while True:
x = input("Do trigger?")
start = time.time()
ctrl = depthai.CameraControl()
ctrl.setCaptureStill(True)
print(f"Starting to send trigger request at {time.time() - start} seconds")
q_trigg.send(ctrl)
print(f"Sent trigger request at {time.time() - start} seconds")
in_rgb = q_preview.get()