libcamera v0.4.0
Supporting cameras in Linux since 2019
 
Loading...
Searching...
No Matches
lux.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2/*
3 * Copyright (C) 2019, Raspberry Pi Ltd
4 * Copyright (C) 2024, Paul Elder <paul.elder@ideasonboard.com>
5 *
6 * Helper class that implements lux estimation
7 */
8
9#pragma once
10
12
13namespace libcamera {
14
15class YamlObject;
16
17namespace ipa {
18
19class Histogram;
20
21class Lux
22{
23public:
24 Lux(unsigned int binSize);
25
26 int parseTuningData(const YamlObject &tuningData);
27 double estimateLux(utils::Duration exposureTime,
28 double aGain, double dGain,
29 const Histogram &yHist) const;
30
31private:
32 unsigned int binSize_;
33 utils::Duration referenceExposureTime_;
34 double referenceAnalogueGain_;
35 double referenceDigitalGain_;
36 double referenceY_;
37 double referenceLux_;
38};
39
40} /* namespace ipa */
41
42} /* namespace libcamera */
A class representing the tree structure of the YAML content.
Definition yaml_parser.h:28
The base class for creating histograms.
Definition histogram.h:23
Lux(unsigned int binSize)
Construct the Lux helper module.
Definition lux.cpp:82
double estimateLux(utils::Duration exposureTime, double aGain, double dGain, const Histogram &yHist) const
Estimate lux given runtime values.
Definition lux.cpp:162
int parseTuningData(const YamlObject &tuningData)
Parse tuning data.
Definition lux.cpp:106
Helper class from std::chrono::duration that represents a time duration in nanoseconds with double pr...
Definition utils.h:370
The IPA (Image Processing Algorithm) namespace.
Definition af.cpp:58
Top-level libcamera namespace.
Definition backtrace.h:17
Miscellaneous utility functions.