我正在使用 opencv 的“warpperspective”函数相对于 image1 转换 image2。
我们的输出图像如下。谁能告诉我如何知道图像下方指向的坐标角?
warprospective 的代码如下 -
std::vector< Point2f > points1,points2;
for( int i = 0; i < matches1.size(); i++ )
{
points1.push_back( keypoints_input1[matches1[i].queryIdx ].pt );
points2.push_back( keypoints_input2[matches1[i].trainIdx ].pt );
}
/* Find the Homography Matrix for current and next frame*/
Mat H1 = findHomography( points2, points1, CV_RANSAC );
/* Use the Homography Matrix to warp the images*/
cv::Mat result1;
warpPerspective(input2, result1, H1, Size(input2.cols+150, input2.rows+150),
INTER_CUBIC);
imshow("resut",result1);
...
}
谢谢。