libcamera  v0.5.0
Supporting cameras in Linux since 2019
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
libcamera::ipa::Lux Class Reference

Class that implements lux estimation. More...

Public Member Functions

 Lux ()
 Construct the Lux helper module.
 
int parseTuningData (const YamlObject &tuningData)
 Parse tuning data. More...
 
double estimateLux (utils::Duration exposureTime, double aGain, double dGain, const Histogram &yHist) const
 Estimate lux given runtime values. More...
 

Detailed Description

Class that implements lux estimation.

IPAs that wish to use lux estimation should create a Lux algorithm module that lightly wraps this module by providing the platform-specific luminance histogram. The Lux entry in the tuning file must then precede the algorithms that depend on the estimated lux value.

Member Function Documentation

◆ estimateLux()

double libcamera::ipa::Lux::estimateLux ( utils::Duration  exposureTime,
double  aGain,
double  dGain,
const Histogram yHist 
) const

Estimate lux given runtime values.

Parameters
[in]exposureTimeExposure time applied to the frame
[in]aGainAnalogue gain applied to the frame
[in]dGainDigital gain applied to the frame
[in]yHistHistogram from the ISP statistics

Estimate the lux given the exposure time, gain, and histogram.

Returns
Estimated lux value

◆ parseTuningData()

int libcamera::ipa::Lux::parseTuningData ( const YamlObject tuningData)

Parse tuning data.

Parameters
[in]tuningDataThe YamlObject representing the tuning data

This function parses yaml tuning data for the common Lux module. It requires reference exposure time, analogue gain, digital gain, and lux values.

algorithms:
- Lux:
referenceExposureTime: 10000
referenceAnalogueGain: 4.0
referenceDigitalGain: 1.0
referenceY: 0.1831
referenceLux: 1000
Returns
0 on success or a negative error code

The documentation for this class was generated from the following files: