Subversion Repositories seema-scanner

Rev

Rev 23 | Rev 27 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 23 Rev 25
1
/*
-
 
2
 *
-
 
3
 MVTracker - Multi View Tracking for Pose Estimation
-
 
4
 (c) 2014 Jakob Wilm, DTU, Kgs.Lyngby, Denmark
-
 
5
 *
-
 
6
*/
-
 
7
 
1
 
8
#ifndef SMCaptureWorker_H
2
#ifndef SMCaptureWorker_H
9
#define SMCaptureWorker_H
3
#define SMCaptureWorker_H
10
 
4
 
11
#include "SMTypes.h"
5
#include "SMTypes.h"
12
#include "ProjectorOpenGL.h"
6
#include "ProjectorOpenGL.h"
13
#include "Camera.h"
7
#include "Camera.h"
14
#include "RotationStage.h"
8
#include "RotationStage.h"
15
 
9
 
16
#include <QObject>
10
#include <QObject>
17
#include <opencv2/opencv.hpp>
11
#include <opencv2/opencv.hpp>
18
 
12
 
19
enum mode {
13
enum mode {
20
    modeIdle,
14
    modeIdle,
21
    modeCalibrationSet,
15
    modeCalibrationSet,
22
    modeFrameSequence
16
    modeFrameSequence
23
};
17
};
24
 
18
 
25
class SMCaptureWorker : public QObject{
19
class SMCaptureWorker : public QObject{
26
    Q_OBJECT
20
    Q_OBJECT
27
 
21
 
28
    public:
22
    public:
29
        SMCaptureWorker(){}
23
        SMCaptureWorker(){}
30
        ~SMCaptureWorker();
24
        ~SMCaptureWorker();
31
    public slots:
25
    public slots:
32
        void setup();
26
        void setup();
33
        void doWork();
27
        void doWork();
34
        void rotateTo(float angle);
28
        void rotateTo(float angle);
35
        void acquireCalibrationSet(float angle);
29
        void acquireCalibrationSet(float angle);
36
        void acquireCalibrationSets(std::vector<float> angles);
30
        void acquireCalibrationSets(std::vector<float> angles);
37
        void acquireFrameSequence(float angle);
31
        void acquireFrameSequence(float angle);
38
        void acquireFrameSequences(std::vector<float> angles);
32
        void acquireFrameSequences(std::vector<float> angles);
39
        void abort();
33
        void abort();
40
        void stopWork();
34
        void stopWork();
41
    signals:
35
    signals:
42
        void newFrame(unsigned int camID, cv::Mat frame);
36
        void newFrame(unsigned int camID, cv::Mat frame);
43
        void newCalibrationSet(CalibrationSet frameSet);
37
        void newCalibrationSet(CalibrationSet frameSet);
44
        void newFrameSequence(FrameSequence frameSequence);
38
        void newFrameSequence(FrameSequence frameSequence);
45
        void busy();
39
        void busy();
46
        void done();
40
        void done();
47
        void finished();
41
        void finished();
48
    private:
42
    private:
49
        bool working;
43
        bool working;
50
        Projector* projector;
44
        Projector* projector;
51
        Camera* camera0;
45
        Camera* camera0;
52
        Camera* camera1;
46
        Camera* camera1;
53
        RotationStage* rotationStage;
47
        RotationStage* rotationStage;
54
};
48
};
55
 
49
 
56
#endif // SMCaptureWorker_H
50
#endif // SMCaptureWorker_H
57
 
51