51 exposureCompensation_ = gain;
60 double minGain,
double maxGain, std::vector<AgcConstraint> constraints);
64 return constraintModes_;
69 return exposureModeHelpers_;
77 std::tuple<utils::Duration, double, double, double>
78 calculateNewEv(uint32_t constraintModeIndex, uint32_t exposureModeIndex,
89 virtual double estimateLuminance(
const double gain)
const = 0;
91 int parseRelativeLuminanceTarget(
const YamlObject &tuningData);
92 int parseConstraint(
const YamlObject &modeDict, int32_t
id);
93 int parseConstraintModes(
const YamlObject &tuningData);
94 int parseExposureModes(
const YamlObject &tuningData);
95 double estimateInitialGain()
const;
96 double constraintClampGain(uint32_t constraintModeIndex,
102 mutable bool luxWarningEnabled_;
103 double exposureCompensation_;
104 Pwl relativeLuminanceTarget_;
105 uint64_t frameCount_;
108 std::vector<AgcConstraint> additionalConstraints_;
109 std::map<int32_t, std::vector<AgcConstraint>> constraintModes_;
110 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:367
A class representing the tree structure of the YAML content.
Definition yaml_parser.h:28
A mean-based auto-exposure algorithm.
Definition agc_mean_luminance.h:30
void setLux(unsigned int lux)
Set the lux level.
Definition agc_mean_luminance.h:54
void configure(utils::Duration lineDuration, const CameraSensorHelper *sensorHelper)
Configure the exposure mode helpers.
Definition agc_mean_luminance.cpp:353
const std::map< int32_t, std::shared_ptr< ExposureModeHelper > > & exposureModeHelpers() const
Get the ExposureModeHelpers that have been parsed from tuning data.
Definition agc_mean_luminance.h:67
void resetFrameCount()
Reset the frame counter.
Definition agc_mean_luminance.h:83
void setLimits(utils::Duration minExposureTime, utils::Duration maxExposureTime, double minGain, double maxGain, std::vector< AgcConstraint > constraints)
Set the ExposureModeHelper limits for this class.
Definition agc_mean_luminance.cpp:462
void setExposureCompensation(double gain)
Set the exposure compensation value.
Definition agc_mean_luminance.h:49
int parseTuningData(const YamlObject &tuningData)
Parse tuning data for AeConstraintMode and AeExposureMode controls.
Definition agc_mean_luminance.cpp:417
ControlInfoMap::Map controls()
Get the controls that have been generated after parsing tuning data.
Definition agc_mean_luminance.h:72
std::tuple< utils::Duration, double, 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:673
double effectiveYTarget() const
Get the currently effective y target.
Definition agc_mean_luminance.cpp:591
const std::map< int32_t, std::vector< AgcConstraint > > & constraintModes() const
Get the constraint modes that have been parsed from tuning data.
Definition agc_mean_luminance.h:62
Base class for computing sensor tuning parameters using sensor-specific constants.
Definition camera_sensor_helper.h:24
The base class for creating histograms.
Definition histogram.h:23
Describe a univariate piecewise linear function in two-dimensional real space.
Definition pwl.h:22
Helper class from std::chrono::duration that represents a time duration in nanoseconds with double pr...
Definition utils.h:322
Framework to manage controls related to an object.
Helper class that performs computations relating to exposure.
Class to represent Histograms and manipulate them.
Top-level libcamera namespace.
Definition backtrace.h:17
Piecewise linear functions.
The boundaries and target for an AeConstraintMode constraint.
Definition agc_mean_luminance.h:35
double qHi
The upper quantile to use for the constraint.
Definition agc_mean_luminance.h:42
Bound
Specify whether the constraint defines a lower or upper bound.
Definition agc_mean_luminance.h:36
@ Upper
The constraint defines an upper bound.
@ Lower
The constraint defines a lower bound.
double qLo
The lower quantile to use for the constraint.
Definition agc_mean_luminance.h:41
Bound bound
The type of constraint bound.
Definition agc_mean_luminance.h:40
Pwl yTarget
The luminance target for the constraint.
Definition agc_mean_luminance.h:43
Miscellaneous utility functions.