libcamera v0.7.2+rpt20261009
Supporting cameras in Linux since 2019
Loading...
Searching...
No Matches
libcamera::ipa::ipu3::algorithms::Ipu3AwbStats Class Referencefinal

The IPU3 specific implementation of AwbStats. More...

Inheritance diagram for libcamera::ipa::ipu3::algorithms::Ipu3AwbStats:
Collaboration diagram for libcamera::ipa::ipu3::algorithms::Ipu3AwbStats:

Public Member Functions

 Ipu3AwbStats (const RGB< double > &rgbMeans)
 Constructs an Ipu3AwbStats object with the given RGB means.
 
double computeColourError (const RGB< double > &gains) const override
 Compute an error value for when the given gains would be applied.
 
bool valid () const override
 Retrieve if the AWB statistics are valid.
 
RGB< double > rgbMeans () const override
 Get RGB means of the statistics.
 

Detailed Description

The IPU3 specific implementation of AwbStats.

Constructor & Destructor Documentation

◆ Ipu3AwbStats()

libcamera::ipa::ipu3::algorithms::Ipu3AwbStats::Ipu3AwbStats ( const RGB< double > &  rgbMeans)
inline

Constructs an Ipu3AwbStats object with the given RGB means.

Parameters
rgbMeansA vector of doubles representing the RGB mean values

Member Function Documentation

◆ computeColourError()

double libcamera::ipa::ipu3::algorithms::Ipu3AwbStats::computeColourError ( const RGB< double > &  gains) const
overridevirtual

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

Implements libcamera::ipa::AwbStats.

◆ rgbMeans()

RGB< double > libcamera::ipa::ipu3::algorithms::Ipu3AwbStats::rgbMeans ( ) const
overridevirtual

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.

Todo:
Make a requirement to return statistics in the [0, 1] range.
Returns
The RGB means

Implements libcamera::ipa::AwbStats.

◆ valid()

bool libcamera::ipa::ipu3::algorithms::Ipu3AwbStats::valid ( ) const
overridevirtual

Retrieve if the AWB statistics are valid.

If the colour mean values are too small, the AwbAlgorithm class doesn't have enough information to meaningfully calculate white-balance gains. Freeze the algorithm in that case.

Returns
True if the AWB statistics are valid, false otherwise

Implements libcamera::ipa::AwbStats.


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