Subversion Repositories seema-scanner

Rev

Rev 227 | 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:
227 jakw 24
        SMCaptureWorker(): setupSuccessful(0), working(0), focusingPattern(0), projector(nullptr), camera0(nullptr), camera1(nullptr), rotationStage(nullptr), algorithm(nullptr){}
207 flgw 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:
242 jakw 46
        void acquireFrameSequenceLDR(SMFrameSequence &frameSequence);
47
        void acquireFrameSequenceHDR(SMFrameSequence &frameSequence);
167 jakw 48
        bool setupSuccessful;
23 jakw 49
        bool working;
199 jakw 50
        bool focusingPattern;
27 jakw 51
        int delay;
139 jakw 52
        int stackingCalibration;
53
        int stackingAcquisition;
27 jakw 54
        QString codec;
226 jakw 55
        std::unique_ptr<Projector> projector;
56
        std::unique_ptr<Camera> camera0;
57
        std::unique_ptr<Camera> camera1;
58
        std::unique_ptr<RotationStage> rotationStage;
59
        std::unique_ptr<Algorithm> algorithm;
9 jakw 60
};
61
 
62
#endif // SMCaptureWorker_H