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
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
camerata-0.5.0.tar.gz
(18.8 kB
view hashes)
Built Distributions
Close
Hashes for camerata-0.5.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2aab4baac203e4219e2d50f52b6e98530c0ac87266b7117ae2db4e218f1e5e3 |
|
MD5 | 9adfd0610abaec97e4aa010d4005842b |
|
BLAKE2b-256 | d66071969a0e94e732f9e8d2a100e08e0ea1a350bf540a294fa3c80849467261 |
Close
Hashes for camerata-0.5.0-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 092b22c0a621a502d3e28c86467f7caef56fcf57b1d4410869ab012179b46bec |
|
MD5 | d494e91a2acfb0a45053ec79be94cf67 |
|
BLAKE2b-256 | cf6a768195932b89f12ad0dd8d35432e022000516efad0e3a6daa321622fe436 |
Close
Hashes for camerata-0.5.0-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2597d7d5192dc0e19bc18dfe6f02dfdee78ff7ce714a6e7c0dd0a9b05d60862 |
|
MD5 | b49364a5b1b6f8bc86e110e80a531188 |
|
BLAKE2b-256 | e114590b1148c92adcbca503f29b785b4520b45adb1ec7d88e13dc0959abc63e |