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.3.tar.gz
(5.3 kB
view hashes)
Built Distributions
Close
Hashes for camerata-0.1.3-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31b81fb9e6dac8f4effa6a3378025fe3e863b38c00b5a48cc9fd32f75eed4b38 |
|
MD5 | bf6cd60083ca10944f562d9f585dccb0 |
|
BLAKE2b-256 | 32aced30b28bc3e35f03015c1af663293d5ecef9e5764e4e9b28c64ead4c24d0 |
Close
Hashes for camerata-0.1.3-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 471d754accbdf642b649ec4fc31347fadac898615c0578ba70a7db397725a87e |
|
MD5 | 5d0e66a5eab726462f4b792c7b7b7b1c |
|
BLAKE2b-256 | 389dc009f5e7e78cea63f38e3f7a15fd4992cd8a4fcfda33a79bc3d03d532b04 |
Close
Hashes for camerata-0.1.3-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf7a9ad0d4fa1066f82b6b091c7e3d9234dfa4a899b9fe10853d956df01ce2c9 |
|
MD5 | 3e17cd090cedf5efb5f965b75851dc44 |
|
BLAKE2b-256 | d343fca3a2d06740459af86ce2316f165df8f38363896bdc9ec5a5d2906ddc77 |
Close
Hashes for camerata-0.1.3-cp39-cp39-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ad9c2e6fb3870ef28bced75c9ad806eb0158c447f50a222b2e5aaaf013a3d41 |
|
MD5 | b173bc281eb13ac1ff2bba7de6f1024c |
|
BLAKE2b-256 | f4d27988bcb35906189b6b08a3058bb91662ea36feb40b362edd809fb9ddca5c |
Close
Hashes for camerata-0.1.3-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 130a2dfc04897ac39e6f475628ea9ba7edd2eef10a60a2000ac97579f57cf979 |
|
MD5 | 5a5959b30b49eb9ece892e00f7a02239 |
|
BLAKE2b-256 | 55781ddbbbc0ab69d3cfb720ba699b3320fddb27f7f658185113d2e112209a20 |