summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller/rpi/alsc.hpp
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2022-04-05 07:57:58 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-04-06 15:30:37 +0300
commit226792a1411bd485e087bf40e241611966099b52 (patch)
tree343a589c1385bee628ae015f54255050cfd8e1f3 /src/ipa/raspberrypi/controller/rpi/alsc.hpp
parentc45f9ce04ccc6e7770e2bdd7e9d42b83c7b95835 (diff)
ipa: raspberrypi: alsc: Limit the calculated lambda values
Under the right circumstances, the alsc calculations could spread the colour errors across the entire image as lambda remains unbound. This would cause the corrected image chroma values to slowly drift to incorrect values. This change adds a config parameter (alsc.lambda_bound) that provides an upper and lower bound to the lambda value at every stage of the calculation. With this change, we now adjust the lambda values so that the average across the entire grid is 1 instead of normalising to the minimum value. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Naushir Patuck <naush@raspberrypi.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/raspberrypi/controller/rpi/alsc.hpp')
-rw-r--r--src/ipa/raspberrypi/controller/rpi/alsc.hpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ipa/raspberrypi/controller/rpi/alsc.hpp b/src/ipa/raspberrypi/controller/rpi/alsc.hpp
index 9616b99e..d1dbe0d1 100644
--- a/src/ipa/raspberrypi/controller/rpi/alsc.hpp
+++ b/src/ipa/raspberrypi/controller/rpi/alsc.hpp
@@ -41,6 +41,7 @@ struct AlscConfig {
std::vector<AlscCalibration> calibrations_Cb;
double default_ct; // colour temperature if no metadata found
double threshold; // iteration termination threshold
+ double lambda_bound; // upper/lower bound for lambda from a value of 1
};
class Alsc : public Algorithm