Your example uses 2 nodes. I want to send an ImageManipConfig message directly to cam.inputConfig, it should be possible as described in the docs
try this MRE:
#!/usr/bin/env python3
import depthai as dai
pipeline = dai.Pipeline()
cam = pipeline.create(dai.node.ColorCamera)
configIn = pipeline.create(dai.node.XLinkIn)
configIn.setStreamName('config')
xout = pipeline.create(dai.node.XLinkOut)
xout.setStreamName('out')
cam.setResolution(dai.ColorCameraProperties.SensorResolution.THE_1080_P)
configIn.out.link(cam.inputConfig)
cam.video.link(xout.input)
with dai.Device(pipeline) as device:
while True:
q = device.getOutputQueue(xout.getStreamName(), maxSize=4, blocking=False)
f = q.get()
configQueue = device.getInputQueue(configIn.getStreamName())
cfg = dai.ImageManipConfig()
cfg.setCropRect(0.2,0.2,0.5,0.5)
configQueue.send(cfg)
I get:
[184430107119670F00] [1.1] [1.834] [ColorCamera(0)] [warning] Crop rectangle out of bounds: x,y (384, 216), w,h (1920, 1080). Using center crop