libcamera v0.8.0
Supporting cameras in Linux since 2019
Loading...
Searching...
No Matches
libcamera::ipa::LscPolynomial Class Reference

Radial Polynomial LSC algorithm implementation. More...

Inheritance diagram for libcamera::ipa::LscPolynomial:
Collaboration diagram for libcamera::ipa::LscPolynomial:

Public Member Functions

int parseLscData (const ValueNode &sets, const LscDescriptor &descriptor) override
 Parse polynomial LSC data.
LscImplementation::ComponentsMap sampleForCrop (const Rectangle &cropRectangle, std::span< const double > xPos, std::span< const double > yPos) override
 Re-sample the LSC components for cropRectangle.
Public Member Functions inherited from libcamera::ipa::LscImplementation
virtual ~LscImplementation ()
 Virtual class destructor.

Additional Inherited Members

Public Types inherited from libcamera::ipa::LscImplementation
using Components = std::map<std::string, std::vector<float>, std::less<>>
 Associate colour components with a list of gains in float format.
using ComponentsMap = std::map<unsigned int, Components>
 Associate a colour temperature to a LSC table.

Detailed Description

Radial Polynomial LSC algorithm implementation.

Polynomial-based LSC algorithm implementation. The LscPolynomial class implements LSC support using a Polynomial to represent the shading artifacts map.

See also
LscImplementation

Member Function Documentation

◆ parseLscData()

int libcamera::ipa::LscPolynomial::parseLscData ( const ValueNode & sets,
const LscDescriptor & descriptor )
overridevirtual

Parse polynomial LSC data.

Parameters
[in]setsThe tuning file content
[in]descriptorThe LSC engine descriptor

Parse the LSC data in polyomial form from the sets tuning data.

Returns
0 on success or a negative error number otherwise

Implements libcamera::ipa::LscImplementation.

◆ sampleForCrop()

LscImplementation::ComponentsMap libcamera::ipa::LscPolynomial::sampleForCrop ( const Rectangle & cropRectangle,
std::span< const double > xPos,
std::span< const double > yPos )
overridevirtual

Re-sample the LSC components for cropRectangle.

Parameters
[in]cropRectangleThe sensor analogue crop rectangle
[in]xPosList of horizontal positions of the LSC grid nodes
[in]yPosList of vertical positions of the LSC grid nodes

LSC tables have to be re-sampled every time a new sensor configuration is used, as each streaming session might use a different sensor crop rectangle.

Polynomial LSC tables can be re-sampled for a given sensor frame resolution using a list of horizontal and vertical nodes that define the LSC grid on which the polynomial is re-sampled on.

cropRectangle represents the size of the frame on which the LSC tables have to be re-sampled on.

xPos and yPos represent the position of the grid nodes vertexes in the [0, 1] interval. In example an equally spaced grid of 16 nodes will have each segment of size 0.0625 and the list of nodes position will be [0, 0.0625, 0.125, 0.1875, ... , 1]. It is expected that the first position is 0 and the last position is 1.

Implements libcamera::ipa::LscImplementation.


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