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.4.0.tar.gz
(7.9 kB
view hashes)
Built Distributions
Close
Hashes for camerata-0.4.0-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8eb6346918a6c18f834cf5bb9dcbe64f62ec8c25de252e63960bd6a0afea856 |
|
MD5 | dc85142945b37fdc2c20a1a560603caf |
|
BLAKE2b-256 | 07a68ecfa71207dd69b97adbbaef1f204ccab072cdb6d9b5b37020981bb10b1e |
Close
Hashes for camerata-0.4.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2112ba2b897275557f405abddca8ae0f4a3cf435998e8e07487dbd556175287 |
|
MD5 | 07c985cc201b111a91e7158480f9eca7 |
|
BLAKE2b-256 | f4c3ff3a345f837adeb9d81a0cfaf6695a2f2ea92d28bac641615c9fb7f6a13b |
Close
Hashes for camerata-0.4.0-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28510992f63ba152250dbb51d3a90506b0ee73b251ad784b303e1839352abd91 |
|
MD5 | 2cfe917c1f58a84d685814cebf71be39 |
|
BLAKE2b-256 | 20826885a8b7f07245fbfe4eebd57bcc7a8dc49b99e70d28f65e3020faa9605d |
Close
Hashes for camerata-0.4.0-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc028890d8432477f041f8468c56fd22bb7092c019b95eb35b51fa0f4b35e7bb |
|
MD5 | df95a96a9246e766084cfe96ee087906 |
|
BLAKE2b-256 | 0be1efd985f256c4b888cc6f80fb47b9e84ee2c738229bf05ff7f1d6e8e00efe |
Close
Hashes for camerata-0.4.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9eb1281b37051077d1f1d139107db71d61b7979c1ec8171aa417f4a73025bc22 |
|
MD5 | 69cfb51861f9a045e37d727facee355a |
|
BLAKE2b-256 | a7da62dad4e93770b2edef83a64d98625f52978edf62715b35d91fc753410497 |