- 添加完整的项目文档(README.md, design.md, CLAUDE.md) - 实现核心检测算法:ROI管理、峰值检测、帧间稳定 - 支持实时摄像头检测和视频文件处理 - 包含图像预处理:去雾、几何校正、图像增强 - 提供多种输出格式:JSON、CSV、矩阵、文本 - 实现双阈值检测算法适应雾天环境 - 添加ROI标定工具和配置文件管理 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
44 lines
976 B
Python
44 lines
976 B
Python
"""
|
|
简单的演示脚本
|
|
用于快速测试YantaiVisionX系统
|
|
"""
|
|
|
|
import cv2
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
# 添加项目根目录到Python路径
|
|
project_root = Path(__file__).parent
|
|
sys.path.insert(0, str(project_root))
|
|
|
|
from main import YantaiVisionXSystem
|
|
|
|
|
|
def run_simple_demo():
|
|
"""运行简单演示"""
|
|
print("YantaiVisionX LED检测系统演示")
|
|
print("="*50)
|
|
|
|
# 创建系统实例
|
|
system = YantaiVisionXSystem()
|
|
|
|
# 初始化系统
|
|
if not system.initialize_system():
|
|
print("系统初始化失败!")
|
|
return
|
|
|
|
print("系统初始化完成")
|
|
print("按 'q' 键退出程序")
|
|
print("开始检测...\n")
|
|
|
|
try:
|
|
# 开始检测(显示结果)
|
|
system.start_detection(display=True, save_results=True)
|
|
except Exception as e:
|
|
print(f"检测过程中出现错误: {e}")
|
|
finally:
|
|
print("演示结束")
|
|
|
|
|
|
if __name__ == '__main__':
|
|
run_simple_demo() |