This forum is disabled, please visit https://forum.opencv.org

1 | initial version |

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);

2 | No.2 Revision |

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);

3 | No.3 Revision |

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);

Copyright OpenCV foundation, 2012-2018. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.