Loading...
Searching...
No Matches
awb_grey.h
Go to the documentation of this file.
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
* Copyright (C) 2024 Ideas on Board Oy
*
* AWB grey world algorithm
*/
#pragma once
#include <optional>
#include "libcamera/internal/vector.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, unsigned int lux) override;
std::optional<RGB<double>> gainsFromColourTemperature(double colourTemperature) override;
private:
std::optional<Interpolator<Vector<double, 2>>> colourGainCurve_;
};
} /* namespace ipa */
} /* 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: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::init
int init(const YamlObject &tuningData) override
Initialize the algorithm with the given tuning data.
Definition awb_grey.cpp:44
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::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.