Subversion Repositories seema-scanner

Rev

Rev 207 | Rev 227 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
9 jakw 1
 
2
#ifndef SMCaptureWorker_H
3
#define SMCaptureWorker_H
4
 
23 jakw 5
#include "SMTypes.h"
6
#include "ProjectorOpenGL.h"
7
#include "Camera.h"
8
#include "RotationStage.h"
41 jakw 9
#include "Algorithm.h"
23 jakw 10
 
9 jakw 11
#include <QObject>
12
#include <opencv2/opencv.hpp>
13
 
23 jakw 14
enum mode {
15
    modeIdle,
27 jakw 16
    modeSMCalibrationSet,
23 jakw 17
    modeFrameSequence
18
};
9 jakw 19
 
20
class SMCaptureWorker : public QObject{
21
    Q_OBJECT
22
 
23
    public:
207 flgw 24
        SMCaptureWorker(): setupSuccessful(0), working(0), projector(nullptr), camera0(nullptr), camera1(nullptr), rotationStage(nullptr), algorithm(nullptr){}
25
        ~SMCaptureWorker(){}
9 jakw 26
    public slots:
27
        void setup();
28
        void doWork();
23 jakw 29
        void rotateTo(float angle);
30
        void acquireCalibrationSet(float angle);
31
        void acquireCalibrationSets(std::vector<float> angles);
32
        void acquireFrameSequence(float angle);
33
        void acquireFrameSequences(std::vector<float> angles);
34
        void abort();
35
        void stopWork();
199 jakw 36
        void setProjectFocusingPattern(bool _focusingPattern){focusingPattern = _focusingPattern;}
9 jakw 37
    signals:
38
        void newFrame(unsigned int camID, cv::Mat frame);
27 jakw 39
        void newCalibrationSet(SMCalibrationSet frameSet);
40
        void newFrameSequence(SMFrameSequence frameSequence);
30 jakw 41
        void rotatedTo(float angle);
23 jakw 42
        void busy();
43
        void done();
9 jakw 44
        void finished();
45
    private:
167 jakw 46
        bool setupSuccessful;
23 jakw 47
        bool working;
199 jakw 48
        bool focusingPattern;
27 jakw 49
        int delay;
139 jakw 50
        int stackingCalibration;
51
        int stackingAcquisition;
27 jakw 52
        QString codec;
226 jakw 53
        std::unique_ptr<Projector> projector;
54
        std::unique_ptr<Camera> camera0;
55
        std::unique_ptr<Camera> camera1;
56
        std::unique_ptr<RotationStage> rotationStage;
57
        std::unique_ptr<Algorithm> algorithm;
9 jakw 58
};
59
 
60
#endif // SMCaptureWorker_H