From a6a347e53e24ecc80d99cd63b1fddee7673861e5 Mon Sep 17 00:00:00 2001 From: Adam Gradzki Date: Tue, 21 Nov 2017 10:19:29 -0600 Subject: [PATCH] ppf_icp.py: Python 3 support --- modules/surface_matching/samples/ppf_icp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/surface_matching/samples/ppf_icp.py b/modules/surface_matching/samples/ppf_icp.py index 6a68e5287..d845b9850 100644 --- a/modules/surface_matching/samples/ppf_icp.py +++ b/modules/surface_matching/samples/ppf_icp.py @@ -20,8 +20,8 @@ noise = np.random.normal(0.0, 0.1, height * width * 3).reshape((-1, 3)) noise2 = np.random.normal(0.0, 1.0, height * width) x, y = np.meshgrid( - range(-width/2, width/2), - range(-height/2, height/2), + range(-width//2, width//2), + range(-height//2, height//2), sparse=False, indexing='xy' ) z = np.zeros((height, width)) @@ -42,7 +42,7 @@ Rt = np.vstack(( np.array([0, 0, 0, 1]) )).astype(np.float32) -icp = cv2.ppf_match_3d.ICP(100) +icp = cv2.ppf_match_3d_ICP(100) I = np.eye(4) print("Unaligned error:\t%.6f" % np.linalg.norm(I - Rt))