|
libcamera v0.7.1
Supporting cameras in Linux since 2019
|
A mean-based auto-exposure algorithm. More...


Public Member Functions | |
| int | init (IPAContext &context, const ValueNode &tuningData) override |
| Initialise the AGC algorithm from tuning files. | |
| int | configure (IPAContext &context, const IPAConfigInfo &configInfo) override |
| Configure the AGC given a configInfo. | |
| void | process (IPAContext &context, const uint32_t frame, IPAFrameContext &frameContext, const ipu3_uapi_stats_3a *stats, ControlList &metadata) override |
| Process IPU3 statistics, and run AGC operations. | |
| Public Member Functions inherited from libcamera::ipa::Algorithm< Module > | |
| virtual int | init (typename Module::Context &context, const ValueNode &tuningData) |
| Initialize the Algorithm with tuning data. | |
| virtual int | configure (typename Module::Context &context, const typename Module::Config &configInfo) |
| Configure the Algorithm given an IPAConfigInfo. | |
| virtual void | queueRequest (typename Module::Context &context, const uint32_t frame, typename Module::FrameContext &frameContext, const ControlList &controls) |
| Provide control values to the algorithm. | |
| virtual void | prepare (typename Module::Context &context, const uint32_t frame, typename Module::FrameContext &frameContext, typename Module::Params *params) |
| Fill the params buffer with ISP processing parameters for a frame. | |
| virtual void | process (typename Module::Context &context, const uint32_t frame, typename Module::FrameContext &frameContext, const typename Module::Stats *stats, ControlList &metadata) |
| Process ISP statistics, and run algorithm operations. | |
| Public Member Functions inherited from libcamera::ipa::AgcMeanLuminance | |
| void | configure (utils::Duration lineDuration, const CameraSensorHelper *sensorHelper) |
| Configure the exposure mode helpers. | |
| int | parseTuningData (const ValueNode &tuningData) |
| Parse tuning data for AeConstraintMode and AeExposureMode controls. | |
| void | setExposureCompensation (double gain) |
| Set the exposure compensation value. | |
| void | setLux (unsigned int lux) |
| Set the lux level. | |
| void | setLimits (utils::Duration minExposureTime, utils::Duration maxExposureTime, double minGain, double maxGain, std::vector< AgcConstraint > constraints) |
| Set the ExposureModeHelper limits for this class. | |
| const std::map< int32_t, std::vector< AgcConstraint > > & | constraintModes () const |
| Get the constraint modes that have been parsed from tuning data. | |
| const std::map< int32_t, std::shared_ptr< ExposureModeHelper > > & | exposureModeHelpers () const |
| Get the ExposureModeHelpers that have been parsed from tuning data. | |
| ControlInfoMap::Map | controls () |
| Get the controls that have been generated after parsing tuning data. | |
| 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. | |
| double | effectiveYTarget () const |
| Get the currently effective y target. | |
| void | resetFrameCount () |
| Reset the frame counter. | |
Additional Inherited Members | |
| Public Types inherited from libcamera::ipa::Algorithm< Module > | |
| using | Module |
| The IPA module type for this class of algorithms. | |
A mean-based auto-exposure algorithm.
This algorithm calculates an exposure time and an analogue gain so that the average value of the green channel of the brightest 2% of pixels approaches 0.5. The AWB gains are not used here, and all cells in the grid have the same weight, like an average-metering case. In this metering mode, the camera uses light information from the entire scene and creates an average for the final exposure setting, giving no weighting to any particular portion of the metered area.
Reference: Battiato, Messina & Castorina. (2008). Exposure Correction for Imaging Devices: An Overview. 10.1201/9781420054538.ch12.
|
override |
Configure the AGC given a configInfo.
| [in] | context | The shared IPA context |
| [in] | configInfo | The IPA configuration data |
|
override |
Initialise the AGC algorithm from tuning files.
This function calls the base class' tuningData parsers to discover which control values are supported.
|
override |
Process IPU3 statistics, and run AGC operations.
| [in] | context | The shared IPA context |
| [in] | frame | The current frame sequence number |
| [in] | frameContext | The current frame context |
| [in] | stats | The IPU3 statistics and ISP results |
| [out] | metadata | Metadata for the frame, to be filled by the algorithm |
Identify the current image brightness, and use that to estimate the optimal new exposure and gain for the scene.