what should the general approach be? This is the camera source flow through two nodes. The crop node works fine but I am not seeing the face recognition working when I add the rotation:
# Define source and output
camRgb = pipeline.create(dai.node.ColorCamera)
xoutVideo = pipeline.create(dai.node.XLinkOut)
xoutVideo.setStreamName("video")
# Properties
camRgb.setBoardSocket(dai.CameraBoardSocket.RGB)
camRgb.setResolution(dai.ColorCameraProperties.SensorResolution.THE_1080_P)
camRgb.setVideoSize(1920, 1080)
camRgb.setPreviewSize(300, 300)
xoutVideo.input.setBlocking(False)
xoutVideo.input.setQueueSize(1)
# Create MobileNet detection network
mobilenet = pipeline.create(dai.node.MobileNetDetectionNetwork)
mobilenet.setBlobPath(
blobconverter.from_zoo(name="face-detection-retail-0004", shaves=3)
)
mobilenet.setConfidenceThreshold(0.7)
crop_manip = pipeline.createImageManip()
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
crop_manip.initialConfig.setCropRotatedRect(rgbRr, False)
camRgb.isp.link(crop_manip.inputImage)
crop_manip2 = pipeline.create(dai.node.ImageManip)
crop_manip2.initialConfig.setResize(300, 300)
crop_manip2.initialConfig.setFrameType(dai.ImgFrame.Type.BGR888p)
crop_manip.out.link(crop_manip2.inputImage)
crop_manip2.out.link(mobilenet.input)