AdamSpannbauer / python_video_stab

A Python package to stabilize videos using OpenCV
https://adamspannbauer.github.io/python_video_stab/html/index.html
MIT License
682 stars 118 forks source link

Better RPI camera support #113

Open Howie9600 opened 4 years ago

Howie9600 commented 4 years ago

Hello I have been trying to get the code to work on live rpi camera. It says to use 0 or 1 but its not working. Any help would be awesome.

Thanks

AdamSpannbauer commented 4 years ago

I think more integrated pi camera support is warranted. I'm going to change this from a bug to a feature request and rename.

If you need an immediate fix. You can view this blog post from pyimagesearch on accessing the streaming video from picamera and pair that with the .stabilize_frame() method.

Howie9600 commented 4 years ago

Ok thank you I will try that now. I'm a bit confused with the .stabilze_frame tho.

Howie9600 commented 4 years ago

which part would i add the .stabilize

AdamSpannbauer commented 4 years ago

You would need to adapt the code snippet shown here to meet your needs. You would replace the cv2.VideoCapture() with how to read from picamera as shown in the linked blog.