In this recipe, you will learn how to extract rotation from a homography transformation between two views captured by a camera undergoing only rotation motion with respect to its optical center. This is useful if, for example, you need to estimate the rotation between two views, assuming that the translation is negligible compared to distances to scene points. That's often the case in landscape photo stitching.
Rotational camera case - estimating camera rotation from homography
Getting ready
Before you proceed with this recipe, you need to install the OpenCV version 3.3 (or greater) Python API package.