summaryrefslogtreecommitdiff
path: root/src/ipa/ipu3/ipu3.cpp
diff options
context:
space:
mode:
authorJean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>2021-08-23 14:05:42 +0200
committerJean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>2021-10-06 17:58:17 +0200
commit8437893900c78703e49a01ed2b1167bcbaf89ecb (patch)
tree3d7fa886b9a644981454d6d3f5f2a66915f15c0f /src/ipa/ipu3/ipu3.cpp
parent380b08754f10d6e03e96d13cac5be5e84e12835e (diff)
ipa: ipu3: awb: Introduce Black Level Correction
The pixels output by the camera normally include a black level, because sensors do not always report a signal level of '0' for black. Pixels at or below this level should be considered black and to achieve that, we need to substract an offset to all the pixels. This can be taken into account by reading the lowest value of a special region on sensors which is not exposed to light. This provides a substracting factor to be able to adjust the expected black levels in the resulting images. For a camera outputting 10-bit pixel values (in the range 0 to 1023) a typical black level might be 64. It is a fixed value, obtained by capturing a raw frame with minimum exposure and gain fixed to 1.0 while covering the sensor (the darker the better). We consider it good enough as a very first approximation, until we measure it during a tuning process and include it in a configuration file Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/ipu3/ipu3.cpp')
-rw-r--r--src/ipa/ipu3/ipu3.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
index 06f53fbe..6d9bbf39 100644
--- a/src/ipa/ipu3/ipu3.cpp
+++ b/src/ipa/ipu3/ipu3.cpp
@@ -33,6 +33,7 @@
#include "algorithms/agc.h"
#include "algorithms/algorithm.h"
#include "algorithms/awb.h"
+#include "algorithms/blc.h"
#include "algorithms/tone_mapping.h"
#include "libipa/camera_sensor_helper.h"
@@ -282,6 +283,7 @@ int IPAIPU3::init(const IPASettings &settings,
/* Construct our Algorithms */
algorithms_.push_back(std::make_unique<algorithms::Agc>());
algorithms_.push_back(std::make_unique<algorithms::Awb>());
+ algorithms_.push_back(std::make_unique<algorithms::BlackLevelCorrection>());
algorithms_.push_back(std::make_unique<algorithms::ToneMapping>());
return 0;