libcamera  v0.4.0
Supporting cameras in Linux since 2019
Classes | Typedefs | Functions
libcamera::ipa Namespace Reference

The IPA (Image Processing Algorithm) namespace. More...

Classes

class  AgcMeanLuminance
 A mean-based auto-exposure algorithm. More...
 
class  Algorithm
 The base class for all IPA algorithms. More...
 
class  AlgorithmFactory
 Registration of Algorithm classes and creation of instances. More...
 
class  AlgorithmFactoryBase
 
class  CameraSensorHelper
 Base class for computing sensor tuning parameters using sensor-specific constants. More...
 
class  CameraSensorHelperFactory
 Registration of CameraSensorHelperFactory classes and creation of instances. More...
 
class  CameraSensorHelperFactoryBase
 Base class for camera sensor helper factories. More...
 
class  ExposureModeHelper
 Class for splitting exposure into exposure time and total gain. More...
 
class  FCQueue
 A support class for managing FrameContext instances in IPA modules. More...
 
struct  FrameContext
 Context for a frame. More...
 
class  Histogram
 The base class for creating histograms. More...
 
class  Interpolator
 Class for storing, retrieving, and interpolating objects. More...
 
class  LscPolynomial
 Class for handling even polynomials used in lens shading correction. More...
 
class  Lux
 Class that implements lux estimation. More...
 
class  Module
 The base class for all IPA modules. More...
 
class  Pwl
 Describe a univariate piecewise linear function in two-dimensional real space. More...
 
class  Vector
 Vector class. More...
 

Typedefs

template<typename T >
using RGB = Vector< T, 3 >
 A Vector of 3 elements representing an RGB pixel value.
 

Functions

double rec601LuminanceFromRGB (const RGB< double > &rgb)
 Estimate luminance from RGB values following ITU-R BT.601. More...
 
uint32_t estimateCCT (const RGB< double > &rgb)
 Estimate correlated colour temperature from RGB color space input. More...
 
template<unsigned int I, unsigned int F, typename R , typename T >
constexpr R floatingToFixedPoint (T number)
 Convert a floating point number to a fixed-point representation. More...
 
template<unsigned int I, unsigned int F, typename R , typename T >
constexpr R fixedToFloatingPoint (T number)
 Convert a fixed-point number to a floating point representation. More...
 
template<typename T , unsigned int Rows, unsigned int Cols>
Vector< T, Rows > operator* (const Matrix< T, Rows, Cols > &m, const Vector< T, Cols > &v)
 Multiply a matrix by a vector. More...
 
template<typename T , unsigned int Rows>
bool operator== (const Vector< T, Rows > &lhs, const Vector< T, Rows > &rhs)
 Compare vectors for equality. More...
 
template<typename T , unsigned int Rows>
bool operator!= (const Vector< T, Rows > &lhs, const Vector< T, Rows > &rhs)
 Compare vectors for inequality. More...
 

Detailed Description

The IPA (Image Processing Algorithm) namespace.

The IPA namespace groups all types specific to IPA modules. It serves as the top-level namespace for the IPA library libipa, and also contains module-specific namespaces for IPA modules.

Function Documentation

◆ estimateCCT()

uint32_t libcamera::ipa::estimateCCT ( const RGB< double > &  rgb)

Estimate correlated colour temperature from RGB color space input.

Parameters
[in]rgbThe RGB value

This function estimates the correlated color temperature RGB color space input. In physics and color science, the Planckian locus or black body locus is the path or locus that the color of an incandescent black body would take in a particular chromaticity space as the black body temperature changes.

If a narrow range of color temperatures is considered (those encapsulating daylight being the most practical case) one can approximate the Planckian locus in order to calculate the CCT in terms of chromaticity coordinates.

More detailed information can be found in: https://en.wikipedia.org/wiki/Color_temperature#Approximation

Returns
The estimated color temperature

◆ fixedToFloatingPoint()

template<unsigned int I, unsigned int F, typename R , typename T >
R libcamera::ipa::fixedToFloatingPoint ( number)

Convert a fixed-point number to a floating point representation.

Template Parameters
IBit width of the integer part of the fixed-point
FBit width of the fractional part of the fixed-point
RReturn type of the floating point representation
TInput type of the fixed-point representation
Parameters
numberThe fixed point number to convert to floating point
Returns
The converted value

◆ floatingToFixedPoint()

template<unsigned int I, unsigned int F, typename R , typename T >
R libcamera::ipa::floatingToFixedPoint ( number)

Convert a floating point number to a fixed-point representation.

Template Parameters
IBit width of the integer part of the fixed-point
FBit width of the fractional part of the fixed-point
RReturn type of the fixed-point representation
TInput type of the floating point representation
Parameters
numberThe floating point number to convert to fixed point
Returns
The converted value

◆ operator!=()

template<typename T , unsigned int Rows>
bool libcamera::ipa::operator!= ( const Vector< T, Rows > &  lhs,
const Vector< T, Rows > &  rhs 
)

Compare vectors for inequality.

Returns
True if the two vectors are not equal, false otherwise

◆ operator*()

template<typename T , unsigned int Rows, unsigned int Cols>
Vector< T, Rows > libcamera::ipa::operator* ( const Matrix< T, Rows, Cols > &  m,
const Vector< T, Cols > &  v 
)

Multiply a matrix by a vector.

Template Parameters
TNumerical type of the contents of the matrix and vector
RowsThe number of rows in the matrix
ColsThe number of columns in the matrix (= rows in the vector)
Parameters
mThe matrix
vThe vector
Returns
Product of matrix m and vector v

◆ operator==()

template<typename T , unsigned int Rows>
bool libcamera::ipa::operator== ( const Vector< T, Rows > &  lhs,
const Vector< T, Rows > &  rhs 
)

Compare vectors for equality.

Returns
True if the two vectors are equal, false otherwise

◆ rec601LuminanceFromRGB()

double libcamera::ipa::rec601LuminanceFromRGB ( const RGB< double > &  rgb)

Estimate luminance from RGB values following ITU-R BT.601.

Parameters
[in]rgbThe RGB value

This function estimates a luminance value from a triplet of Red, Green and Blue values, following the formula defined by ITU-R Recommendation BT.601-7 which can be found at https://www.itu.int/rec/R-REC-BT.601

Returns
The estimated luminance value