A Python package for camera utilities
Project description
omnicam
A small, unified API for reading frames from USB cameras, IP streams, video files, screen capture, and Raspberry Pi cameras.
Features
- Unified
BaseCamerainterface across backends - OpenCV-based capture for USB webcams, video files, RTSP/HTTP streams, and GStreamer pipelines
- Optional Raspberry Pi Camera support (Picamera2)
- Optional screen capture via
mss
Installation
pip install omnicam
Optional extras:
pip install omnicam[opencv]
pip install omnicam[screen]
pip install omnicam[pi]
Quickstart
from omnicam import SimpleCamera
with SimpleCamera(index=0) as cam:
cam.open()
frame = cam.read()
if frame is not None:
print(frame.shape)
Camera types
from omnicam import FileCapture, InternetCapture, ScreenCapture
# Video file
cam = FileCapture("/path/to/video.mp4")
# IP camera or MJPEG stream
cam = InternetCapture("http://192.168.1.10:8080/video")
# Screen capture (requires omnicam[screen])
cam = ScreenCapture(index=1)
Raspberry Pi camera
from omnicam import PiCamera
cam = PiCamera(model="IMX219", resolution="720p")
GStreamer and Gazebo
from omnicam import GStreamerCapture, GazeboCamera
pipeline = (
GStreamerCapture.GstPipeline()
.add("v4l2src", device="/dev/video0")
.add("videoconvert")
.add("appsink")
)
cam = GStreamerCapture(pipeline)
# Gazebo (requires gz tools available on PATH)
cam = GazeboCamera(topic_name="my_camera")
Notes
numpyis required. OpenCV-based backends needomnicam[opencv].- GStreamer and Gazebo features rely on system-level tooling.
License
MIT. See LICENSE.
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
omnicam-0.1.1.tar.gz
(10.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
omnicam-0.1.1-py3-none-any.whl
(11.9 kB
view details)
File details
Details for the file omnicam-0.1.1.tar.gz.
File metadata
- Download URL: omnicam-0.1.1.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20cf8daf7e49e7d775a0b2d9db121168c192d61eab68b72a126b7c813140b930
|
|
| MD5 |
015f4a3170409f9f895c82b4a955b0b7
|
|
| BLAKE2b-256 |
7ea0ca437aa6fda1a123c4d39642d2a3e5f8a7db55a3c20555453a565ad44855
|
File details
Details for the file omnicam-0.1.1-py3-none-any.whl.
File metadata
- Download URL: omnicam-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
619f142e03b6f3a4131dbc4a24e861361a51df9c27574973f477ca5b5a3c77a5
|
|
| MD5 |
425283d60ce3a7d766aea8e74798f199
|
|
| BLAKE2b-256 |
08f80ac63a8a5019f9b1077f003a9be2ec6e3332871081764fed739bc1a281cb
|