Initial commit
This commit is contained in:
commit
5efbdcbd6a
32 changed files with 1914 additions and 0 deletions
67
src/profile.h
Normal file
67
src/profile.h
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
#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;
|
||||
void load(size_t cameraId);
|
||||
static QString camerasLocation();
|
||||
static QString remapMapLocation(size_t cameraId);
|
||||
static QString bgmaskLocation(size_t cameraId);
|
||||
static QString darkmapLocation(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_ = "NULL";
|
||||
|
||||
public:
|
||||
uint64_t id;
|
||||
LightingSetup lighting;
|
||||
double exposureTime = 1.0/60.0;
|
||||
cv::Mat lightmap;
|
||||
std::vector<CameraSetup> cameras;
|
||||
|
||||
Profile(const QString& name = "NULL");
|
||||
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();
|
||||
void setName(const QString name){name_=name;}
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue