libcamera
v0.3.1+12-19bbca3c
Supporting cameras in Linux since 2019
|
Base class for computing sensor tuning parameters using sensor-specific constants. More...
Classes | |
struct | AnalogueGainConstants |
Analogue gain model constants. More... | |
struct | AnalogueGainExpConstants |
Analogue gain constants for the exponential gain model. More... | |
struct | AnalogueGainLinearConstants |
Analogue gain constants for the linear gain model. More... | |
Public Member Functions | |
std::optional< int16_t > | blackLevel () const |
Construct a CameraSensorHelper instance. More... | |
virtual uint32_t | gainCode (double gain) const |
Compute gain code from the analogue gain absolute value. More... | |
virtual double | gain (uint32_t gainCode) const |
Compute the real gain from the V4L2 subdev control gain code. More... | |
Protected Types | |
enum | AnalogueGainType { AnalogueGainLinear, AnalogueGainExponential } |
The gain calculation modes as defined by the MIPI CCS. More... | |
Protected Attributes | |
std::optional< int16_t > | blackLevel_ |
The black level of the sensor. | |
AnalogueGainType | gainType_ |
The analogue gain model type. | |
AnalogueGainConstants | gainConstants_ |
The analogue gain parameters used for calculation. More... | |
Base class for computing sensor tuning parameters using sensor-specific constants.
Instances derived from CameraSensorHelper class are sensor-specific. Each supported sensor will have an associated base class defined.
|
protected |
The gain calculation modes as defined by the MIPI CCS.
Describes the image sensor analogue gain capabilities. Two modes are possible, depending on the sensor: Linear and Exponential.
|
inline |
Construct a CameraSensorHelper instance.
CameraSensorHelper derived class instances shall never be constructed manually but always through the CameraSensorHelperFactoryBase::create() function.
Fetch the black level of the sensor
This function returns the black level of the sensor scaled to a 16bit pixel width. If it is unknown an empty optional is returned.
Black levels are typically the result of the following phenomena:
The pedestal is usually the value with the biggest contribution to the overall black level. In most cases it is either known before or in rare cases (there is not a single driver with such a control in the linux kernel) can be queried from the sensor. This function provides that fixed, known value.
|
virtual |
Compute the real gain from the V4L2 subdev control gain code.
[in] | gainCode | The V4L2 subdev control gain |
This function aims to abstract the calculation of the gain letting the IPA use the real gain for its estimations. It is the counterpart of the function CameraSensorHelper::gainCode.
|
virtual |
Compute gain code from the analogue gain absolute value.
[in] | gain | The real gain to pass |
This function aims to abstract the calculation of the gain letting the IPA use the real gain for its estimations.
|
protected |
The analogue gain parameters used for calculation.
The analogue gain is calculated through a formula, and its parameters are sensor specific. Use this variable to store the values at init time.