libcamera  v0.4.0+139-39419ce4
Supporting cameras in Linux since 2019
Public Member Functions | List of all members
libcamera::ipa::AwbStats Class Referenceabstract

An abstraction class wrapping hardware-specific AWB statistics. More...

Public Member Functions

virtual double computeColourError (const RGB< double > &gains) const =0
 Compute an error value for when the given gains would be applied. More...
 
virtual RGB< double > rgbMeans () const =0
 Get RGB means of the statistics. More...
 

Detailed Description

An abstraction class wrapping hardware-specific AWB statistics.

IPA modules using an AWB algorithm based on the AwbAlgorithm class need to implement this class to give the algorithm access to the hardware-specific statistics data.

Member Function Documentation

◆ computeColourError()

libcamera::ipa::AwbStats::computeColourError ( const RGB< double > &  gains) const
pure virtual

Compute an error value for when the given gains would be applied.

Parameters
[in]gainsThe gains to apply

Compute an error value (non-greyness) assuming the given gains would be applied. To keep the actual implementations computationally inexpensive, the squared colour error shall be returned.

If the AWB statistics provide multiple zones, the average of the individual squared errors shall be returned. Averaging/normalizing is necessary so that the numeric dimensions are the same on all hardware platforms.

Returns
The computed error value

◆ rgbMeans()

libcamera::ipa::AwbStats::rgbMeans ( ) const
pure virtual

Get RGB means of the statistics.

Fetch the RGB means from the statistics. The values of each channel are dimensionless and only the ratios are used for further calculations. This is used by the simple grey world model to calculate the gains to apply.

Returns
The RGB means

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