diff --git a/stitching/apap.py b/stitching/apap.py index 7a4693f..e357641 100644 --- a/stitching/apap.py +++ b/stitching/apap.py @@ -48,7 +48,7 @@ def local_homography(self, src_point, dst_point, vertices): for i in range(mesh_n): for j in range(pt_size): dist = np.tile(vertices[i, j], (sample_n, 1)) - src_point - weight = np.exp(-(np.sqrt(dist[:, 0] ** 2 + dist[:, 1] ** 2) * inverse_sigma)) + weight = np.exp(-((dist[:, 0]**2 + dist[:, 1]**2) * inverse_sigma)) weight[weight < self.gamma] = self.gamma local_weight[i, j, :] = weight A = np.expand_dims(np.repeat(weight, 2), -1) * aa