libcamera: libcamera::ipa::AwbStats Class Reference

libcamera v0.5.0 Supporting cameras in Linux since 2019 |

Loading...
Searching...
No Matches
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.
virtual RGB< double > | rgbMeans () const =0
| Get RGB means of the statistics.

## 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()

virtual double 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] | gains | The 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()

virtual RGB< double > 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:

- src/ipa/libipa/awb.h
- src/ipa/libipa/awb.cpp