libcamera v0.8.0+rpt20261104
Supporting cameras in Linux since 2019
Loading...
Searching...
No Matches
libcamera::DebayerParams Struct Reference

Struct to hold the debayer parameters. More...

Collaboration diagram for libcamera::DebayerParams:

Public Types

using LscLookupTable = std::array< uint8_t, kLscGridSize *kLscGridSize *kLscValuesPerCell >
 Lookup table for lens shading correction.
 

Public Attributes

Matrix< float, 3, 3 > combinedMatrix
 Colour correction matrix, including other adjustments.
 
RGB< double > blackLevel = RGB<double>({ 0.0, 0.0, 0.0 })
 Black level values.
 
float gamma = 1.0
 Gamma value, e.g. 1/2.2.
 
float contrastExp = 1.0
 Contrast value to be used as an exponent.
 
RGB< double > gains = RGB<double>({ 1.0, 1.0, 1.0 })
 Colour channel gains.
 
LscLookupTable lscLut = identityLscLut
 Lens shading lookup table.
 
uint64_t lscLutVersion = 0
 Incremented on each lscLut change.
 

Static Public Attributes

static constexpr unsigned int kLscGridSize = 17
 Number of lens shading grid areas in one direction.
 
static constexpr unsigned int kLscValuesPerCell = 4
 Number of pixel values per each of the lens shading grid areas.
 
static constexpr unsigned int kLscBytesPerCell
 Number of bytes per each of the lens shading grid areas.
 
static constexpr auto identityLscLut
 Lens shading lookup table of identity mapping.
 

Detailed Description

Struct to hold the debayer parameters.

Member Typedef Documentation

◆ LscLookupTable

Lookup table for lens shading correction.

It's an array of values to be later used as a texture. The values are in row - column - RGB order.

Member Data Documentation

◆ combinedMatrix

libcamera::DebayerParams::combinedMatrix
Initial value:
= { { 1.0, 0.0, 0.0,
0.0, 1.0, 0.0,
0.0, 0.0, 1.0 } }

Colour correction matrix, including other adjustments.

◆ identityLscLut

libcamera::DebayerParams::identityLscLut
staticconstexpr
Initial value:
= [] {
LscLookupTable lut = {};
for (size_t i = 0; kLscValuesPerCell * i < lut.size(); i++) {
lut[i * kLscValuesPerCell + 0] = 64;
lut[i * kLscValuesPerCell + 1] = 64;
lut[i * kLscValuesPerCell + 2] = 64;
}
return lut;
}()
static constexpr unsigned int kLscValuesPerCell
Number of pixel values per each of the lens shading grid areas.
Definition debayer_params.h:36
std::array< uint8_t, kLscGridSize *kLscGridSize *kLscValuesPerCell > LscLookupTable
Lookup table for lens shading correction.
Definition debayer_params.h:40

Lens shading lookup table of identity mapping.

This table can be used to initialise the lens shading lookup table or to not apply any real lens shading correction.

◆ kLscBytesPerCell

libcamera::DebayerParams::kLscBytesPerCell
staticconstexpr
Initial value:
=
kLscValuesPerCell * sizeof(uint8_t)

Number of bytes per each of the lens shading grid areas.

◆ kLscGridSize

libcamera::DebayerParams::kLscGridSize = 17
staticconstexpr

Number of lens shading grid areas in one direction.

To prevent OpenGL alignment issues, the number of bytes in each row must be a multiple of 4 (the initial value of GL_UNPACK_ALIGNMENT) and lscLut is also aligned to 4 bytes.


The documentation for this struct was generated from the following files: