erik Hi I tried implementing it like this:
` pipeline = dai.Pipeline()
# Define source and output
camRgb = pipeline.create(dai.node.ColorCamera)
camRgb.setResolution(dai.ColorCameraProperties.SensorResolution.THE_12_MP)
camRgb.setInterleaved(False)
camRgb.setIspScale(1,5) # 4056x3040 -> 812x608
camRgb.setPreviewSize(812, 608)
camRgb.setIspNumFramesPool(1)
camRgb.setBoardSocket(dai.CameraBoardSocket.RGB)
camRgb.setColorOrder(dai.ColorCameraProperties.ColorOrder.RGB)
# Slightly lower FPS to avoid lag, as ISP takes more resources at 12MP
camRgb.setFps(3)
xoutIsp = pipeline.create(dai.node.XLinkOut)
xoutIsp.setStreamName("isp")
camRgb.isp.link(xoutIsp.input)
# Use ImageManip to resize to 300x300 with letterboxing
manip = pipeline.create(dai.node.ImageManip)
manip.setMaxOutputFrameSize(812 * 608 * 3) # 300x300x3
rgbRr = dai.RotatedRect()
rgbRr.center.x, rgbRr.center.y = camRgb.getPreviewWidth() // 2, camRgb.getPreviewHeight() // 2
rgbRr.size.width, rgbRr.size.height = camRgb.getPreviewHeight(), camRgb.getPreviewWidth()
rgbRr.angle = 90
manip.initialConfig.setCropRotatedRect(rgbRr, False) #manip.initialConfig.setCropRect(0, 0, 1, 1)
manip.initialConfig.setResizeThumbnail(512, 512)
#manip.initialConfig.setRotation(-90)
#manip.initialConfig.setRotationDegrees(90)
camRgb.preview.link(manip.inputImage)
# NN to demonstrate how to run inference on full FOV frames
nn = pipeline.create(dai.node.MobileNetDetectionNetwork)
nn.setConfidenceThreshold(0.5)
nn.setBlobPath("v4.blob")
manip.out.link(nn.input)
xoutNn = pipeline.create(dai.node.XLinkOut)
xoutNn.setStreamName("nn")
nn.out.link(xoutNn.input)
xoutRgb = pipeline.create(dai.node.XLinkOut)
xoutRgb.setStreamName("rgb")
nn.passthrough.link(xoutRgb.input)`
I now get this:
It might be the manip.initialConfig.setResizeThumbnail(512, 512) that does not work well with it