Skip to content

ImageManip changes image with no transformations applied #1251

Description

@arthurkehrwald
import depthai as dai
import cv2

with dai.Pipeline() as pipeline:
    # This might improve reducing the latency on some systems
    pipeline.setXLinkChunkSize(0)
    cam_l = pipeline.create(dai.node.Camera).build(dai.CameraBoardSocket.CAM_B)
    manip = pipeline.create(dai.node.ImageManip)

    cam_out = cam_l.requestOutput((1280, 720))
    cam_out.link(manip.inputImage)

    cam_q = cam_out.createOutputQueue(1, False)
    manip_q = manip.out.createOutputQueue(1, False)

    pipeline.start()

    showing_manip = False
    while True:
        frame = cam_q.get()
        manip_frame = manip_q.get()
        cv2.imshow("frame", manip_frame.getCvFrame() if showing_manip else frame.getCvFrame())
        if cv2.waitKey(1) ==ord('s'):
            showing_manip = not showing_manip
            print("Showing manip" if showing_manip else "Showing original")

When I run this with my Oak D Pro, the output from ImageManip is sqished vertically by one pixel. The last row is black. I don't think it should do that when no transformations are applied.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions