51 static std::optional<Configuration>
parse(
const ValueNode &tuningData);
59 double minGain,
double maxGain, std::vector<AgcConstraint> constraints);
63 return constraintModes_;
68 return exposureModeHelpers_;
90 double estimateInitialGain(
const Traits &traits,
double yTarget)
const;
91 double constraintClampGain(
const Params ¶ms,
double gain)
const;
95 mutable bool luxWarningEnabled_;
98 std::vector<AgcConstraint> additionalConstraints_;
100 Pwl relativeLuminanceTarget_;
101 std::map<int32_t, std::vector<AgcConstraint>> constraintModes_;
102 std::map<int32_t, ExposureModeHelper> exposureModeHelpers_;
A class representing a tree structure of values.
Definition value_node.h:27
A mean-based auto-exposure algorithm.
Definition agc_mean_luminance.h:27
void configure(utils::Duration lineDuration, const CameraSensorHelper *sensorHelper)
Configure the exposure mode helpers.
Definition agc_mean_luminance.cpp:518
const std::map< int32_t, ExposureModeHelper > & exposureModeHelpers() const
Get the available ExposureModeHelpers.
Definition agc_mean_luminance.h:66
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:540
Result calculateNewEv(const Params ¶ms)
Calculate the new exposure value and split it between exposure time and gain.
Definition agc_mean_luminance.cpp:759
double effectiveYTarget(double lux, double exposureCompensation) const
Get the currently effective y target.
Definition agc_mean_luminance.cpp:647
const std::map< int32_t, std::vector< AgcConstraint > > & constraintModes() const
Get the available constraint modes.
Definition agc_mean_luminance.h:61
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:331
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:29
double qHi
The upper quantile to use for the constraint.
Definition agc_mean_luminance.h:36
Bound
Specify whether the constraint defines a lower or upper bound.
Definition agc_mean_luminance.h:30
@ 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:35
Bound bound
The type of constraint bound.
Definition agc_mean_luminance.h:34
Pwl yTarget
The luminance target for the constraint.
Definition agc_mean_luminance.h:37
A collection of parameters.
Definition agc_mean_luminance.h:45
Pwl relativeLuminanceTarget
The relative mean luminance target by lux value.
Definition agc_mean_luminance.h:46
static std::optional< Configuration > parse(const ValueNode &tuningData)
Parse tuning data.
Definition agc_mean_luminance.cpp:442
std::map< int32_t, ExposureModeHelper > exposureModeHelpers
The available exposure modes.
Definition agc_mean_luminance.h:48
std::map< int32_t, std::vector< AgcConstraint > > constraintModes
The available constraint modes.
Definition agc_mean_luminance.h:47
Collection of parameters for the mean luminance AGC algorithm.
Definition agc_mean_luminance.h:71
const Traits & traits
The traits object implementing the necessary functions.
Definition agc_mean_luminance.h:72
utils::Duration effectiveExposureValue
The EV applied to the frame from which the statistics in use derive.
Definition agc_mean_luminance.h:74
const Histogram & yHist
A histogram from the ISP statistics to use in constraining the calculated gain.
Definition agc_mean_luminance.h:73
uint32_t constraintModeIndex
The index of the constraint mode to use.
Definition agc_mean_luminance.h:75
double exposureCompensation
The exposure compensation value to be used in the AGC calculations It is expressed as gain instead of...
Definition agc_mean_luminance.h:78
uint32_t exposureModeIndex
The index of the exposure mode to use.
Definition agc_mean_luminance.h:76
double lux
The lux level to be used in the AGC calculations. A value of 0 means no measurement and a default val...
Definition agc_mean_luminance.h:77
Collection of results of the mean luminance AGC algorithm.
Definition agc_mean_luminance.h:81
double yTarget
The current y target including exposure compensation.
Definition agc_mean_luminance.h:82
A collection of callbacks.
Definition agc_mean_luminance.h:40
virtual double estimateLuminance(double gain) const =0
Estimate the luminance of an image, adjusted by a given gain.
Result of splitExposure()
Definition exposure_mode_helper.h:34
Miscellaneous utility functions.
Data structure to manage tree of values.