The homography matrix can be decomposed into relative translation and rotation vectors between two plane object views. This recipe shows you how to do it in OpenCV.
Planar scene - decomposing homography into rotation and translation
Getting ready
Before you proceed with this recipe, you need to install the OpenCV version 3.3 (or greater) Python API package.
How to do it
You need to complete the following steps:
- Import the necessary modules:
import cv2
import numpy as np
- Load the camera matrix, distortion coefficients, and two photos of the same planar object (chessboard...