MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / draw_pcd

Function draw_pcd

tools/preprocess/human_visualization.py:999–1015  ·  view source on GitHub ↗
(pcd_list, save_path=None)

Source from the content-addressed store, hash-verified

997
998
999def draw_pcd(pcd_list, save_path=None):
1000 fig = plt.figure()
1001 ax = fig.add_subplot(111, projection="3d")
1002
1003 color_list = ["r", "g", "b", "y", "p"]
1004
1005 for _idx, _pcd in enumerate(pcd_list):
1006 ax.scatter(_pcd[:, 0], _pcd[:, 1], _pcd[:, 2], c=color_list[_idx], marker="o")
1007
1008 ax.set_xlabel("X")
1009 ax.set_ylabel("Y")
1010 ax.set_zlabel("Z")
1011
1012 if save_path is not None:
1013 plt.savefig(save_path)
1014 else:
1015 plt.savefig("tmp.png")
1016
1017
1018def load_image(img, reverse=False):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected