Enhance camera configuration and auto-recording functionality

- Updated CameraStreamer to configure streaming settings from config.json, including manual exposure, gain, image quality, noise reduction, and color settings.
- Added new methods in CameraStreamer for configuring image quality, noise reduction, color settings, and advanced settings.
- Extended CameraConfig to include manual white balance RGB gains.
- Improved AutoRecordingManager to handle camera status updates and ensure proper recording starts/stops based on machine state changes.
- Created detailed configuration documentation for blower and conveyor cameras, outlining settings and their mappings to config.json.
- Implemented a comprehensive test script for auto-recording functionality with simulated MQTT messages, verifying correct behavior on machine state changes.
This commit is contained in:
Alireza Vaezi
2025-07-29 13:54:16 -04:00
parent a6514b72c9
commit 28400fbfb8
15 changed files with 1034 additions and 161 deletions

View File

@@ -59,6 +59,11 @@ class CameraConfig:
auto_white_balance: bool = True # Enable automatic white balance
color_temperature_preset: int = 0 # 0=auto, 1=daylight, 2=fluorescent, etc.
# Manual White Balance RGB Gains (for manual white balance mode)
wb_red_gain: float = 1.0 # Red channel gain (0.0-3.99, default 1.0)
wb_green_gain: float = 1.0 # Green channel gain (0.0-3.99, default 1.0)
wb_blue_gain: float = 1.0 # Blue channel gain (0.0-3.99, default 1.0)
# Advanced Settings
anti_flicker_enabled: bool = True # Reduce artificial lighting flicker
light_frequency: int = 1 # 0=50Hz, 1=60Hz (match local power frequency)