Reputation: 11
I want to capture a single frame with my Luxonis OAK-D camera (OpenCV AI Kit) implemented in Python (DepthAi). When I use a small resolution (like 300x300) everything works fine. When the resolution is higher (like 640x640), the image presented is not the current one, but an old one. The image captured is displayed after a few frames. It seems like the frame are in a buffer and lagging behind.
Here is my code, "maxSize" is set to 1 and "blocking" is disabled.
with dai.Device(pipeline) as device:
qRgb = device.getOutputQueue(name="rgb", maxSize=1, blocking=False)
inRgb = qRgb.get()
cv2.imshow("rgb", inRgb.getCvFrame())
while True:
if cv2.waitKey(1) == ord('a'):
inRgb = qRgb.get()
cv2.imshow("rgb", inRgb.getCvFrame())
I also tried to get the frame faster (always with a key event) with an "getQueueEvent" or with a "CameraControl(setCaptureStill)", without success.
How can i caputre a single frame as fast as possible with my OAK-D?
Upvotes: 1
Views: 922