parser.add( '--config', is_config_file=True, help='YAML config file path. Please refer to default_config.yml as a ' 'reference. It overrides the default config file, but will be ' 'overridden by other command line inputs.') parser.add('--integrate_color', action='store_true') parser.add('--path_trajectory', help='path to the trajectory .log or .json file.') parser.add('--path_npz', help='path to the npz file that stores voxel block grid.', default='vbg.npz') config = parser.get_config() if config.path_dataset == '': config.path_dataset = get_default_testdata() config.path_trajectory = os.path.join(config.path_dataset, 'trajectory.log') if config.integrate_color: depth_file_names, color_file_names = load_rgbd_file_names(config) else: depth_file_names = load_depth_file_names(config) color_file_names = None intrinsic = load_intrinsic(config) extrinsics = load_extrinsics(config.path_trajectory, config) vbg = integrate(depth_file_names, color_file_names, intrinsic, extrinsics, config) mesh = vbg.extract_triangle_mesh()
parser.add( '--config', is_config_file=True, help='YAML config file path. Please refer to default_config.yml as a ' 'reference. It overrides the default config file, but will be ' 'overridden by other command line inputs.') parser.add('--integrate_color', action='store_true') parser.add('--path_trajectory', help='path to the trajectory .log or .json file.') parser.add('--path_npz', help='path to the npz file that stores voxel block grid.', default='vbg.npz') config = parser.get_config() if config.path_dataset == '': config = get_default_testdata(config) if config.integrate_color: depth_file_names, color_file_names = load_rgbd_file_names(config) else: depth_file_names = load_depth_file_names(config) color_file_names = None depth_intrinsic = load_intrinsic(config) color_intrinsic = load_intrinsic(config, 'color') extrinsics = load_extrinsics(config.path_trajectory, config) vbg = integrate(depth_file_names, color_file_names, depth_intrinsic, color_intrinsic, extrinsics, config) pcd = vbg.extract_point_cloud()