diff --git a/pointcloud.py b/pointcloud.py index ca7cebb..7b5f9c4 100644 --- a/pointcloud.py +++ b/pointcloud.py @@ -205,6 +205,16 @@ def write_clusters(path, clusters, type_column=6): types = np.unique(cluster[:, type_column], axis=0).astype(int) + def type_mapping(t): + if t == 0: + return 2 + elif t == 1: + return 1 + elif t == 3: + return 4 + return t + + types = np.array([type_mapping(t) for t in types]) print("Types: ", types) np.savetxt(file, types.reshape(1, types.shape[0]),delimiter=';', header='', comments='', fmt='%i')