libcamera v0.7.2+1-aebe4861-nvm
Supporting cameras in Linux since 2019
Loading...
Searching...
No Matches
lsc_base.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2/*
3 * Copyright (C) 2026 Ideas on Board Oy
4 *
5 * Base classes and types for LSC algorithm implementations
6 */
7
8#pragma once
9
10#include <map>
11#include <stdint.h>
12#include <string>
13#include <vector>
14
15#include <libcamera/geometry.h>
16
18
19#include "interpolator.h"
20
21namespace libcamera {
22
23namespace ipa {
24
26 std::vector<std::string> keys;
27 unsigned int numHSamples;
28 unsigned int numVSamples;
30};
31
33{
34public:
35 using Components = std::map<std::string, std::vector<float>, std::less<>>;
36 using ComponentsMap = std::map<unsigned int, Components>;
37
38 virtual ~LscImplementation() {}
39
40 virtual int parseLscData(const ValueNode &tuningData,
41 const LscDescriptor &descriptor) = 0;
42
43 virtual ComponentsMap
44 sampleForCrop(const Rectangle &cropRectangle,
45 std::vector<double> xPos, std::vector<double> yPos) = 0;
46};
47
48} /* namespace ipa */
49
50} /* namespace libcamera */
Describe a rectangle's position and dimensions.
Definition geometry.h:247
Describe a two-dimensional size.
Definition geometry.h:51
A class representing a tree structure of values.
Definition value_node.h:27
Pure virtual base class for LSC algorithm implementations.
Definition lsc_base.h:33
std::map< std::string, std::vector< float >, std::less<> > Components
Associate colour components with a list of gains in float format.
Definition lsc_base.h:35
virtual int parseLscData(const ValueNode &tuningData, const LscDescriptor &descriptor)=0
Parse tuningData.
std::map< unsigned int, Components > ComponentsMap
Associate a colour temperature to a LSC table.
Definition lsc_base.h:36
virtual ~LscImplementation()
Virtual class destructor.
Definition lsc_base.h:38
virtual ComponentsMap sampleForCrop(const Rectangle &cropRectangle, std::vector< double > xPos, std::vector< double > yPos)=0
Re-sample the LSC components for cropRectangle.
Data structures related to geometric objects.
Helper class for linear interpolating a set of objects.
Top-level libcamera namespace.
Definition backtrace.h:17
Describe the ISP LSC engine.
Definition lsc_base.h:25
unsigned int numVSamples
Number of vertical gain samples of the ISP LSC grid. Used for validating the list of gains parsed fro...
Definition lsc_base.h:28
std::vector< std::string > keys
The list of colour components to which a list of gains is associated with in the tuning file....
Definition lsc_base.h:26
unsigned int numHSamples
Number of horizontal gain samples of the ISP LSC grid. Used for validating the list of gains parsed f...
Definition lsc_base.h:27
Size sensorSize
The physical sensor size. This is the largest frame size used to generate the LSC table....
Definition lsc_base.h:29
Data structure to manage tree of values.