From 6ce27f177df68288a480cc489f6abfe9bede547d Mon Sep 17 00:00:00 2001 From: Romain Bazile Date: Sat, 5 Dec 2020 03:20:52 +0100 Subject: [PATCH] hardware.json: add wb gain settings --- hardware.json | 4 +++- scripts/planktoscope/imager.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hardware.json b/hardware.json index 7cdb3a3..e941726 100644 --- a/hardware.json +++ b/hardware.json @@ -5,5 +5,7 @@ "pump_steps_per_ml": 507, "focus_max_speed": 0.5, "pump_max_speed": 30, - "stepper_type": "adafruit" + "stepper_type": "adafruit", + "wb_red_gain": 2, + "wb_blue_gain": 1.41 } \ No newline at end of file diff --git a/scripts/planktoscope/imager.py b/scripts/planktoscope/imager.py index 33282a6..0348d22 100644 --- a/scripts/planktoscope/imager.py +++ b/scripts/planktoscope/imager.py @@ -194,8 +194,8 @@ class ImagerProcess(multiprocessing.Process): self.__exposure_mode = "fixedfps" self.__white_balance = "off" self.__white_balance_gain = ( - 200, - 140, + configuration.get("wb_red_gain", 2.00) * 100, + configuration.get("wb_blue_gain", 1.40) * 100, ) # Those values were tested on a HQ camera to give a whitish background self.__base_path = "/home/pi/data/img"