Skip to content

Shadow2223/shadow_camera

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎥 RealSense 相机捕获工具

简单、易用的 Intel RealSense 相机数据采集工具,支持多相机同步、动态保存策略切换和图像处理。

✨ 主要特性

  • 🎮 实时按键控制 - 运行时动态切换保存模式
  • 🤖 智能保存策略 - 手动、定时、相似度三种模式
  • 📷 多相机支持 - 支持多个相机同步采集
  • 📊 完整日志系统 - 结构化日志,便于调试
  • 🔧 参数实时调节 - 运行时调整间隔和阈值
  • 💾 深度+彩色 - 同时保存彩色和深度图像

🚀 快速开始

1. 安装依赖

pip install -e .

2. 连接相机并运行

# 完整示例:多种使用方式
python example_usage.py

3. 基本操作

  • s 保存图片
  • 1/2/3 切换保存模式
  • q 退出程序

📖 文档指南

文档 说明 适合人群
小白入门指南.md 详细的新手教程,包含常见问题 🔰 初学者
example_usage.py 完整使用示例代码 👨‍💻 所有用户

🎮 按键控制

按键 功能 说明
s 手动保存 保存当前所有相机的画面
1 手动模式 只有按s键才保存
2 定时模式 每隔N帧自动保存
3 相似度模式 画面变化时自动保存
+ 增加参数 增加间隔/阈值
- 减少参数 减少间隔/阈值
q 退出 关闭程序

💡 使用场景

📸 数据采集

# 批量数据采集
capture = CameraCapture(
    save_strategy="interval",
    save_interval=60,
    camera_names=["left", "right"]
)

🏃 差异保存

# 相似度保存
capture = CameraCapture(
    save_strategy="similarity", 
    similarity_threshold=0.85
)

🎯 精确控制

# 手动精确控制
capture = CameraCapture(
    save_strategy="manual",
    save_depth=True
)

📁 文件结构

项目根目录/
├── src/camera_capture/
│   ├── camera_captrue.py      # 主要功能类
│   └── ...
├── save/                      # 默认保存目录
│   ├── color/                 # 彩色图像
│   └── depth/                 # 深度图像
├── example_usage.py           # 使用示例
└── README.md                  # 说明文档

⚙️ 系统要求

  • 操作系统: Windows 10/11, Linux Ubuntu 18.04+
  • Python: 3.7+
  • 硬件: Intel RealSense D400系列相机
  • 接口: USB 3.0 或更高

🔧 配置参数

参数 说明 默认值 推荐范围
save_strategy 保存策略 "manual" "manual"/"interval"/"similarity"
save_interval 定时间隔 30帧 10-200帧
similarity_threshold 相似度阈值 0.95 0.7-0.99
save_depth 保存深度图 True True/False

🐛 故障排除

常见问题

  1. 相机未找到: 检查USB连接和驱动
  2. 程序崩溃: 确保没有其他程序占用相机
  3. 保存失败: 检查磁盘空间和文件权限

调试技巧

# 启用详细日志
import logging
logging.getLogger('camera_capture').setLevel(logging.DEBUG)

🤝 贡献

欢迎提交 Issue 和 Pull Request!

📄 许可证

本项目采用 MIT 许可证。


💡 小贴士: 第一次使用建议阅读小白入门指南.md,包含详细的步骤说明和常见问题解答。

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages