Subversion Repositories seema-scanner

Rev

Rev 207 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 207 Rev 245
1
#ifndef CODEC_H
1
#ifndef CODEC_H
2
#define CODEC_H
2
#define CODEC_H
3
 
3
 
4
#include <vector>
4
#include <vector>
5
#include <opencv2/opencv.hpp>
5
#include <opencv2/opencv.hpp>
6
#include "SMCalibrationParameters.h"
6
#include "SMCalibrationParameters.h"
7
 
7
 
8
// Base class for all Algorithms
8
// Base class for all Algorithms
9
class Algorithm {
9
class Algorithm {
10
    public:
10
    public:
11
        Algorithm(unsigned int _screenCols, unsigned int _screenRows) : N(0), screenCols(_screenCols), screenRows(_screenRows){}
11
        Algorithm(unsigned int _screenCols, unsigned int _screenRows) : N(0), screenCols(_screenCols), screenRows(_screenRows){}
12
    virtual ~Algorithm(){}
12
    virtual ~Algorithm(){}
13
        unsigned int getNPatterns(){return N;}
13
        unsigned int getNPatterns(){return N;}
14
        int getscreenCols(){return screenCols;}
14
        int getscreenCols(){return screenCols;}
15
        int getscreenRows(){return screenRows;}
15
        int getscreenRows(){return screenRows;}
16
        // Encoding
16
        // Encoding
17
        virtual cv::Mat getEncodingPattern(unsigned int depth) = 0;
17
        virtual cv::Mat getEncodingPattern(unsigned int depth) = 0;
18
        // Matching
18
        // Matching
19
        virtual void get3DPoints(const SMCalibrationParameters &calibration, const std::vector<cv::Mat>& frames0, const std::vector<cv::Mat>& frames1, std::vector<cv::Point3f>& Q, std::vector<cv::Vec3b>& color) = 0;
19
        virtual void get3DPoints(const SMCalibrationParameters &calibration, const std::vector<cv::Mat>& frames0, const std::vector<cv::Mat>& frames1, std::vector<cv::Point3f>& Q, std::vector<cv::Vec3f>& color) = 0;
20
    protected:
20
    protected:
21
        unsigned int N;
21
        unsigned int N;
22
        unsigned int screenCols, screenRows;
22
        unsigned int screenCols, screenRows;
23
};
23
};
24
 
24
 
25
 
25
 
26
#endif // CODEC_H
26
#endif // CODEC_H
27
 
27