# 算法参数配置文件 # LED亮灭检测算法的核心参数 # 亮度检测参数 brightness_detection: # 峰值亮度阈值(灰度值0-255) peak_brightness_threshold: 120 # 平均亮度阈值 avg_brightness_threshold: 80 # 亮度对比度阈值(中心与边缘亮度差値) brightness_contrast_threshold: 30 # 自适应阈值启用 adaptive_threshold_enabled: true # 环境光自适应系数 ambient_light_factor: 0.8 # 面积检测参数 area_detection: # 最小亮区面积(像素) min_bright_area: 5 # 最大亮区面积(像素) max_bright_area: 200 # 亮区面积比例阈值(相对于ROI总面积) area_ratio_threshold: 0.3 # 帧间稳定参数 frame_stabilization: # 稳定窗口大小(帧数) stability_window: 5 # 一致性阈值(窗口内一致的最小帧数) consistency_threshold: 3 # 状态更新间隔(秒) update_interval: 1.0 # 图像预处理参数 preprocessing: # 透视校正参数 perspective_correction: enabled: true auto_detect: false # 手动指定校正参数 # 去雾增强参数 defogging: enabled: true # CLAHE参数 clahe_clip_limit: 2.0 clahe_grid_size: [8, 8] # Gamma校正 gamma_correction: 0.7 # 高斯模糊 gaussian_blur_kernel: 3 # 检测模式参数 detection_mode: # 正常模式 / 雾天模式 current_mode: "normal" # "normal" or "foggy" # 雾天模式增强参数 foggy_mode_enhancement: brightness_boost: 1.2 contrast_boost: 1.5 noise_reduction: true # 日志和输出参数 logging: # 日志级别: DEBUG, INFO, WARNING, ERROR log_level: "INFO" # 日志文件路径 log_file: "logs/led_detection.log" # 是否保存调试图像 save_debug_images: false # 调试图像保存路径 debug_image_path: "debug/"