I want to place the my OAK-D Pro camera vertically, and use the depth output. After following this example, so I implemented a 90° rotation for both mono cameras like this:
# Initial setup
pipeline = dai.Pipeline()
monoLeft = pipeline.create(dai.node.MonoCamera)
monoRight = pipeline.create(dai.node.MonoCamera)
stereo = pipeline.create(dai.node.StereoDepth)
xoutDepth = pipeline.create(dai.node.XLinkOut)
xoutDepth.setStreamName("depth")
[...]
# Rotation
print("Rotating cameras...")
rotated_rect = dai.RotatedRect()
rotated_rect.center.x, rotated_rect.center.y = frame_width // 2, frame_height // 2
rotated_rect.size.width, rotated_rect.size.height = frame_height, frame_width
rotated_rect.angle = 90
manip_mono_left = pipeline.create(dai.node.ImageManip)
manip_mono_left.initialConfig.setCropRotatedRect(rotated_rect, False)
manip_mono_right = pipeline.create(dai.node.ImageManip)
manip_mono_right.initialConfig.setCropRotatedRect(rotated_rect, False)
# Linking
monoLeft.out.link(manip_mono_left.inputImage)
monoRight.out.link(manip_mono_right.inputImage)
manip_mono_left.out.link(stereo.left)
manip_mono_right.out.link(stereo.right)
Unfortunately, once the rotation is applied, the image is very noisy and depth "broken".
Here are two screenshots from the depth output, pointing at same scene: the first one is without rotation, the second is with the 90° rotation.


Am I missing something here? 🤔