Beispiel #1
0
def pc_loader(f_name):
    '''Assumes that the point-clouds were created with:
    '''
    tokens = f_name.split('/')
    model_id = tokens[-1].split('.')[0]
    synet_id = tokens[-2]
    return load_ply(f_name), model_id, synet_id
Beispiel #2
0
def pc_loader(ply_file):
    ending = 'ply'
    drop = len(ending) + 1
    category = ''
    model_id = osp.basename(ply_file)
    model_id = model_id[:-drop]
    return load_ply(ply_file), model_id, category
Beispiel #3
0
    def pc_loader(self, file_name, normalize=True, load_color=False):
        if file_name[-4:] == '.ply':
            if load_color:
                points, color = load_ply(file_name, with_color=True)
                pc = Point_Cloud(points)
            else:
                pc = Point_Cloud(ply_file=file_name)
                color = None

            if normalize:
                pc.center_in_unit_sphere()
            pc.rotate_z_axis_by_degrees(self.z_rot_degrees, clockwise=False)

        return pc, color