libcamera v0.7.2 Supporting cameras in Linux since 2019

Loading...
Searching...
No Matches
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
12#include "libcamera/internal/vector.h"
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 ValueNode &tuningData) override;
27 AwbResult calculateAwb(const AwbStats &stats, unsigned int lux) override;
28 std::optional<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 */
libcamera::ValueNode
A class representing a tree structure of values.
Definition value_node.h:27
libcamera::ipa::AwbAlgorithm
A base class for auto white balance algorithms.
Definition awb.h:37
libcamera::ipa::AwbGrey::gainsFromColourTemperature
std::optional< RGB< double > > gainsFromColourTemperature(double colourTemperature) override
Compute white balance gains from a colour temperature.
Definition awb_grey.cpp:101
libcamera::ipa::AwbGrey::calculateAwb
AwbResult calculateAwb(const AwbStats &stats, unsigned int lux) override
Calculate AWB data from the given statistics.
Definition awb_grey.cpp:73
libcamera::ipa::AwbGrey::init
int init(const ValueNode &tuningData) override
Initialize the algorithm with the given tuning data.
Definition awb_grey.cpp:44
interpolator.h
Helper class for linear interpolating a set of objects.
awb.h
Base classes for AWB algorithms.
libcamera::ipa
The IPA (Image Processing Algorithm) namespace.
Definition af.cpp:58
libcamera
Top-level libcamera namespace.
Definition backtrace.h:17
libcamera::ipa::AwbResult
The result of an AWB calculation.
Definition awb.h:23
libcamera::ipa::AwbStats
An abstraction class wrapping hardware-specific AWB statistics.
Definition awb.h:28
vector.h
Vector class.