libcamera: src/ipa/libipa/awb_grey.h Source File

libcamera v0.5.0 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
17namespace libcamera {
18
19namespace ipa {
20
21 class AwbGrey : public AwbAlgorithm
22{
23public:
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
30private:
31 std::optional<Interpolator<Vector<double, 2>>> colourGainCurve_;
32};
33
34} /* namespace ipa */
35
36} /* namespace libcamera */
libcamera::YamlObject
A class representing the tree structure of the YAML content.
Definition yaml_parser.h:28
libcamera::ipa::AwbAlgorithm
A base class for auto white balance algorithms.
Definition awb.h:36
libcamera::ipa::AwbGrey::init
int init(const YamlObject &tuningData) override
Initialize the algorithm with the given tuning data.
Definition awb_grey.cpp:44
libcamera::ipa::AwbGrey::gainsFromColourTemperature
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
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::RGB
Vector< T, 3 > RGB
A Vector of 3 elements representing an RGB pixel value.
Definition vector.h:292
libcamera::ipa::AwbResult
The result of an AWB calculation.
Definition awb.h:22
libcamera::ipa::AwbStats
An abstraction class wrapping hardware-specific AWB statistics.
Definition awb.h:27
vector.h
Vector class.