Skip to main content

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 BaseCamera interface 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

  • numpy is required. OpenCV-based backends need omnicam[opencv].
  • GStreamer and Gazebo features rely on system-level tooling.

License

MIT. See LICENSE.

Project details


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

omnicam-0.1.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

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

Hashes for omnicam-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0fd57d38dc40ac303422c06a696cecce4cef25b559eb5c59599b3296c8ecbb53
MD5 daf19ef3ccce812f70d2449c5ba7f0aa
BLAKE2b-256 8cd6915cb3b352da85bd31a112497d31cb9555a4d62167c1aec2fa40ac5c6fc7

See more details on using hashes here.

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

Hashes for omnicam-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76ebc13647c13c4fb0cde9bc8c99e4f77cfbf427a06d78849a435e23b835ca00
MD5 16154ab5dd1dc65f50a35f3583694720
BLAKE2b-256 455cd14be30e867aaedc947464d86c5a086176446ff54dc76833825fe1aa334e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page