pyusbcameraindex
Identify and select your USB cameras in Python for use with OpenCV.
🚀🤯 Stop guessing the camera index in OpenCV! 🤯🚀
The pyusbcameraindex package enumerates USB video devices on Windows using DirectShow APIs.
Linux and Mac are not supported, but pull requests are welcome.
Usage:
import cv2
from pyusbcameraindex import enumerate_usb_video_devices_windows
# List the devices.
devices = enumerate_usb_video_devices_windows()
for device in devices:
print(f"{device.index} == {device.name} (VID: {device.vid}, PID: {device.pid}, Path: {device.path}")
# Show a frame from each.
for device in devices:
cap = cv2.VideoCapture(device.index, cv2.CAP_DSHOW)
ret, frame = cap.read()
cv2.imshow(f"Device={device.name}", frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
Release files for pyusbcameraindex 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyusbcameraindex-1.0.1.tar.gz | 5.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyusbcameraindex-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.3 kB
Release files / pyusbcameraindex-1.0.1.tar.gz
| Download URL | pyusbcameraindex-1.0.1.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
88b1c42d7cb98745129f652140264b912f58976b917a6f285872ab9a3d06cd4c
|
|
BLAKE2b-256 checksum How to use checksums |
0fdbbe5dbb838328c4bd7d74960f0fb8bc3ab6aea3f4ee3dd2e0578851d36fc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.15.1 CPython/3.11.9 Windows/10
|
Release files / pyusbcameraindex-1.0.1-py3-none-any.whl
| Download URL | pyusbcameraindex-1.0.1-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e3fe457bf6085466912f952b7b9338ae5aed99684cb144fc7b1e591beb83dee8
|
|
BLAKE2b-256 checksum How to use checksums |
24fbac5b6197953f21b785b910905906278cfc0b286fda279987a47b03ae30cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.15.1 CPython/3.11.9 Windows/10
|