Subversion Repositories seema-scanner

Rev

Rev 25 | Rev 36 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 25 Rev 27
Line 1... Line 1...
1
 
1
 
2
#ifndef SMTriangulator_H
2
#ifndef SMReconstructionWorker_H
3
#define SMTriangulator_H
3
#define SMReconstructionWorker_H
4
 
4
 
5
#include "SMTypes.h"
5
#include "SMTypes.h"
-
 
6
#include "SMCalibrationParameters.h"
-
 
7
#include "Codec.h"
6
 
8
 
7
#include <QObject>
9
#include <QObject>
8
#include <QTime>
10
#include <QTime>
9
 
11
 
10
#include <opencv2/opencv.hpp>
12
#include <opencv2/opencv.hpp>
11
#include <pcl/point_cloud.h>
13
#include <pcl/point_cloud.h>
12
#include <pcl/point_types.h>
14
#include <pcl/point_types.h>
13
 
15
 
14
class SMTriangulator : public QObject {
16
class SMReconstructionWorker : public QObject {
15
    Q_OBJECT
17
    Q_OBJECT
16
 
18
 
17
    public:
19
    public:
18
        SMTriangulator();
20
        SMReconstructionWorker(){}
19
        ~SMTriangulator();
21
        ~SMReconstructionWorker(){}
20
        void triangulateFromUp(cv::Mat &up, cv::Mat &xyz);
-
 
21
        void triangulateFromVp(cv::Mat &vp, cv::Mat &xyz);
-
 
22
        void triangulateFromUpVp(cv::Mat &up, cv::Mat &vp, cv::Mat &xyz);
-
 
23
        void triangulate(cv::Mat &up, cv::Mat &vp, cv::Mat &mask, cv::Mat &shading, cv::Mat &pointCloud);
-
 
24
 
-
 
25
    public slots:
22
    public slots:
-
 
23
        void setup();
-
 
24
        void reconstructPointCloud(SMFrameSequence frameSequence);
26
        void triangulatePointCloud(cv::Mat up, cv::Mat vp, cv::Mat mask, cv::Mat shading);
25
        void reconstructPointClouds(std::vector<SMFrameSequence> frameSequences);
27
    signals:
26
    signals:
28
        void imshow(const char* windowName, cv::Mat mat, unsigned int x, unsigned int y);
-
 
29
        void newPointCloud(pcl::PointCloud<pcl::PointXYZRGB>::Ptr pointCloud);
27
        void newPointCloud(pcl::PointCloud<pcl::PointXYZRGB>::Ptr pointCloud);
30
        void error(QString err);
28
        void error(QString err);
31
        //void finished();
29
        void done();
32
    private:
30
    private:
33
        CalibrationParameters calibration;
31
        void triangulateFromUp(cv::Mat up0, cv::Mat mask0,cv::Mat up1, cv::Mat mask1,cv::Mat &xyz);
-
 
32
        void triangulateFromVp(cv::Mat vp0, cv::Mat mask0, cv::Mat vp1, cv::Mat mask1, cv::Mat &xyz);
-
 
33
        void triangulateFromUpVp(cv::Mat up0, cv::Mat vp0, cv::Mat mask0, cv::Mat up1, cv::Mat vp1, cv::Mat mask1, cv::Mat &xyz);
34
 
34
 
-
 
35
    private:
-
 
36
        SMCalibrationParameters calibration;
-
 
37
        CodecDir dir;
35
        QTime time;
38
        QTime time;
36
 
-
 
37
        cv::Mat determinantTensor;
-
 
38
        cv::Mat uc, vc;
39
        Decoder *decoder;
39
        cv::Mat lensMap1, lensMap2;
40
        cv::Mat lensMap0Horz, lensMap0Vert, lensMap1Horz, lensMap1Vert;
40
};
41
};
41
 
42
 
42
#endif
43
#endif