blob: c05dbb17a2647db37422e043c305f17814d30d7c (
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
|
/* SPDX-License-Identifier: BSD-2-Clause */
/*
* Copyright (C) 2019, Raspberry Pi Ltd
*
* CCM (colour correction matrix) control algorithm
*/
#pragma once
#include <vector>
#include "libcamera/internal/matrix.h"
#include <libipa/pwl.h>
#include "../ccm_algorithm.h"
namespace RPiController {
/* Algorithm to calculate colour matrix. Should be placed after AWB. */
struct CtCcm {
double ct;
libcamera::Matrix<double, 3, 3> ccm;
};
struct CcmConfig {
std::vector<CtCcm> ccms;
libcamera::ipa::Pwl saturation;
};
class Ccm : public CcmAlgorithm
{
public:
Ccm(Controller *controller = NULL);
char const *name() const override;
int read(const libcamera::YamlObject ¶ms) override;
void setSaturation(double saturation) override;
void initialise() override;
void prepare(Metadata *imageMetadata) override;
private:
CcmConfig config_;
double saturation_;
};
} /* namespace RPiController */
|