Here is a basic example that tries to align two random sets of 10 points
import numpy as np import cv2 shape = (1, 10, 2) # Needs to be a 3D array source = np.random.randint(0, 100, shape).astype(np.int) target = source + np.array([1, 0]).astype(np.int) transformation = cv2.estimateRigidTransform(source, target, False)
The documentation is here .
source share