28template<
typename T,
unsigned int R,
unsigned int C,
29 std::enable_if_t<std::is_arithmetic_v<T>> * =
nullptr>
31template<
typename T,
unsigned int R,
unsigned int C>
66 for (
const auto &value :
yaml.asList()) {
68 std::optional<Matrix<T, R, C>>
matrix =
80 << matrices_[
ct].toString();
83 if (matrices_.size() < 1) {
93 ASSERT(matrices_.size() > 0);
95 if (matrices_.size() == 1 ||
96 ct <= matrices_.begin()->first)
97 return matrices_.begin()->second;
99 if (
ct >= matrices_.rbegin()->first)
100 return matrices_.rbegin()->second;
102 if (matrices_.find(
ct) != matrices_.end())
103 return matrices_[
ct];
106 auto iter = matrices_.upper_bound(
ct);
117 std::map<unsigned int, Matrix<T, R, C>> matrices_;
A class representing the tree structure of the YAML content.
Definition yaml_parser.h:26
Class for storing, retrieving, and interpolating matrices.
Definition matrix_interpolator.h:34
int readYaml(const libcamera::YamlObject &yaml, const std::string &key_name, const std::string &matrix_name)
Initialize an MatrixInterpolator instance from yaml.
Definition matrix_interpolator.h:55
void reset()
Reset the matrix interpolator content to a single identity matrix.
Definition matrix_interpolator.h:49
MatrixInterpolator(const std::map< unsigned int, Matrix< T, R, C > > &matrices)
Construct a matrix interpolator from a map of matrices.
Definition matrix_interpolator.h:41
Matrix< T, R, C > get(unsigned int ct)
Retrieve a matrix from the list of matrices, interpolating if necessary.
Definition matrix_interpolator.h:91
Matrix class.
Definition matrix.h:32
static Matrix identity()
Construct an identity matrix.
Definition matrix.h:44
#define LOG_DECLARE_CATEGORY(name)
Declare a category of log messages.
Definition log.h:47
#define LOG(category, severity)
Log a message.
Definition log.h:123
#define ASSERT(condition)
Abort program execution if assertion fails.
Definition log.h:127
Top-level libcamera namespace.
Definition backtrace.h:17