can't use findhomography
Hello, I'm have code use findhomography function. It can compile but when i run it have error my code:
and my error
Please help me. Sorry because my English not good The best is give me a video to use it, thanks.
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/features2d/features2d.hpp"
#include <iostream>
using namespace std;
using namespace cv;
int main()
{
Mat I1,I2,I3;
I1=imread("D:\detect\box.png");
I2=imread("D:\detect\box_in_scene.png");
I3=findHomography(I1,I2,CV_RANSAC,2);
system("PAUSE");
return 1;
}
you have to use it with vector<point>, not with images as input.
see docs
although i fix it but it doesn't run I1=imread("D:\detect\box.png"); I2=imread("D:\detect\box_in_scene.png");
again, I1 and I2 must not be images, but Point arrays, either as
vector<Point>
orMat(1,N,CV_32FC2)
can you help me convert it to vector, thanks
I convert image to vector but error too:
it's not a conversion issue. you need x,y points, not pixels. not images , again.
can you give it a break, and have a look at the tutorial ?
thanks you :D