52 double minGain,
double maxGain, std::vector<AgcConstraint> constraints);
56 return constraintModes_;
61 return exposureModeHelpers_;
83 int parseRelativeLuminanceTarget(
const ValueNode &tuningData);
84 int parseConstraint(
const ValueNode &modeDict, int32_t
id);
85 int parseConstraintModes(
const ValueNode &tuningData);
86 int parseExposureModes(
const ValueNode &tuningData);
87 double estimateInitialGain(
const Traits &traits,
double yTarget)
const;
88 double constraintClampGain(
const Params ¶ms,
double gain)
const;
92 mutable bool luxWarningEnabled_;
93 Pwl relativeLuminanceTarget_;
96 std::vector<AgcConstraint> additionalConstraints_;
97 std::map<int32_t, std::vector<AgcConstraint>> constraintModes_;
98 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:350
const std::map< int32_t, ExposureModeHelper > & exposureModeHelpers() const
Get the ExposureModeHelpers that have been parsed from tuning data.
Definition agc_mean_luminance.h:59
int parseTuningData(const ValueNode &tuningData)
Parse tuning data for AeConstraintMode and AeExposureMode controls.
Definition agc_mean_luminance.cpp:416
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:442
Result calculateNewEv(const Params ¶ms)
Calculate the new exposure value and split it between exposure time and gain.
Definition agc_mean_luminance.cpp:660
double effectiveYTarget(double lux, double exposureCompensation) const
Get the currently effective y target.
Definition agc_mean_luminance.cpp:548
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:54
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:32
double qHi
The upper quantile to use for the constraint.
Definition agc_mean_luminance.h:39
Bound
Specify whether the constraint defines a lower or upper bound.
Definition agc_mean_luminance.h:33
@ 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:38
Bound bound
The type of constraint bound.
Definition agc_mean_luminance.h:37
Pwl yTarget
The luminance target for the constraint.
Definition agc_mean_luminance.h:40
Collection of parameters for the mean luminance AGC algorithm.
Definition agc_mean_luminance.h:64
const Traits & traits
The traits object implementing the necessary functions.
Definition agc_mean_luminance.h:65
utils::Duration effectiveExposureValue
The EV applied to the frame from which the statistics in use derive.
Definition agc_mean_luminance.h:67
const Histogram & yHist
A histogram from the ISP statistics to use in constraining the calculated gain.
Definition agc_mean_luminance.h:66
uint32_t constraintModeIndex
The index of the constraint mode to use.
Definition agc_mean_luminance.h:68
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:71
uint32_t exposureModeIndex
The index of the exposure mode to use.
Definition agc_mean_luminance.h:69
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:70
Collection of results of the mean luminance AGC algorithm.
Definition agc_mean_luminance.h:74
double yTarget
The current y target including exposure compensation.
Definition agc_mean_luminance.h:75
A collection of callbacks.
Definition agc_mean_luminance.h:43
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:32
Miscellaneous utility functions.
Data structure to manage tree of values.