ipa: rkisp1: awb: Load white balance gains from tuning file
For the implementation of a manual colour temperature setting, it is necessary to read predefined colour gains per colour temperature from the tuning file. Implement this in a backwards compatible way. If no gains are contained in the tuning file, loading just continues as before. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
4d2618fb10
commit
886e0328c3
2 changed files with 25 additions and 0 deletions
|
@ -41,6 +41,24 @@ Awb::Awb()
|
|||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* \copydoc libcamera::ipa::Algorithm::init
|
||||
*/
|
||||
int Awb::init([[maybe_unused]] IPAContext &context, const YamlObject &tuningData)
|
||||
{
|
||||
Interpolator<Vector<double, 2>> gainCurve;
|
||||
int ret = gainCurve.readYaml(tuningData["colourGains"], "ct", "gains");
|
||||
if (ret < 0)
|
||||
LOG(RkISP1Awb, Warning)
|
||||
<< "Failed to parse 'colourGains' "
|
||||
<< "parameter from tuning file; "
|
||||
<< "manual colour temperature will not work properly";
|
||||
else
|
||||
colourGainCurve_ = gainCurve;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* \copydoc libcamera::ipa::Algorithm::configure
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue