|
libcamera v0.7.2+rpt20260817
Supporting cameras in Linux since 2019
|
An abstraction class wrapping hardware-specific AWB statistics. More...
Public Member Functions | |
| virtual double | computeColourError (const RGB< double > &gains) const =0 |
| Virtual class destructor. | |
| virtual bool | valid () const =0 |
| Retrieve if the AWB statistics are valid. | |
| virtual RGB< double > | rgbMeans () const =0 |
| Get RGB means of the statistics. | |
An abstraction class wrapping hardware-specific AWB statistics.
IPA modules using libIPA AwbAlgorithm class need to provide a derived implementation of this class to give the algorithm access to the hardware-specific statistics data.
|
pure virtual |
Virtual class destructor.
AwbStat::~AwbStat
Compute an error value for when the given gains would be applied
| [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.
|
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.
|
pure virtual |
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.