我正在 Visual Studio 2012 上使用 OpenCV 2.3.1 进行图像拼接项目。由于未知原因,我的程序无法正常工作!
#include "opencv2/highgui/highgui.hpp"
#include "opencv/cv.h"
#include <stdio.h>
#include <iostream>
using namespace cv;
using namespace std;
Mat getHomography()
{
vector<Point2f> points1;
vector<Point2f> points2;
points1.push_back(Point2f(10, 100));
points1.push_back(Point2f(100, 10));
points1.push_back(Point2f(200, 20));
points1.push_back(Point2f(80, 30));
points2.push_back(Point2f(220, 20));
points2.push_back(Point2f(10, 220));
points2.push_back(Point2f(90, 120));
points2.push_back(Point2f(100, 20));
Mat H = findHomography(Mat(points1), Mat(points2), 8, 3.0);
return H;
}
int main(){
Mat HH = getHomography();
cout<<HH;
system("pause");
return 0;
}
我的问题: 任何帮助plzzz