| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- """
- 联动控制配置
- """
- COORDINATOR_CONFIG = {
- 'tracking_timeout': 5.0,
- 'min_person_size': 50,
- 'max_tracking_targets': 3,
- # detection_fps 已移至 DETECTION_CONFIG,此处不再重复定义
- 'ptz_command_cooldown': 0.5,
- 'ptz_position_threshold': 0.03,
-
- # 目标选择策略配置
- 'target_selection': {
- 'strategy': 'area', # 策略: 'area'(面积优先), 'confidence'(置信度优先), 'hybrid'(混合)
- 'area_weight': 0.6, # 混合模式下面积权重
- 'confidence_weight': 0.4, # 混合模式下置信度权重
- 'min_area_threshold': 5000, # 最小面积阈值(像素²),小于此值的目标优先级降低
- 'prefer_center': True, # 是否优先选择靠近画面中心的目标
- 'center_weight': 0.2, # 中心位置权重
- 'switch_on_lost': True, # 当前目标丢失时是否切换到次优目标
- 'stickiness': 0.3, # 目标粘性(0-1),值越大越不容易切换目标
- },
-
- # 顺序抓拍模式配置
- 'sequential_mode': {
- 'enabled': True, # 是否启用顺序抓拍模式
- 'ptz_stabilize_time': 2.5, # PTZ到位后稳定等待时间(秒) - 增加以确保画面清晰
- 'capture_wait_time': 0.5, # 抓拍间隔时间(秒)
- 'auto_zoom_wait_time': 1.0, # AutoZoom变焦后额外等待时间(秒) - 等待镜头对焦
- 'return_to_panorama': True, # 完成后是否回到全景默认位置
- 'default_pan': 0.0, # 默认pan角度
- 'default_tilt': 0.0, # 默认tilt角度
- 'default_zoom': 1, # 默认zoom(广角,1=最小变焦)
- },
- }
- CALIBRATION_CONFIG = {
- 'interval': 24 * 60 * 60, # 校准间隔(秒),默认24小时
- 'daily_calibration_time': '08:00', # 每日自动校准时间 (HH:MM格式)
- 'quick_mode': True,
- 'auto_save': True,
- 'load_on_startup': True, # 启动时是否加载上次保存的校准数据
- 'force_daily_recalibration': True, # 每日校准是否强制重新校准(不使用已有数据)
- 'min_valid_points': 4,
- 'rms_error_threshold': 5.0,
- # 校准结果保存路径
- 'calibration_file': '/home/admin/dsh/calibration.json',
- 'overlap_discovery': {
- 'pan_range': (0, 360),
- 'tilt_range': (-30, 30),
- 'pan_step': 20,
- 'tilt_step': 15,
- 'min_match_threshold': 8,
- 'stabilize_time': 2.0,
- 'max_overlap_ranges': 3,
- 'min_positions_per_range': 3,
- },
- }
|