modified mesh fusion for personal use
Source: https://github.com/davidstutz/mesh-fusion
create an environment
conda create -n environment_name python=3.7.4
activate the environment
conda activate environment_name
sudo apt install freeglut3-dev mesa-utils
sudo apt-get install libglew-dev
sudo apt install cmake
conda install -c anaconda cython=0.29.2 h5py=2.9.0 scipy=1.1.0
pip3 install pymeshlab
git clone https://github.com/UncleTom111/mesh_fusion_cpu.git
cd mesh_fusion_cpu
cd libfusioncpu
mkdir build
cd build
cmake ..
make
cd ..
python setup.py build_ext --inplace
cd ..
cd librender
python setup.py build_ext --inplace
cd ..
cd libmcubes
python setup.py build_ext --inplace
cd ..
In order to import librender
, libfusion
, libmcubes
in 2_fusion.py
conveniently, we need to modify this repository a little bit.
!!!! The name of generated .so
files are various in different PC system and environment. !!!!
- Step 1 -- find thsese
.so
files under directories librender, libmcubes and libfusioncpu - Step 2 -- change the file name below according to the
.so
files you have found - example:
pyrender.cpython-38-x86_64-linux-gnu.so
cp -i ./librender/pyrender.cpython-37m-x86_64-linux-gnu.so ./pyrender.so
cp -i ./libfusioncpu/cyfusion.cpython-37m-x86_64-linux-gnu.so ./cyfusion.so
cp -i ./libmcubes/mcubes.cpython-37m-x86_64-linux-gnu.so ./mcubes.so
python 1_scale.py --in_dir=examples/0_in/ --out_dir=examples/1_scaled/
python 2_fusion.py --mode=render --in_dir=examples/1_scaled/ --depth_dir=examples/2_depth/ --out_dir=examples/2_watertight/
python 2_fusion.py --mode=fuse --in_dir=examples/1_scaled/ --depth_dir=examples/2_depth/ --out_dir=examples/2_watertight/
python 3_simplify.py --in_dir=examples/2_watertight/ --out_dir=examples/3_out/