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.1.tar.gz (10.3 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.1-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

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

Hashes for omnicam-0.1.1.tar.gz
Algorithm Hash digest
SHA256 20cf8daf7e49e7d775a0b2d9db121168c192d61eab68b72a126b7c813140b930
MD5 015f4a3170409f9f895c82b4a955b0b7
BLAKE2b-256 7ea0ca437aa6fda1a123c4d39642d2a3e5f8a7db55a3c20555453a565ad44855

See more details on using hashes here.

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

Hashes for omnicam-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 619f142e03b6f3a4131dbc4a24e861361a51df9c27574973f477ca5b5a3c77a5
MD5 425283d60ce3a7d766aea8e74798f199
BLAKE2b-256 08f80ac63a8a5019f9b1077f003a9be2ec6e3332871081764fed739bc1a281cb

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