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.0.tar.gz
(10.2 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.0-py3-none-any.whl
(11.9 kB
view details)
File details
Details for the file omnicam-0.1.0.tar.gz.
File metadata
- Download URL: omnicam-0.1.0.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fd57d38dc40ac303422c06a696cecce4cef25b559eb5c59599b3296c8ecbb53
|
|
| MD5 |
daf19ef3ccce812f70d2449c5ba7f0aa
|
|
| BLAKE2b-256 |
8cd6915cb3b352da85bd31a112497d31cb9555a4d62167c1aec2fa40ac5c6fc7
|
File details
Details for the file omnicam-0.1.0-py3-none-any.whl.
File metadata
- Download URL: omnicam-0.1.0-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 |
76ebc13647c13c4fb0cde9bc8c99e4f77cfbf427a06d78849a435e23b835ca00
|
|
| MD5 |
16154ab5dd1dc65f50a35f3583694720
|
|
| BLAKE2b-256 |
455cd14be30e867aaedc947464d86c5a086176446ff54dc76833825fe1aa334e
|