|
libcamera v0.7.2+rpt20260817
Supporting cameras in Linux since 2019
|
Pure virtual base class for AWB algorithms implementations. More...

Classes | |
| struct | Result |
| The result of an AWB computation. More... | |
Public Member Functions | |
| virtual | ~AwbImplementation ()=default |
| Virtual class destructor. | |
| virtual int | init (const ValueNode &tuningData)=0 |
| Initialize the algorithm by parsing tuningData. | |
| virtual Result | calculateAwb (const AwbStats &stats, unsigned int lux, std::array< double, 2 > range)=0 |
| Calculate AWB data from the given statistics. | |
| virtual std::optional< RGB< double > > | gainsFromColourTemperature (double colourTemperature)=0 |
| Compute white balance gains from a colour temperature. | |
Pure virtual base class for AWB algorithms implementations.
The AwbImplementation class defines the interface for the AWB algorithm implementations.
It is currently implemented by the AwbGrey and AwbBayes classes.
The interface defines an init() function to initialize the algorithm with the content of the tuning file and two functions to compute colour gains according to the algorithm operating mode (auto or manual) in use.
The calculateAwb() function calculates colour gains given a set of statistics provided by the IPA module. It is used when the algorithm operates in auto mode and gains are dynamically computed given a new set of statistics from the AWB engine.
The gainsFromColourTemperature() function instead computes the white balance gains from a colour temperature. This function does not take any statistics into account. It is used to compute the colour gains when the user manually specifies a colour temperature.
|
pure virtual |
Calculate AWB data from the given statistics.
| [in] | stats | The statistics to use for the calculation |
| [in] | lux | The lux value of the scene |
| [in] | range | The colour temperature search limits |
Calculate an AwbResult object from the given statistics and lux value. A lux value of 0 means it is unknown or invalid and the algorithm shall ignore it.
Implemented in libcamera::ipa::AwbBayes, and libcamera::ipa::AwbGrey.
|
pure virtual |
Compute white balance gains from a colour temperature.
| [in] | colourTemperature | The colour temperature in Kelvin |
Compute the white balance gains from a colourTemperature. This function does not take any statistics into account. It is used to compute the colour gains when the user manually specifies a colour temperature.
Implemented in libcamera::ipa::AwbGrey, and libcamera::ipa::AwbBayes.
|
pure virtual |
Initialize the algorithm by parsing tuningData.
| [in] | tuningData |
Implemented in libcamera::ipa::AwbBayes, and libcamera::ipa::AwbGrey.