diff --git a/superpaper/perspective.py b/superpaper/perspective.py index 55e09cc..8f625bc 100644 --- a/superpaper/perspective.py +++ b/superpaper/perspective.py @@ -438,7 +438,7 @@ def find_coeffs(source_coords, target_coords): for s, t in zip(source_coords, target_coords): matrix.append([t[0], t[1], 1, 0, 0, 0, -s[0]*t[0], -s[0]*t[1]]) matrix.append([0, 0, 0, t[0], t[1], 1, -s[1]*t[0], -s[1]*t[1]]) - A = np.matrix(matrix, dtype=np.float) + A = np.matrix(matrix, dtype=np.float64) B = np.array(source_coords).reshape(8) # res = np.dot(np.linalg.inv(A.T * A) * A.T, B) res = np.linalg.solve(A, B)