From bf863086a912bb524ff5518bef701da39283cc5d Mon Sep 17 00:00:00 2001 From: Peter Whidden Date: Mon, 1 Mar 2021 12:29:48 -0500 Subject: [PATCH] fix index bounds check if len(cams) is equal to ind-1 there will be an index error rather than printing the proper error message. This fixes this. --- llff/poses/pose_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llff/poses/pose_utils.py b/llff/poses/pose_utils.py index 3cc4eb5..5be0daa 100644 --- a/llff/poses/pose_utils.py +++ b/llff/poses/pose_utils.py @@ -60,7 +60,7 @@ def save_poses(basedir, poses, pts3d, perm): pts_arr.append(pts3d[k].xyz) cams = [0] * poses.shape[-1] for ind in pts3d[k].image_ids: - if len(cams) < ind - 1: + if len(cams) <= ind - 1: print('ERROR: the correct camera poses for current points cannot be accessed') return cams[ind-1] = 1