libcamera v0.8.0+1-3c8337a0-nvm
Supporting cameras in Linux since 2019
Loading...
Searching...
No Matches
libcamera::ipa::LuxAlgorithm Class Reference

Lux estimation algorithm. More...

Classes

class  ProcessParams
 Parameters for LuxAlgorithm::process() More...
 

Public Member Functions

int init (const ValueNode &tuningData)
 Initialize algorithm and parse tuning data.
 
void prepare (const lux::ActiveState &state, lux::FrameContext &frameContext)
 
void process (lux::ActiveState &state, const lux::FrameContext &frameContext, ControlList &metadata, std::optional< ProcessParams > &&params)
 

Detailed Description

Lux estimation algorithm.

This algorithm provides lux estimation based on tuning data. 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

◆ init()

int libcamera::ipa::LuxAlgorithm::init ( const ValueNode &  tuningData)

Initialize algorithm and parse tuning data.

Parameters
[in]tuningDataThe ValueNode representing the tuning data

This function parses 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

◆ prepare()

void libcamera::ipa::LuxAlgorithm::prepare ( const lux::ActiveState &  state,
lux::FrameContext &  frameContext 
)
Parameters
[in]stateThe active state
[in]frameContextThe frame context

This function finalizes frameContext.lux based on the latest estimation.

◆ process()

void libcamera::ipa::LuxAlgorithm::process ( lux::ActiveState &  state,
const lux::FrameContext &  frameContext,
ControlList &  metadata,
std::optional< ProcessParams > &&  params 
)
Parameters
[in]stateThe active state
[in]frameContextThe frame context
[in]paramsThe processing parameters
[in]metadataThe metadata

This function updates the lux estimation based on the luminance histogram and other parameters of a completed frame, and additionally it also updates metadata for the frame.


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