Better camera settings + better rpompt
Build, push image, and notify Watchtower / build-image (push) Successful in 45s
Build, push image, and notify Watchtower / notify (push) Successful in 12s

This commit is contained in:
2026-08-23 14:32:17 +02:00
parent e802386adf
commit 7082ea3f8b
2 changed files with 25 additions and 7 deletions
+19 -1
View File
@@ -6,7 +6,25 @@ import time
picam2 = Picamera2()
camera_config = picam2.create_still_configuration()
# Get maximum full-sensor dimensions
sensor_format = picam2.sensor_modes[0]
max_width = sensor_format['size'][0]
max_height = sensor_format['size'][1]
camera_config = picam2.create_still_configuration(
raw={"size": (1640, 1232)},
main={"size": (1640, 1232)}
)
picam2.set_controls({
"AeEnable": False, # Disable Auto Exposure to lock settings
"ExposureTime": 60000, # 40 ms shutter time (brightens without grain)
"AnalogueGain": 2.0, # Keep gain low to eliminate sensor noise
"AwbEnable": False, # Disable Auto White Balance fluctuation
"ColourGains": (1.4, 1.2), # Balanced RGB gains for indoor warm LED
"Brightness": 0.2, # Slight boost to shadow detail
"Contrast": 1.1, # Crisp edges around metallic surfaces
"ScalerCrop": [0, 0, max_width, max_height] # Uncrop the image
})
picam2.configure(camera_config)
picam2.start()