Skip to main content

跨平台摄像头枚举与管理模块,支持 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

automated_planting_camera-1.0.3.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

automated_planting_camera-1.0.3-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file automated_planting_camera-1.0.3.tar.gz.

File metadata

File hashes

Hashes for automated_planting_camera-1.0.3.tar.gz
Algorithm Hash digest
SHA256 9ca914893301704a3efc71c0e682f1b21f41e044548d30bd45b5b09b95524c6d
MD5 6440e6f537c6efe70259db941099cf61
BLAKE2b-256 a60170789a9bd28bfe48c83420dbf02511a72a9bf6682228a4080ce628ff336a

See more details on using hashes here.

File details

Details for the file automated_planting_camera-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for automated_planting_camera-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 17ef82b8d0a4435fa8d25d18276de4380732c0eb1977a6f80c5f31cfd3afa5ff
MD5 642628ba064d34a7eccec3dc7568e025
BLAKE2b-256 5440e720fbfd72c9968d050bb89fe1494642e202608aa1bf0de59beeb11f44e6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page