Initial commit
This commit is contained in:
59
src/cameras.h
Normal file
59
src/cameras.h
Normal file
@ -0,0 +1,59 @@
|
||||
#ifndef CAMERAS_H
|
||||
#define CAMERAS_H
|
||||
|
||||
#include <QObject>
|
||||
#include <vector>
|
||||
#include <uvoscam.h>
|
||||
#include <uvosled.h>
|
||||
#include <memory.h>
|
||||
#include <stdint.h>
|
||||
#include <QSettings>
|
||||
#include <opencv2/core/mat.hpp>
|
||||
|
||||
#include "profile.h"
|
||||
#include "camera.h"
|
||||
|
||||
class Cameras : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
static constexpr const char* GROUP = "Cameras";
|
||||
|
||||
private:
|
||||
|
||||
uvosled* led_;
|
||||
bool free_ = false;
|
||||
double exposrueTime_ = 1.0/60.0;
|
||||
LightingSetup lighting_;
|
||||
std::vector<std::shared_ptr<Camera>> cameras_;
|
||||
std::vector<Camera::Image> images_;
|
||||
|
||||
private slots:
|
||||
void imageRecived(Camera::Image img);
|
||||
|
||||
signals:
|
||||
void cameraRemoved(std::shared_ptr<Camera> camera);
|
||||
void cameraAdded(std::shared_ptr<Camera> camera);
|
||||
void newImages(std::vector<Camera::Image> images_);
|
||||
|
||||
public slots:
|
||||
|
||||
bool setExposureTime(double exposureTime);
|
||||
void trigger();
|
||||
bool start();
|
||||
bool stop();
|
||||
bool setFree(bool free);
|
||||
void setLighting(const LightingSetup& lighting) {lighting_ = lighting;}
|
||||
|
||||
public:
|
||||
bool setCameras(const std::vector<cam::Camera::Description>& descriptions);
|
||||
bool addCamera(const cam::Camera::Description& desc);
|
||||
std::vector<cam::Camera::Description> getCameras();
|
||||
size_t numCameras(){return cameras_.size();}
|
||||
void clear();
|
||||
Cameras(uvosled* led = nullptr);
|
||||
void load(QSettings& settings);
|
||||
void store(QSettings& settings);
|
||||
};
|
||||
|
||||
#endif // CAMERAS_H
|
Reference in New Issue
Block a user