cdcseacave / openMVS

open Multi-View Stereo reconstruction library
http://cdcseacave.github.io
GNU Affero General Public License v3.0
3.21k stars 895 forks source link

Crash at ReconstructMesh. Segmentation fault #219

Open lhbuaa2009 opened 7 years ago

lhbuaa2009 commented 7 years ago

Specifications of operating system and hardware

OS: Ubuntu 16.04 LTS CPU: Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz RAM: 15.55GB Physical Memory 15.26GB Virtual Memory

Steps to reproduce the problem

Hi, I'm using the openMVS library recently and have came across a problem when I ran the ReconstructMesh. The image dataset that I used is just the SceauxCastle in the tutorial, and I have generated a sparse point cloud using openMVG. And the dense scene file has been also created smoothly with DensifyPointCloud. But every time when I ran the :
$ ./ReconstructMesh scene_dense.mvs it systematically throws a segmentation fault. The following is the log:

$ ./ReconstructMesh scene_dense.mvs 15:31:19 [App ] Build date: May 30 2017, 18:38:20 15:31:19 [App ] CPU: Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz 15:31:19 [App ] RAM: 15.55GB Physical Memory 15.26GB Virtual Memory 15:31:19 [App ] OS: Linux 4.8.0-52-generic (x86_64) 15:31:19 [App ] SSE & AVX compatible CPU & OS detected 15:31:19 [App ] Command line: scene_dense.mvs 15:31:19 [App ] Scene loaded (304ms): 11 images (11 calibrated) with a total of 3.95 MPixels (0.36 MPixels/image) 381853 points, 0 vertices, 0 faces Points inserted 381853 (100%, 3s429ms)
Segmentation fault (core dumped)

when I run gdb, it generate the following output: $ gdb ./ReconstructMesh core .................. Reading symbols from ./ReconstructMesh...(no debugging symbols found)...done. [New LWP 13090] [New LWP 13092] [New LWP 13094] [New LWP 13093] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `./ReconstructMesh scene_dense.mvs'. Program terminated with signal SIGSEGV, Segmentation fault.

0 0x00007fa6b9c5e666 in SEACAVE::TFrustum<double, 4>::Set(Eigen::Matrix<double, 3, 4, 1, 3, 4> const&, double, double, double, double) ()

from /home/luo/openMVS_build/lib/libMVS.so [Current thread is 1 (Thread 0x7fa6ba1187c0 (LWP 13090))]

Dose it means that there is something wrong with my Eigen library? I have tried to rebuild my Ceres and openMVS using an old version(eigen3.2.10) instead of the original 3.3, but it still cannot work well. I'm wondering whether someone else has experienced the same or similar problem. I would appreciate it well if you can offer me some advice.

cdcseacave commented 7 years ago

Indeed, people signaled problems before trying to use the latest Eigen version. Please make sure you are using Eigen 3.2.x for OpenMVS.

lhbuaa2009 commented 7 years ago

thanks. I will try the whole process once more with an old eigen version.

lhbuaa2009 commented 7 years ago

Hi, thanks for your suggestions. I have rebuilded the ceres and openMVS with an old version Eigen 3.2.9, and it can get through the whole process well. And now I have a small question. I have noticed that it only generates the .ply file in binary form when running Densifypointcloud. Can it also output the .ply file in a char form ?

pmoulon commented 7 years ago

You can use CloudCompare or Meshlab to convert the PLY file to bin to ascii

balaclava9 commented 10 months ago

does it still need Eigen 3.2.x to run properly? I got the same error.

cdcseacave commented 10 months ago

Eigen 3.4 is needed, pls see the wiki