Subversion Repositories seema-scanner

Rev

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

Rev 42 Rev 70
Line 3... Line 3...
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
enum CodingDir {CodingDirNone = 0,
-
 
9
               CodingDirHorizontal = 1 << 0,
-
 
10
               CodingDirVertical = 1 << 1,
-
 
11
               CodingDirBoth = CodingDirHorizontal | CodingDirVertical};
-
 
12
 
-
 
13
// Base class for all Algorithms
8
// Base class for all Algorithms
14
class Algorithm {
9
class Algorithm {
15
    public:
10
    public:
16
        Algorithm(unsigned int _screenCols, unsigned int _screenRows, CodingDir _dir = CodingDirHorizontal) : N(0), screenCols(_screenCols), screenRows(_screenRows),  dir(_dir){}
11
        Algorithm(unsigned int _screenCols, unsigned int _screenRows) : N(0), screenCols(_screenCols), screenRows(_screenRows){}
17
    virtual ~Algorithm(){}
12
    virtual ~Algorithm(){}
18
        unsigned int getNPatterns(){return N;}
13
        unsigned int getNPatterns(){return N;}
19
        int getscreenCols(){return screenCols;}
14
        int getscreenCols(){return screenCols;}
20
        int getscreenRows(){return screenRows;}
15
        int getscreenRows(){return screenRows;}
21
        CodingDir getDir(){return dir;}
-
 
22
        // Encoding
16
        // Encoding
23
        virtual cv::Mat getEncodingPattern(unsigned int depth) = 0;
17
        virtual cv::Mat getEncodingPattern(unsigned int depth) = 0;
24
        // Matching
18
        // Matching
25
        virtual void get3DPoints(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(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;
26
    protected:
20
    protected:
27
        unsigned int N;
21
        unsigned int N;
28
        unsigned int screenCols, screenRows;
22
        unsigned int screenCols, screenRows;
29
        CodingDir dir;
-
 
30
};
23
};
31
 
24
 
32
 
25
 
33
#endif // CODEC_H
26
#endif // CODEC_H