fwilliams / surface-reconstruction-benchmark

A working copy of the code from "A Benchmark for Surface Reconstruction" by Berger et. Al
BSD 2-Clause "Simplified" License
51 stars 14 forks source link

Missing Dependencies in README and Missing build targets in CMakeLists.txt #2

Open leaf0917 opened 4 years ago

leaf0917 commented 4 years ago

I follow your instructions when I execute _cmake .. -DCMAKE_BUILDTYPE=Release. There are the following mistakes. How can I solve them? Thank you.

-- Could NOT find OpenEXR (missing: ILMBASE_INCLUDE_PATH OPENEXR_INCLUDE_PATH OPENEXR_IMATH_LIBRARY OPENEXR_ILMIMF_LIBRARY OPENEXR_IEX_LIBRARY OPENEXR_HALF_LIBRARY) (found version "1.6.1") -- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR) CMake Error at pbrt/CMakeLists.txt:19 (message): OPENEXR_FOUND

-- Configuring incomplete, errors occurred!

fwilliams commented 4 years ago

This error appears is because you don't have OpenEXR and libTiff install on your system which is a dependency for the library. If you search for these for your distribution, they should be available.

I'll add these to the list of dependencies.

fwilliams commented 4 years ago

Can you also tell me what platform you're trying to build on?

leaf0917 commented 4 years ago

I'm sorry to reply to you late because of time difference, my platform is Ubuntu 18.04.5 LTS.

fwilliams commented 4 years ago

Did you try installing the additional dependencies? I updated the README to reflect these. It seems you're missing OpenEXR and libtiff.

leaf0917 commented 4 years ago

I installed these libraries and compiled, but I'm not sure if it was successful because I didn't find the executable files in the ./bin directory, but found it in the bulid directory, such as _implicituniform, but _mesh_toimplicit and isosurface are not found.

fwilliams commented 4 years ago

Ah this is a typo in the README. Cmake will output build artifacts in the directory where you launched it by default. So these binaries should be in build. I'll update the readme and close the issue. Let me know if there are any other problems and I'll reopen it.

leaf0917 commented 4 years ago

Another problem is that I can not find _mesh_toimplicit and isosurface, did you rename them

fwilliams commented 4 years ago

It looks like there's no target for these binaries in the CMakeLists. I haven't used this repo to scan any new meshes and just used the ones from the benchmark. Could you add these build targets and send a PR? I'd appreciate it a lot!

leaf0917 commented 4 years ago

I will try

fwilliams commented 4 years ago

@leaf0917 Turns out this was a very small 6 line fix to the CMakeLists.txt. If you grab the latest version, cmake should build these binaries for you.

leaf0917 commented 4 years ago

Thank you. I finally compiled it. But when I execute the example _python scripts/RunSampler.py data/pcs/bumps/bumps0.cnf, the following error occurs: _['./bin/uniform_sampler', 'modeling/models/bumps/bumps.mpu', 'data/pcs/bumps/bumps_0.npts', '50', '50', '9', 'min_range', '70.0000000', 'registration_error', '0.4000000', 'normal_type', '2'] Traceback (most recent call last): File "scripts/RunSampler.py", line 132, in runUniform(config, pathdir, infile, outfile) File "scripts/RunSampler.py", line 115, in runUniform runcommand(args) File "scripts/RunSampler.py", line 45, in runcommand raise RunError(args[0] + ': Fork falied with error \'' + e.strerror + '\'') main .RunError: Error: ./bin/uniformsampler: Fork falied with error 'No such file or directory'

fwilliams commented 4 years ago

Hi @leaf0917 it seems that a file is missing somewhere.

This repository is just a copy of the original codebase from Berger et.al and I don't know all its internals well. Unfortunately, I don't have time to debug this beyond ensuring that it builds. Given that the error seems to be in a Python script and you get a stack trace, it should be doable to fix it. If you do find any bugs, please send a pull request with your fixes.

Thanks!

leaf0917 commented 4 years ago

I will try to fix it, thank you so much!

HeCraneChen commented 3 years ago

Hi, thanks for the code! But I can't find pc_generator after executing "make". I only have the following .o files. Did you rename pc_generator to something else? [ 9%] Built target trimesh2 [ 13%] Built target tps [ 17%] Built target ann [ 26%] Built target OpenMesh [ 57%] Built target pbrt [ 62%] Built target Sampler [ 64%] Built target Modeling [ 67%] Built target sample_implicit [ 70%] Built target single_distribution [ 73%] Built target dump_single [ 76%] Built target implicit_uniform [ 76%] Built target isosurface [ 76%] Built target mesh_to_implicit [ 79%] Built target dump_barplot [ 82%] Built target run_evaluation [ 85%] Built target dump_meta [ 87%] Built target sample_mesh [ 89%] Built target aggregate_distribution [ 92%] Built target mesh_fixer [ 95%] Built target dump_distribution [ 98%] Built target aggregation [100%] Built target dump_lines [100%] Built target ann_exec

fwilliams commented 3 years ago

@HeCraneChen looks like there's just no build target in the CMakeLists.txt. This repository came to being for a particular project a few years ago and we only added targets for the binaries we needed then, so it's likely there are missing targets. Could you add one for pc_generator and send a pull request?

HeCraneChen commented 3 years ago

Pull request sent! That's also what I figured. I also added uniform_sampler to CMakeLists.txt. I hope I understood it correctly. Otherwise, it's going to complain no bin/uniform_sampler when running "python scripts/RunSampler.py config_file" . But there's still another problem when running this. I got "ERROR: uniform sampling not at prescribed size!" message from line 147 of UniformSampler.cpp. I figured this bug came from ImplicitSphere.h, where the code is trying to read "_spheresampled.npts"? But we don't have any npts file to read yet, right? The goal of this python script is to generate one npts file from the config file.