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:
@@ -110,6 +110,11 @@ class CameraConfigRequest(BaseModel):
|
||||
auto_white_balance: Optional[bool] = Field(default=None, description="Enable automatic white balance")
|
||||
color_temperature_preset: Optional[int] = Field(default=None, ge=0, le=10, description="Color temperature preset")
|
||||
|
||||
# Manual White Balance RGB Gains
|
||||
wb_red_gain: Optional[float] = Field(default=None, ge=0.0, le=3.99, description="Red channel gain for manual white balance")
|
||||
wb_green_gain: Optional[float] = Field(default=None, ge=0.0, le=3.99, description="Green channel gain for manual white balance")
|
||||
wb_blue_gain: Optional[float] = Field(default=None, ge=0.0, le=3.99, description="Blue channel gain for manual white balance")
|
||||
|
||||
# Advanced Settings
|
||||
anti_flicker_enabled: Optional[bool] = Field(default=None, description="Reduce artificial lighting flicker")
|
||||
light_frequency: Optional[int] = Field(default=None, ge=0, le=1, description="Light frequency (0=50Hz, 1=60Hz)")
|
||||
@@ -151,6 +156,11 @@ class CameraConfigResponse(BaseModel):
|
||||
auto_white_balance: bool
|
||||
color_temperature_preset: int
|
||||
|
||||
# Manual White Balance RGB Gains
|
||||
wb_red_gain: float
|
||||
wb_green_gain: float
|
||||
wb_blue_gain: float
|
||||
|
||||
# Advanced Settings
|
||||
anti_flicker_enabled: bool
|
||||
light_frequency: int
|
||||
|
||||
Reference in New Issue
Block a user