summaryrefslogtreecommitdiff
path: root/src/ipa/libipa/awb_grey.h
blob: 1a365e616a98917924f501931a0bd4519ab1442b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
 * Copyright (C) 2024 Ideas on Board Oy
 *
 * AWB grey world algorithm
 */

#pragma once

#include "libcamera/internal/vector.h"
#include "libcamera/internal/yaml_parser.h"

#include "awb.h"
#include "interpolator.h"

namespace libcamera {

namespace ipa {

class AwbGrey : public AwbAlgorithm
{
public:
	AwbGrey() = default;

	int init(const YamlObject &tuningData) override;
	AwbResult calculateAwb(const AwbStats &stats, int lux) override;
	RGB<double> gainsFromColourTemperature(double colourTemperature) override;

private:
	std::optional<Interpolator<Vector<double, 2>>> colourGainCurve_;
};

} /* namespace ipa */

} /* namespace libcamera */