Hi all,
my PiCam class looks like thisdoes it need to sleep 2 seconds everytime when capturing or just one time when initializing the PiCam object?
usecase is to capture the image every second, right now it will take 3 seconds
Thanks
Piyush
my PiCam class looks like this
Code:
class PiCam: def __init__(self): try: self.camera = picamera2.Picamera2() self.image = BytesIO() except Exception as error: raise Exception('Expected camera device not detected %s ', error) def capture(self): self.camera.start_preview() self.camera.start() time.sleep(2) self.camera.capture_file(self.image, format="jpeg") self.camera.stop_preview()
usecase is to capture the image every second, right now it will take 3 seconds
Thanks
Piyush
Statistics: Posted by piyush574 — Fri May 10, 2024 9:31 am