libcamera
v0.8.0
Supporting cameras in Linux since 2019
Toggle main menu visibility
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 <span>
12
#include <stdint.h>
13
#include <string>
14
#include <vector>
15
16
#include <
libcamera/geometry.h
>
17
18
#include "
libcamera/internal/value_node.h
"
19
20
#include "
interpolator.h
"
21
22
namespace
libcamera
{
23
24
namespace
ipa
{
25
26
struct
LscDescriptor
{
27
std::vector<std::string>
keys
;
28
unsigned
int
numHSamples
;
29
unsigned
int
numVSamples
;
30
Size
sensorSize
;
31
};
32
33
class
LscImplementation
34
{
35
public
:
36
using
Components
= std::map<std::string, std::vector<float>, std::less<>>;
37
using
ComponentsMap
= std::map<unsigned int, Components>;
38
39
virtual
~LscImplementation
() {}
40
41
virtual
int
parseLscData
(
const
ValueNode
&tuningData,
42
const
LscDescriptor
&descriptor) = 0;
43
44
virtual
ComponentsMap
45
sampleForCrop
(
const
Rectangle
&cropRectangle,
46
std::span<const double> xPos, std::span<const double> yPos) = 0;
47
};
48
49
}
/* namespace ipa */
50
51
}
/* namespace libcamera */
libcamera::Rectangle
Describe a rectangle's position and dimensions.
Definition
geometry.h:247
libcamera::Size
Describe a two-dimensional size.
Definition
geometry.h:51
libcamera::ValueNode
A class representing a tree structure of values.
Definition
value_node.h:27
libcamera::ipa::LscImplementation
Pure virtual base class for LSC algorithm implementations.
Definition
lsc_base.h:34
libcamera::ipa::LscImplementation::ComponentsMap
std::map< unsigned int, Components > ComponentsMap
Associate a colour temperature to a LSC table.
Definition
lsc_base.h:37
libcamera::ipa::LscImplementation::Components
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:36
libcamera::ipa::LscImplementation::sampleForCrop
virtual ComponentsMap sampleForCrop(const Rectangle &cropRectangle, std::span< const double > xPos, std::span< const double > yPos)=0
Re-sample the LSC components for cropRectangle.
libcamera::ipa::LscImplementation::~LscImplementation
virtual ~LscImplementation()
Virtual class destructor.
Definition
lsc_base.h:39
libcamera::ipa::LscImplementation::parseLscData
virtual int parseLscData(const ValueNode &tuningData, const LscDescriptor &descriptor)=0
Parse tuningData.
geometry.h
Data structures related to geometric objects.
interpolator.h
Helper class for linear interpolating a set of objects.
libcamera::ipa
The IPA (Image Processing Algorithm) namespace.
Definition
af.cpp:58
libcamera
Top-level libcamera namespace.
Definition
backtrace.h:17
libcamera::ipa::LscDescriptor
Describe the ISP LSC engine.
Definition
lsc_base.h:26
libcamera::ipa::LscDescriptor::sensorSize
Size sensorSize
The physical sensor size. This is the largest frame size used to generate the LSC table....
Definition
lsc_base.h:30
libcamera::ipa::LscDescriptor::numVSamples
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:29
libcamera::ipa::LscDescriptor::numHSamples
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:28
libcamera::ipa::LscDescriptor::keys
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:27
value_node.h
Data structure to manage tree of values.
src
ipa
libipa
lsc_base.h
Generated by
1.17.0