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.2.tar.gz
(5.3 kB
view hashes)
Built Distributions
Close
Hashes for camerata-0.1.2-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a02a57897812fc3b8623681efb848581146d1f8876c038c2b17d33d9030c1d2 |
|
MD5 | 7a15c806608e68e59814c380d73f270b |
|
BLAKE2b-256 | 666676fce8322c19681a8dea71a419c0316b611fc2878e5c17907e6ca81528ed |
Close
Hashes for camerata-0.1.2-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27492f98c40c89c455244a2b865c97195217d583baa51365a05511045fb45168 |
|
MD5 | 2484c731330325b33235ea87ac600e24 |
|
BLAKE2b-256 | 45aee9c6db6fa6c999bd5845875877872e7809e98111b8f4686ab34cec50fb9b |
Close
Hashes for camerata-0.1.2-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9b64bc341650634ccd371bdffcb3b82829d6ae8bcc37a570c9d6d45a0259f8f |
|
MD5 | 59f4a90ffcc67b08190ca1773c65b88f |
|
BLAKE2b-256 | 70ba723efe1cc887e9bf5a6371884a5d4c250106cbc88ade333cd91d2d5d46c3 |
Close
Hashes for camerata-0.1.2-cp39-cp39-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c1fe074e5c8577bc5a3dd4daac13162f965e13c124b229fadc2ceeae180ac7d |
|
MD5 | 1b53cda5c8b62ad694bd24aa828bd3cb |
|
BLAKE2b-256 | 7bfe6ff86057e297537a97654e9614401ef46c56632ef084e7e51e2a6e2a33b6 |
Close
Hashes for camerata-0.1.2-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 631943037fceca8a8fd1ca3b6082bc1c5ffffdcf4c76dc02de02696e47e4cd1c |
|
MD5 | 0e53adb14b349e7e7fb55d7da6e2e473 |
|
BLAKE2b-256 | 7f172efea03053a5f3b3f93235f0f45bfd1b0c71e9d5b699f286258f4e4a2363 |