Enhance camera image tuning and add gain ceiling selection for improved chamber monitoring
This commit is contained in:
@@ -80,17 +80,21 @@ esp32_camera:
|
|||||||
vertical_flip: true
|
vertical_flip: true
|
||||||
horizontal_mirror: false
|
horizontal_mirror: false
|
||||||
|
|
||||||
# Image tuning for chamber monitoring through tinted door
|
# Image tuning for chamber monitoring through tinted door.
|
||||||
brightness: 1
|
# Low contrast + high brightness lifts the shadows; the LED strips are
|
||||||
contrast: -1
|
# allowed to blow out since the chamber is what matters.
|
||||||
|
brightness: 2
|
||||||
|
contrast: -2
|
||||||
saturation: 0
|
saturation: 0
|
||||||
|
|
||||||
# Auto-Exposure & Gain tuning (AEC2 + AE Level lift shadows away from bright LEDs)
|
# Auto-Exposure & Gain tuning (AEC2 + AE Level lift shadows away from bright LEDs).
|
||||||
|
# The gain ceiling is the main lever for the tinted door: 8X was capping how
|
||||||
|
# far AGC could amplify, leaving everything outside the LED strips black.
|
||||||
aec_mode: auto
|
aec_mode: auto
|
||||||
aec2: true
|
aec2: true
|
||||||
ae_level: 1
|
ae_level: 2
|
||||||
agc_mode: auto
|
agc_mode: auto
|
||||||
agc_gain_ceiling: 8X
|
agc_gain_ceiling: 128X
|
||||||
wb_mode: auto
|
wb_mode: auto
|
||||||
|
|
||||||
# Camera endpoints:
|
# Camera endpoints:
|
||||||
@@ -160,7 +164,7 @@ number:
|
|||||||
min_value: -2
|
min_value: -2
|
||||||
max_value: 2
|
max_value: 2
|
||||||
step: 1
|
step: 1
|
||||||
initial_value: 1
|
initial_value: 2
|
||||||
optimistic: true
|
optimistic: true
|
||||||
set_action:
|
set_action:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
@@ -172,7 +176,7 @@ number:
|
|||||||
min_value: -2
|
min_value: -2
|
||||||
max_value: 2
|
max_value: 2
|
||||||
step: 1
|
step: 1
|
||||||
initial_value: -1
|
initial_value: -2
|
||||||
optimistic: true
|
optimistic: true
|
||||||
set_action:
|
set_action:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
@@ -184,10 +188,38 @@ number:
|
|||||||
min_value: -2
|
min_value: -2
|
||||||
max_value: 2
|
max_value: 2
|
||||||
step: 1
|
step: 1
|
||||||
initial_value: 1
|
initial_value: 2
|
||||||
optimistic: true
|
optimistic: true
|
||||||
set_action:
|
set_action:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
sensor_t *s = esp_camera_sensor_get();
|
sensor_t *s = esp_camera_sensor_get();
|
||||||
if (s) s->set_ae_level(s, (int)x);
|
if (s) s->set_ae_level(s, (int)x);
|
||||||
|
|
||||||
|
select:
|
||||||
|
# Caps how far AGC may amplify. Higher = brighter but noisier; back this off
|
||||||
|
# if the chamber image gets too grainy at 128X.
|
||||||
|
- platform: template
|
||||||
|
name: "${friendly_name} Gain Ceiling"
|
||||||
|
optimistic: true
|
||||||
|
initial_option: "128X"
|
||||||
|
options:
|
||||||
|
- "2X"
|
||||||
|
- "4X"
|
||||||
|
- "8X"
|
||||||
|
- "16X"
|
||||||
|
- "32X"
|
||||||
|
- "64X"
|
||||||
|
- "128X"
|
||||||
|
set_action:
|
||||||
|
- lambda: |-
|
||||||
|
sensor_t *s = esp_camera_sensor_get();
|
||||||
|
if (!s) return;
|
||||||
|
int idx = 6;
|
||||||
|
if (x == "2X") idx = 0;
|
||||||
|
else if (x == "4X") idx = 1;
|
||||||
|
else if (x == "8X") idx = 2;
|
||||||
|
else if (x == "16X") idx = 3;
|
||||||
|
else if (x == "32X") idx = 4;
|
||||||
|
else if (x == "64X") idx = 5;
|
||||||
|
s->set_gainceiling(s, (gainceiling_t)idx);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user