I have purchase OAK-1 Lite.
I have to capture only image. Its working, but I have to do it very fast.
What are different optimization for capturing image only?
import depthai as dai
import cv2
pipeline = dai.Pipeline()
cam_rgb = pipeline.createColorCamera()
cam_rgb.setBoardSocket(dai.CameraBoardSocket.RGB)
cam_rgb.setResolution(dai.ColorCameraProperties.SensorResolution.THE_1080_P)
#cam_rgb.setAutoExposureEnable(True)
xout = pipeline.createXLinkOut()
xout.setStreamName("video")
cam_rgb.video.link(xout.input)
with dai.Device(pipeline) as device:
while True:
frame = device.getOutputQueue(name="video", maxSize=4, blocking=False).get()
img = frame.getCvFrame()
cv2.imshow("OAK Image", img)
cv2.imwrite("C:\depthai\demo_code\save_image\captured_image.jpg", img)
break
if cv2.waitKey(1) == ord('q'):
break
cv2.destroyAllWindows()