Subversion Repositories seema-scanner

Rev

Rev 41 | Rev 70 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed


#ifndef SMReconstructionWorker_H
#define SMReconstructionWorker_H

#include "SMTypes.h"
#include "SMCalibrationParameters.h"
#include "Algorithm.h"

#include <QObject>
#include <QTime>

#include <opencv2/opencv.hpp>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>

class SMReconstructionWorker : public QObject {
    Q_OBJECT

    public:
        SMReconstructionWorker(){}
        ~SMReconstructionWorker(){}
    public slots:
        void setup();
        void reconstructPointCloud(SMFrameSequence frameSequence);
        void reconstructPointClouds(std::vector<SMFrameSequence> frameSequences);
    signals:
        void newPointCloud(SMPointCloud pointCloud);
        void error(QString err);
        void done();
    private:
        void triangulate(std::vector<cv::Point2f>& q0, std::vector<cv::Point2f>& q1, std::vector<cv::Point3f> &Q);

    private:
        SMCalibrationParameters calibration;
        CodingDir dir;
        QTime time;
        Algorithm *algorithm;
        cv::Mat lensMap0Horz, lensMap0Vert, lensMap1Horz, lensMap1Vert;
};

#endif