Opencv 2.4.3 estimateRigidTransform in python
Question: This is really a mess for me and I have a hard time trying to solve this. I
want to use the method cv2.estimateRigitTransform in Python with numpy arrays
but I can't find anywhere an example or something else that explains the
format of the src and dst numpy arrays needed.

Could somebody send me a little example of these 2 arrays that will work with
this method? I have all the data (in 2D of course) but can't find how to shape
it in a numpy array.

Please help me. Thank you!


Answer: Here's 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)
    

[Documentation is
here](http://docs.opencv.org/modules/video/doc/motion_analysis_and_object_tracking.html#estimaterigidtransform).

