Ask Your Question

Revision history [back]

For solve this problem in the first use findHomography() then compute rotation value in the last use perspectiveTransform() to transform object points to scene points.

const int n = 100; Point2f first_8_points[n],second_8_points[n]; Mat H = findHomography(first_8_points, second_8_points, CV_RANSAC ); float roatation = acos( H.at<double>(0,0)) * 180/CV_PI; perspectiveTransform( object_points, scene_points, H);

For solve this problem in the first use findHomography() then compute rotation value in the last use perspectiveTransform() to transform object points to scene points.

 const int n = 100;
Point2f first_8_points[n],second_8_points[n];
Mat H = findHomography(first_8_points, second_8_points, CV_RANSAC );
float roatation = acos( H.at<double>(0,0)) * 180/CV_PI;
perspectiveTransform( object_points, scene_points, H);

H);

For solve this problem in the first use findHomography() then compute rotation value in the last use perspectiveTransform() to transform object points to scene points.

 const int n = 100;
 Point2f first_8_points[n],second_8_points[n];
object_points[n],scene_points[n];
  Mat H = findHomography(first_8_points, second_8_points, findHomography(object_points, scene_points, CV_RANSAC );
  float roatation =  acos( H.at<double>(0,0)) * 180/CV_PI;
  perspectiveTransform( object_points, scene_points, H);