Skip to content
Snippets Groups Projects
snapshot_source.cpp 784 B
Newer Older
#include "snapshot_source.hpp"
#include "colour.hpp"
#include <loguru.hpp>

#include <opencv2/opencv.hpp>
#include <Eigen/Eigen>
#include <opencv2/core/eigen.hpp>
#include <vector>
using ftl::rgbd::detail::SnapshotSource;
using std::vector;
SnapshotSource::SnapshotSource(ftl::rgbd::Source *host, SnapshotReader &reader, const string &id) : detail::Source(host) {
Nicolas Pope's avatar
Nicolas Pope committed
    Eigen::Matrix4d pose;
    reader.getCameraRGBD(id, rgb_, depth_, pose, params_);

	ftl::rgbd::colourCorrection(rgb_, host->value("gamma", 1.0f), host->value("temperature", 6500));

Nicolas Pope's avatar
Nicolas Pope committed
	host->on("gamma", [this,host](const ftl::config::Event&) {
		ftl::rgbd::colourCorrection(rgb_, host->value("gamma", 1.0f), host->value("temperature", 6500));
	});