32 virtual ~AgcMeanLuminance();
48 double minGain,
double maxGain);
52 return constraintModes_;
57 return exposureModeHelpers_;
65 std::tuple<utils::Duration, double, double>
66 calculateNewEv(uint32_t constraintModeIndex, uint32_t exposureModeIndex,
75 virtual double estimateLuminance(
const double gain)
const = 0;
77 void parseRelativeLuminanceTarget(
const YamlObject &tuningData);
78 void parseConstraint(
const YamlObject &modeDict, int32_t
id);
79 int parseConstraintModes(
const YamlObject &tuningData);
80 int parseExposureModes(
const YamlObject &tuningData);
81 double estimateInitialGain()
const;
82 double constraintClampGain(uint32_t constraintModeIndex,
89 double relativeLuminanceTarget_;
91 std::map<int32_t, std::vector<AgcConstraint>> constraintModes_;
92 std::map<int32_t, std::shared_ptr<ExposureModeHelper>> exposureModeHelpers_;
std::unordered_map< const ControlId *, ControlInfo > Map
The base std::unsorted_map<> container.
Definition controls.h:369
A class representing the tree structure of the YAML content.
Definition yaml_parser.h:28
void setLimits(utils::Duration minExposureTime, utils::Duration maxExposureTime, double minGain, double maxGain)
Set the ExposureModeHelper limits for this class.
Definition agc_mean_luminance.cpp:381
void resetFrameCount()
Reset the frame counter.
Definition agc_mean_luminance.h:69
std::map< int32_t, std::vector< AgcConstraint > > constraintModes()
Get the constraint modes that have been parsed from tuning data.
Definition agc_mean_luminance.h:50
std::map< int32_t, std::shared_ptr< ExposureModeHelper > > exposureModeHelpers()
Get the ExposureModeHelpers that have been parsed from tuning data.
Definition agc_mean_luminance.h:55
ControlInfoMap::Map controls()
Get the controls that have been generated after parsing tuning data.
Definition agc_mean_luminance.h:60
int parseTuningData(const YamlObject &tuningData)
Parse tuning data for AeConstraintMode and AeExposureMode controls.
Definition agc_mean_luminance.cpp:358
std::tuple< utils::Duration, double, double > calculateNewEv(uint32_t constraintModeIndex, uint32_t exposureModeIndex, const Histogram &yHist, utils::Duration effectiveExposureValue)
Calculate the new exposure value and splut it between exposure time and gain.
Definition agc_mean_luminance.cpp:531
The base class for creating histograms.
Definition histogram.h:23
Helper class from std::chrono::duration that represents a time duration in nanoseconds with double pr...
Definition utils.h:371
Framework to manage controls related to an object.
Helper class that performs computations relating to exposure.
Class to represent Histograms and manipulate them.
The IPA (Image Processing Algorithm) namespace.
Definition af.cpp:58
Top-level libcamera namespace.
Definition backtrace.h:17
The boundaries and target for an AeConstraintMode constraint.
Definition agc_mean_luminance.h:34
double yTarget
The luminance target for the constraint.
Definition agc_mean_luminance.h:42
double qHi
The upper quantile to use for the constraint.
Definition agc_mean_luminance.h:41
Bound
Specify whether the constraint defines a lower or upper bound.
Definition agc_mean_luminance.h:35
@ Upper
The constraint defines an upper bound.
Definition agc_mean_luminance.h:37
@ Lower
The constraint defines a lower bound.
Definition agc_mean_luminance.h:36
Bound bound
The type of constraint bound.
Definition agc_mean_luminance.h:39
double qLo
The lower quantile to use for the constraint.
Definition agc_mean_luminance.h:40
Miscellaneous utility functions.