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.1.1.tar.gz
(5.3 kB
view hashes)
Built Distributions
Close
Hashes for camerata-0.1.1-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 745d347006393c33b3ef7c88136a9d9d712a9cd137f79e78118392f83a06bfdb |
|
MD5 | 20a28dd8a5123fb477e1f72045bcb908 |
|
BLAKE2b-256 | c9f4b4f845884d33a5280401ca925d4ceb4308dd5022ca5ab7fec52ba85e4670 |
Close
Hashes for camerata-0.1.1-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 329c9987c16587a33a55711491c9b0e6132cf7bed2b257933a7b564580c76a94 |
|
MD5 | 5c4b810b7af082f26271ba594c5a6d78 |
|
BLAKE2b-256 | 1e041e040f234ac1115b34e7f44180a6917425aeaf5e4700fa0c77936f28e950 |
Close
Hashes for camerata-0.1.1-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b0c1a04097f9df24437335a28e4ccd633302cf360fd75743e29e749ec94c882 |
|
MD5 | 4a46791d328bea21b0e09995d27ece0c |
|
BLAKE2b-256 | 10a932ebbf50c4a7aa803744a7488e6ab85086984ffce3df0e19f2940b9ed684 |
Close
Hashes for camerata-0.1.1-cp39-cp39-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff37663860947c3181b71f145e828fb81375f6da1a6534e09f6f588151467713 |
|
MD5 | 5a39de4fa577d9593022c3d60f51971c |
|
BLAKE2b-256 | e9e6e49eadaa3656540932684a968fee6aeb7d6a35cfa14b32c52418f5ea0490 |
Close
Hashes for camerata-0.1.1-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91dc4f6246780cd133f62bab126b21eaea7ad4def995754a4ab6d5cee35dea2a |
|
MD5 | fea81f2d90b4faa6f6444050fe318991 |
|
BLAKE2b-256 | f4dcfc657a3c3d7eb0b2092d0dd633df915e8d84279aff1abb36542e4adc50d6 |