Skip to main content

No project description provided

Project description

OmniCamera

A library for querying and capturing from cameras, based on nokhwa crate.

Examples

Query available cameras:

print(*omni_camera.query(), sep='\n')

Example output:

CameraInfo(index=2, name='UVC Camera (046d:0809)', description='Video4Linux Device @ /dev/video2', misc='')
CameraInfo(index=0, name='USB2.0 VGA UVC WebCam: USB2.0 V', description='Video4Linux Device @ /dev/video0', misc='')

Save an image (note: requires pillow to be installed):

import omni_camera
import time
cam = omni_camera.Camera(camerata.query()[0]) # Open a camera
while cam.poll_frame_pil() is None: # Note that .poll_frame_* functions never blocks
    time.sleep(0.1) # Wait until we get at least one frame from the camera
#time.sleep(1) # You might want to wait a bit longer while camera is calibrating
img = cam.poll_frame_pil()
img.save("img.png")

See examples/ for more

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

omni_camera-0.6.0.tar.gz (18.8 kB view hashes)

Uploaded Source

Built Distributions

omni_camera-0.6.0-cp310-cp310-manylinux_2_34_x86_64.whl (451.4 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.34+ x86-64

omni_camera-0.6.0-cp39-none-win_amd64.whl (300.5 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

omni_camera-0.6.0-cp39-cp39-macosx_10_7_x86_64.whl (530.9 kB view hashes)

Uploaded CPython 3.9 macOS 10.7+ x86-64

Supported by

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