Skip to main content

No project description provided

Project description

Camerata

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

Examples

Query available cameras:

print(*camerata.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 camerata
import time
cam = camerata.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

camerata-0.5.0.tar.gz (18.8 kB view hashes)

Uploaded Source

Built Distributions

camerata-0.5.0-cp310-cp310-manylinux_2_34_x86_64.whl (10.9 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.34+ x86-64

camerata-0.5.0-cp39-none-win_amd64.whl (300.4 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

camerata-0.5.0-cp39-cp39-macosx_10_7_x86_64.whl (530.8 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