66 lines
1.4 KiB
C++
66 lines
1.4 KiB
C++
#ifndef PROFILE_H
|
|
#define PROFILE_H
|
|
#include <QSettings>
|
|
#include <stdint.h>
|
|
#include <vector>
|
|
#include <QRandomGenerator>
|
|
#include <opencv2/core/mat.hpp>
|
|
#include <uvosunwrap/unwrap.h>
|
|
|
|
#include "camera.h"
|
|
|
|
class CameraSetup
|
|
{
|
|
public:
|
|
size_t id;
|
|
RemapMap remapMap;
|
|
cv::Mat darkmap;
|
|
cv::Mat bgmask;
|
|
void store(const QString& filename) const;
|
|
void load(const QString& name, size_t cameraId);
|
|
};
|
|
|
|
class LightingSetup
|
|
{
|
|
static constexpr const char* GROUP = "Lighting";
|
|
|
|
public:
|
|
double brightness = 0.25;
|
|
uint8_t mask = 0;
|
|
|
|
void store(QSettings& settings) const;
|
|
void load(const QSettings& settings);
|
|
};
|
|
|
|
class Profile
|
|
{
|
|
static constexpr const char* GROUP = "Profile";
|
|
|
|
QString name_;
|
|
|
|
public:
|
|
uint64_t id;
|
|
LightingSetup lighting;
|
|
double exposureTime = 1.0/60.0;
|
|
cv::Mat lightmap;
|
|
cv::Mat calcurve;
|
|
std::vector<CameraSetup> cameras;
|
|
bool nodistort = false;
|
|
|
|
Profile(const QString& name = "Unamed");
|
|
void store(QSettings& settings) const;
|
|
void store(const QString& name);
|
|
void store();
|
|
void load(QSettings& settings);
|
|
void load(const QString& name);
|
|
void load();
|
|
void deleteProfile() const;
|
|
void setName(const QString name){name_=name;}
|
|
void setCamerasSetupsFromDescription(const std::vector<cam::Camera::Description>& desc);
|
|
QString getName() const {return name_;}
|
|
bool camerasSufficant(const std::vector<cam::Camera::Description>& desc) const;
|
|
static QList<QString> avaiableProfiles();
|
|
static QString profileLocation();
|
|
};
|
|
|
|
#endif // PROFILE_H
|