The orthogonal Procrustes problem
Originally, this problem questioned ways of finding orthogonal transformation between two matrices. Maybe that doesn't sound relevant to real computer vision applications, but that feeling may change when you consider the fact that a set of points is indeed a matrix. Camera calibration, rigid body transformations, photogrammetry issues, and many other tasks require solving of the orthogonal Procrustes problem. In this recipe, we find a solution to the simple task of estimation point set rotation and examine how our solution is influenced by noisy input data.
Getting ready
Before you proceed with this recipe, you need to install the OpenCV 3.0 (or greater) Python API package.
How to do it...
You need to complete the following steps:
- Import the modules:
import cv2 import numpy as np
- Generate an initial points set. Then create a set of rotated points by applying a rotation matrix to the initial points. Also, add a portion of noise to our rotated points:
pts = np.random...