def AffineFromPoints(src1,src2,dst1,dst2,new_size,interpolate=BILINEAR):
    
    # Compute the transformation parameters
    A = [[src1.X(),-src1.Y(),1,0],
         [src1.Y(),src1.X(),0,1],
         [src2.X(),-src2.Y(),1,0],
         [src2.Y(),src2.X(),0,1]]
    b = [dst1.X(),dst1.Y(),dst2.X(),dst2.Y()]
    A = array(A)
    b = array(b)
    result = solve(A,b)
    
    a,b,tx,ty = result    
    # Create the transform matrix
    matrix = array([[a,-b,tx],[b,a,ty],[0,0,1]],'d')
    
    return AffineTransform(matrix,new_size,interpolate)
An affine transform that will rotate, translate, and scale to map one 
dataset/ETHPy150Open bolme/pyvision/src/pyvision/types/Affine.py/AffineFromPoints