/* SPDX-License-Identifier: BSD-2-Clause */
/*
* Copyright (C) 2019, Raspberry Pi (Trading) Limited
*
* geq.hpp - GEQ (green equalisation) control algorithm
*/
#pragma once
#include "../algorithm.hpp"
#include "../geq_status.h"
namespace RPiController {
// Back End algorithm to apply appropriate GEQ settings.
struct GeqConfig {
uint16_t offset;
double slope;
Pwl strength; // lux to strength factor
};
class Geq : public Algorithm
{
public:
Geq(Controller *controller);
char const *Name() const override;
void Read(boost::property_tree::ptree const ¶ms) override;
void Prepare(Metadata *image_metadata) override;
private:
GeqConfig config_;
};
} // namespace RPiController
libcamera/vivid.git/'>libcamera/vivid.git
blob: 13d1ba5439fb65f8f9b9f3d17733dfbc626c3b96 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
/* SPDX-License-Identifier: BSD-2-Clause */
/*
* Copyright (C) 2019, Raspberry Pi (Trading) Limited
*
* alsc.hpp - ALSC (auto lens shading correction) control algorithm
*/
#pragma once
#include <mutex>
#include <condition_variable>
#include <thread>
#include "../algorithm.hpp"
#include "../alsc_status.h"
namespace RPiController {
// Algorithm to generate automagic LSC (Lens Shading Correction) tables.
struct AlscCalibration {
double ct;
double table[ALSC_CELLS_X * ALSC_CELLS_Y];
};
struct AlscConfig {
// Only repeat the ALSC calculation every "this many" frames
uint16_t frame_period;
// number of initial frames for which speed taken as 1.0 (maximum)
uint16_t startup_frames;
// IIR filter speed applied to algorithm results
double speed;
double sigma_Cr;
double sigma_Cb;
double min_count;
uint16_t min_G;
double omega;
uint32_t n_iter;
double luminance_lut[ALSC_CELLS_X * ALSC_CELLS_Y];
double luminance_strength;
std::vector<AlscCalibration> calibrations_Cr;
|