Simple, libv4l2-based frame grabber
Project description
Installation
Libv4l2
Libv4l2 is packaged by various distributions:
Debian and Ubuntu
# apt-get install libv4l-dev
Fedora
# dnf install libv4l-devel
Arch Linux
# pacman -S v4l-utils
PyV4L2Camera
To install PyV4L2Camera make sure you have Cython installed and type:
$ pip install PyV4L2Camera
PyV4L2Camera is only compatible with Python 3.
Usage
from PyV4L2Camera.camera import Camera
camera = Camera('/dev/video0')
frame = camera.get_frame()
The returned frame is of bytes type and contains pixels packed using RGB24 format. To learn more see V4L2_PIX_FMT_RGB24 description.
Example of frames to numpy arrays conversion can be found in the examples directory.
Contributions
Contributions are always welcome!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
PyV4L2Camera-0.1a1.tar.gz
(28.0 kB
view hashes)