forked from martidi/opencv_dsm
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathossimOpenCvTPgenerator.h
More file actions
executable file
·51 lines (44 loc) · 1.36 KB
/
ossimOpenCvTPgenerator.h
File metadata and controls
executable file
·51 lines (44 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//----------------------------------------------------------------------------
//
// License: See top level LICENSE.txt file.
//
// File: ossimOpenCvTPgenerator.h
//
// Author: Martina Di Rita
//
// Description: Class provides a TPs generator
//
//----------------------------------------------------------------------------
#ifndef ossimOpenCvTPgenerator_HEADER
#define ossimOpenCvTPgenerator_HEADER 1
//#include <opencv/cv.h>
#include <opencv2/opencv.hpp>
#include <ossim/base/ossimRefPtr.h>
#include <ossim/imaging/ossimImageDataFactory.h>
//https://stackoverflow.com/questions/33400823/opencv-3-0-0-cvvector-missing
namespace cv
{
using std::vector;
}
class ossimOpenCvTPgenerator
{
public:
ossimOpenCvTPgenerator();
ossimOpenCvTPgenerator(cv::Mat master, cv::Mat slave);
bool operator()(const cv::KeyPoint& a, const cv::KeyPoint& b);
// running command
bool execute();
cv::Mat getWarpedImage();
// private function
void TPgen();
void TPdraw();
cv::Mat estRT(std::vector<cv::Point2f> master, std::vector<cv::Point2f> slave);
bool TPwarp();
cv::Mat mask_master, mask_slave;
cv::Mat slave_mat_warp;
cv::Mat master_mat, slave_mat;
cv::vector<cv::KeyPoint> keypoints1, keypoints2;
vector<cv::DMatch > good_matches;
double slave_x, slave_y, master_x, master_y;
};
#endif /* #ifndef ossimOpenCvTPgenerator_HEADER */