added axes plotting

This commit is contained in:
Tejaswi D Prakash 2022-04-16 20:45:50 +05:30
parent 60a1fade5e
commit 8b3c547598

View File

@ -89,6 +89,21 @@ def load_grid(xrange=10, yrange=10):
lines = np.vstack(lines)
return merge_points_lines(points3d, lines)
def load_axes():
points3d = np.array([
[0., 0., 0.],
[1., 0., 0.],
[0., 1., 0.],
[0., 0., -1.]
])
lines = np.array([
[0,1],
[0,2],
[0,3]
], dtype=np.int)
points3d = np.hstack((points3d, np.ones((points3d.shape[0], 1))))
return points3d, lines
def check_calib(path, out, vis=False, show=False, debug=False):
if vis:
out_dir = join(out, 'check')
@ -195,8 +210,9 @@ if __name__ == "__main__":
parser.add_argument('--debug', action='store_true')
parser.add_argument('--cube', action='store_true')
parser.add_argument('--grid', action='store_true')
parser.add_argument('--axes', action='store_true')
parser.add_argument('--calib', action='store_true')
args = parser.parse_args()
if args.cube:
points, lines = load_cube()
@ -204,6 +220,9 @@ if __name__ == "__main__":
elif args.grid:
points, lines = load_grid(xrange=15, yrange=14)
check_scene(args.path, args.out, points, lines)
elif args.axes:
points, lines = load_axes()
check_scene(args.path, args.out, points, lines)
elif args.calib:
check_match(args.path, args.out)
else: