Subversion Repositories seema-scanner

Rev

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

Rev 27 Rev 36
1
 
1
 
2
#ifndef SMReconstructionWorker_H
2
#ifndef SMReconstructionWorker_H
3
#define SMReconstructionWorker_H
3
#define SMReconstructionWorker_H
4
 
4
 
5
#include "SMTypes.h"
5
#include "SMTypes.h"
6
#include "SMCalibrationParameters.h"
6
#include "SMCalibrationParameters.h"
7
#include "Codec.h"
7
#include "Codec.h"
8
 
8
 
9
#include <QObject>
9
#include <QObject>
10
#include <QTime>
10
#include <QTime>
11
 
11
 
12
#include <opencv2/opencv.hpp>
12
#include <opencv2/opencv.hpp>
13
#include <pcl/point_cloud.h>
13
#include <pcl/point_cloud.h>
14
#include <pcl/point_types.h>
14
#include <pcl/point_types.h>
15
 
15
 
16
class SMReconstructionWorker : public QObject {
16
class SMReconstructionWorker : public QObject {
17
    Q_OBJECT
17
    Q_OBJECT
18
 
18
 
19
    public:
19
    public:
20
        SMReconstructionWorker(){}
20
        SMReconstructionWorker(){}
21
        ~SMReconstructionWorker(){}
21
        ~SMReconstructionWorker(){}
22
    public slots:
22
    public slots:
23
        void setup();
23
        void setup();
24
        void reconstructPointCloud(SMFrameSequence frameSequence);
24
        void reconstructPointCloud(SMFrameSequence frameSequence);
25
        void reconstructPointClouds(std::vector<SMFrameSequence> frameSequences);
25
        void reconstructPointClouds(std::vector<SMFrameSequence> frameSequences);
26
    signals:
26
    signals:
27
        void newPointCloud(pcl::PointCloud<pcl::PointXYZRGB>::Ptr pointCloud);
27
        void newPointCloud(pcl::PointCloud<pcl::PointXYZRGB>::Ptr pointCloud);
28
        void error(QString err);
28
        void error(QString err);
29
        void done();
29
        void done();
30
    private:
30
    private:
31
        void triangulateFromUp(cv::Mat up0, cv::Mat mask0,cv::Mat up1, cv::Mat mask1,cv::Mat &xyz);
31
        void triangulate(std::vector<cv::Point2f>& q0, std::vector<cv::Point2f>& q1, std::vector<cv::Point3f> &Q);
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
 
32
 
35
    private:
33
    private:
36
        SMCalibrationParameters calibration;
34
        SMCalibrationParameters calibration;
37
        CodecDir dir;
35
        CodecDir dir;
38
        QTime time;
36
        QTime time;
39
        Decoder *decoder;
37
        Decoder *decoder;
40
        cv::Mat lensMap0Horz, lensMap0Vert, lensMap1Horz, lensMap1Vert;
38
        cv::Mat lensMap0Horz, lensMap0Vert, lensMap1Horz, lensMap1Vert;
41
};
39
};
42
 
40
 
43
#endif
41
#endif
44
 
42