hello,
I have 2 sets of image points (x,y) from 2 images (ImgX, ImgY)
I would like to use these image points and find the affine transformation between the two images.
The getAffineTransform() function of openCV gives me a matrix of
individual image points rather than a final matrix which I can apply for the entire image. So how do i get a final affine transformation matrix that can be applied for the image?
What I have tried:
vector<vector < Point2f > > imagePoints;
Mat view ; Mat viewGray = Mat::zeros( view.rows, view.cols, view.type() );
for (int j =0; j< imagePoints[0].size(); j++)
{
cv::Mat affImg= getAffineTransform( & imagePoints[0][j], & imagePoints[1][j]);
cv::warpAffine(view,viewGray,affImg, view.size());
showImage("Affine transform", viewGray);
cv::waitKey(0);
}
so, in the above case, do i need to push_back the affImg matrix in a vector of Matrix?