Project Page | Paper | Poster | Video
University of Bonn, PhenoRob
Note: We have developped a new, anisotropic version that achieves similar compression but preserves details much better, see this repository.
To clone the repository with all its submodules run
$ git clone --recursive https://github.com/moritzheep/adaptive-screen-meshing.gitOur method uses nvdiffrast to translate between the triangle mesh and the pixel grid. Please make sure that all dependencies of nvdiffrast are met, especially torch. Furthermore, we require OpenCV to be installed.
We prepared a Docker image to take care of these dependencies and facilitate testing. We still need the nvidia-container-runtime. It can be installed via
$ cd docker
$ .\nvidia-container-runtime.shTo build the image, run
$ cd docker
$ ./build.shFinally, run
$ docker run \
--runtime=nvidia \
--gpus all \
adaptive-screen-meshingto get a list of options. You can then mount a volume and point towards your input files. All arguments can be appended to the above command and are passed through.
To build the project, run
$ mkdir build
$ cd build
$ cmake ..
$ makeAfter the build has been completed successfully, you can run
$ src/main \
-n <path-to-the-normal-map> \
-m <path-to-the-foreground-mask> \
-t <path-to-save-the-mesh>for a quick test. The normal map should be in the .exr format, the mask can be any 8Bit grayscale format supported by OpenCV. The mesh can be saved to any format supported by the pmp-library. We recommend .obj.
You can run src/main to get of full list of all options.
If you get meshes that curve in the wrong direction, try flipping the x or y coordinate of your normal map.
@inproceedings{heep2024screen-space-meshing,
title={An Adaptive Screen-Space Meshing Approach for Normal Integration},
author={Moritz Heep and Eduard Zell},
booktitle = {European Conference on Computer Vision (ECCV)},
year={2024}
}