libcamera  v0.4.0+139-39419ce4
Supporting cameras in Linux since 2019
awb_grey.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 /*
3  * Copyright (C) 2024 Ideas on Board Oy
4  *
5  * AWB grey world algorithm
6  */
7 
8 #pragma once
9 
10 #include <optional>
11 
13 
14 #include "awb.h"
15 #include "interpolator.h"
16 
17 namespace libcamera {
18 
19 namespace ipa {
20 
21 class AwbGrey : public AwbAlgorithm
22 {
23 public:
24  AwbGrey() = default;
25 
26  int init(const YamlObject &tuningData) override;
27  AwbResult calculateAwb(const AwbStats &stats, unsigned int lux) override;
28  RGB<double> gainsFromColourTemperature(double colourTemperature) override;
29 
30 private:
31  std::optional<Interpolator<Vector<double, 2>>> colourGainCurve_;
32 };
33 
34 } /* namespace ipa */
35 
36 } /* namespace libcamera */
int init(const YamlObject &tuningData) override
Initialize the algorithm with the given tuning data.
Definition: awb_grey.cpp:44
RGB< double > gainsFromColourTemperature(double colourTemperature) override
Compute white balance gains from a colour temperature.
Definition: awb_grey.cpp:101
A Grey world auto white balance algorithm.
Definition: awb_grey.h:21
Top-level libcamera namespace.
Definition: backtrace.h:17
AwbResult calculateAwb(const AwbStats &stats, unsigned int lux) override
Calculate AWB data from the given statistics.
Definition: awb_grey.cpp:73
Vector class.
A class representing the tree structure of the YAML content.
Definition: yaml_parser.h:27
An abstraction class wrapping hardware-specific AWB statistics.
Definition: awb.h:27
The result of an AWB calculation.
Definition: awb.h:22
A base class for auto white balance algorithms.
Definition: awb.h:35
Helper class for linear interpolating a set of objects.
Vector class.
Definition: vector.h:33