diff --git a/voxelisation.py b/voxelisation.py index 2026263..5f16c42 100644 --- a/voxelisation.py +++ b/voxelisation.py @@ -1,4 +1,5 @@ import os +import pickle import mcubes import numpy as np @@ -167,6 +168,10 @@ fg_sigma = np.array(fg_raw_voxel) # bg_sigma = np.array(bg_raw_voxel) threshold = 0.5 +# save the raw_voxel in pickle format +fd = open("raw_voxel_256.pkl", "wb") +pickel.dump(fg_sigma, fd) +fd.close() # vertices, triangles = mcubes.marching_cubes(sigma, threshold) # mesh = trimesh.Trimesh(vertices / N - .5, triangles)