跨平台摄像头枚举与管理模块,支持 Windows、Linux、macOS 系统
Project description
automated-planting-camera
跨平台摄像头枚举与管理模块,支持 Windows、Linux、macOS 系统。
功能特性
- 摄像头枚举与信息获取
- 单个摄像头操作(打开、读取、释放)
- 上下文管理器支持(with 语句)
- 摄像头测试与分辨率探测
- MJPEG 格式多分辨率兼容性测试
- 跨平台支持(Windows、Linux、macOS)
安装
pip install automated-planting-camera
依赖
- Python >= 3.8
- opencv-python >= 4.5.0
快速开始
from automated_planting_camera import list_cameras, CameraManager
# 列出所有可用摄像头
cameras = list_cameras()
for cam in cameras:
print(f"摄像头 {cam.index}: {cam.name}, {cam.width}x{cam.height} @ {cam.fps}fps")
# 使用 CameraManager 管理摄像头
manager = CameraManager()
# 测试摄像头
manager.test_camera(0, display=True, duration=5)
主要类和函数
CameraInfo: 摄像头信息数据类Camera: 单个摄像头操作类,支持上下文管理器CameraManager: 摄像头管理器类list_cameras(): 便捷函数,列出所有可用摄像头get_all_cameras(): 获取所有摄像头信息get_system_info(): 获取系统信息print_troubleshooting_guide(): 打印故障排查指南
许可证
MIT License
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file automated_planting_camera-1.0.3.tar.gz.
File metadata
- Download URL: automated_planting_camera-1.0.3.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ca914893301704a3efc71c0e682f1b21f41e044548d30bd45b5b09b95524c6d
|
|
| MD5 |
6440e6f537c6efe70259db941099cf61
|
|
| BLAKE2b-256 |
a60170789a9bd28bfe48c83420dbf02511a72a9bf6682228a4080ce628ff336a
|
File details
Details for the file automated_planting_camera-1.0.3-py3-none-any.whl.
File metadata
- Download URL: automated_planting_camera-1.0.3-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17ef82b8d0a4435fa8d25d18276de4380732c0eb1977a6f80c5f31cfd3afa5ff
|
|
| MD5 |
642628ba064d34a7eccec3dc7568e025
|
|
| BLAKE2b-256 |
5440e720fbfd72c9968d050bb89fe1494642e202608aa1bf0de59beeb11f44e6
|