2

I've been looking into using picamera and so far I've managed to capture a sequence of images and process them, but found the time it takes between frame captures is horrible(ish), so i turned to using a video stream instead, but unfortunately due to my sub-level of understanding (I'm still learning how to read code viably and use it in my own way) I'm unable to grasp and actually achieve this, but the example that I got working from the API Video to stream

import io
import picamera

stream = io.BytesIO()
with picamera.PiCamera() as camera:
    camera.resolution = (640, 480)
    camera.start_recording(stream, format='h264', quality=23)
    camera.wait_recording(15)
    camera.stop_recording()

from here I understand that I can access the start of the stream by using stream.seek(0) but I would like to be able to take every nth frame and process it accordingly (using PIL).

I know how to use PIL (its straight forward to put stream into a PIL image but only the first frame) to manipulate frames but I'd just like to be able to get this part working effectively.

Thank you for your time.

0

Well since there has been no answer I found a work around with example:Processing frames

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.