No project description provided
Project description
OmniCamera
A library for querying and capturing from cameras, based on nokhwa crate.
Examples
Query available cameras:
print(*omni_camera.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 omni_camera
import time
cam = omni_camera.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
omni_camera-0.6.0.tar.gz
(18.8 kB
view hashes)
Built Distributions
Close
Hashes for omni_camera-0.6.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77d4637a761ce90e1b8a3c2178f1326ead17aee1a94681495a6c5cda7dd2fb54 |
|
MD5 | 825256d88734febdf3107326f3981063 |
|
BLAKE2b-256 | 88ed0c4080c6498649e6bf3de00e7862209c0940c544149702addec479185166 |
Close
Hashes for omni_camera-0.6.0-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7e1e6268e3c8a12c3e52bf3b2fbc842d12f1dc2a07007867dd18e88eeeb6898 |
|
MD5 | cb51a26392fcc38d5b69c61c038890f0 |
|
BLAKE2b-256 | 359b638562a02f087bd7a3acea63915d68be66632b623a29a4df7ea368532b08 |
Close
Hashes for omni_camera-0.6.0-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5afa74304bc44854afa042091d0b84a73874c3584b613a76891a89db9cfa522 |
|
MD5 | 25a4ea86f834847b6724cc811e8e253b |
|
BLAKE2b-256 | b6b7ed81f56216647dd95c1d2816538e9555a864072fff18427fe3029b146505 |