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.3.0.tar.gz
(6.6 kB
view hashes)
Built Distributions
Close
Hashes for camerata-0.3.0-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95a0c096ae152cbed24eea2a8ff18d9833f0ca6ee2a0aa82342ed5cac7675929 |
|
MD5 | c96ba662fca4d26fb794392a5aece1b2 |
|
BLAKE2b-256 | 17eceed4515095d999c79645c86bf4dbd30742ec12b5a541ccf6eed11ec5fd25 |
Close
Hashes for camerata-0.3.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad53181b810caa31997e33a000d41ae5508d93acb54b42bfcdf07adab33fbd0a |
|
MD5 | dbabfb4b6b8297c300e8033ca6a782fa |
|
BLAKE2b-256 | d024c80c2bef2bbc51f902ef57969fdd55fa97ddc484b5535a0aa123fe5c5bd0 |
Close
Hashes for camerata-0.3.0-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b031ccc4c32f600cce9797676550166c9e1126995b6646879986cf8cf79db80b |
|
MD5 | 4bbc17ae77d95abeb9683b070d6b2fbc |
|
BLAKE2b-256 | 7b4b9f213533a1c58a9fe28111f305bbd6eeed13b59bec80a9ffccbcbe3f5960 |
Close
Hashes for camerata-0.3.0-cp39-cp39-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0089916af76d1a44930f976df4dd8c88aa16830017f1d6f629e7b0ecac0270f |
|
MD5 | 5958759a8d907ca6c71a7c6edf36b7a0 |
|
BLAKE2b-256 | e8d2061616448a6330daeb0e56545c8e6f91b6793ebacdad934cec38baaa449c |
Close
Hashes for camerata-0.3.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de20bdfcffd87dafb56094c62a610f14000bdbeded8e28a027d18c6003b73aef |
|
MD5 | bcd8cf6273b5beb14957da963d76d53a |
|
BLAKE2b-256 | c7b9b248d9f1394a610bfa52edd5c885ac0b31b706b1f1ff2f6b69279a05f707 |