So imagine that there is a camera looking at your computer screen. What I am trying to do is determine how much that camera is rotated, how far away it is from the screen, and where it is relative to the screen's center. In short the rotation and translation matrices.

I'm using opencv to do this, and followed their camera calibration example to do this task with a checkerboard pattern and a frame from a webcam. I would like to do with any generic images, namely a screen cap and a frame from a webcam.

I've tried using the feature detection algorithms to get a list of keypoints from both images and then match those keypoints with a BFMatcher, but have run into problems. Specifically SIFT does not match keypoints correctly, and SURF does not find keypoints correctly on a scaled image.

Is there an easier solution to this problem? I feel that this would be a common thing that people have done, but have not found much discussion of it online.

Thanks!!

Edit
Report