nmoehrle / mvs-texturing

Algorithm to texture 3D reconstructions from multi-view stereo images
Other
933 stars 328 forks source link

Segfault on Kermit Data - Eigen Empty Matrix error during Seam Levelling #79

Closed soulslicer closed 7 years ago

soulslicer commented 7 years ago

Hi all,

I have compiled the latest master with RESEARCH off and DEBUG on. I have downloaded the kermit dataset which I have attached here (https://drive.google.com/open?id=0B2OqM2rPr8gEeXdnaWFvdDR6N1E).

I ran the following command:

./texrecon scene::undistorted kermit_surface_clean.ply textured

However, I received this segfault response with an Eigen Empty Matrix Error:

./texrecon (built on Jun 10 2017, 14:23:12)
Load and prepare mesh: 
PLY Loader: comment Export generated by libmve
Reading PLY: 17408 verts... 30768 faces... done.
    Removed 2 redundant faces.
Generating texture views: 
Initializing scene with 11 views...
Initialized 11 views (max ID is 10), took 0ms.
        Loading 36%...Warning: View 0004 has no byte image undistorted          
        Loading 45%...Warning: View 0006 has no byte image undistorted          
        Loading 73%...Building adjacency graph:                                 
        Adding edges 100%... done. (Took 0.04s)                                 
    43991 total edges.
View selection:
    Building BVH from 30766 faces... done. (Took: 26 ms)
        Calculating face qualities 100%... done. (Took 0.054s)                  
        Postprocessing face infos 100%... done. (Took 0.001s)                   
    Maximum quality of a face within an image: 0
    Clamping qualities to 0 within normalization.
    Writing data cost file... done.
    30766 faces have not been seen by a view.
    Took: 0.373s
Generating texture patches:
    Running... done. (Took 0.046s)
    0 texture patches.
Running global seam leveling:
    Create matrices for optimization...  done.
    Lhs dimensionality: 0 x 0
    Calculating adjustments:
texrecon: /home/USER/mvs-texturing/elibs/eigen/Eigen/src/Core/Redux.h:202: static Eigen::internal::redux_impl<Func, Derived, 3, 0>::Scalar Eigen::internal::redux_impl<Func, Derived, 3, 0>::run(const Derived&, const Func&) [with Func = Eigen::internal::scalar_sum_op<float>; Derived = Eigen::Matrix<float, -1, 1>; Eigen::internal::redux_impl<Func, Derived, 3, 0>::Scalar = float]: Assertion `size && "you are using an empty matrix"' failed.
Aborted (core dumped)
soulslicer commented 7 years ago

I have included my own dataset as well (https://drive.google.com/open?id=0B2OqM2rPr8gEYlFqTVdQMmlvdDQ)

Same error:


Running global seam leveling:
    Create matrices for optimization...  done.
    Lhs dimensionality: 0 x 0
    Calculating adjustments:
texrecon: /home/raaj/mvs-texturing/elibs/eigen/Eigen/src/Core/Redux.h:202: static Eigen::internal::redux_impl<Func, Derived, 3, 0>::Scalar Eigen::internal::redux_impl<Func, Derived, 3, 0>::run(const Derived&, const Func&) [with Func = Eigen::internal::scalar_sum_op<float>; Derived = Eigen::Matrix<float, -1, 1>; Eigen::internal::redux_impl<Func, Derived, 3, 0>::Scalar = float]: Assertion `size && "you are using an empty matrix"' failed.
texrecon: /home/raaj/mvs-texturing/elibs/eigen/Eigen/src/Core/Redux.h:202: static Eigen::internal::redux_impl<Func, Derived, 3, 0>::Scalar Eigen::internal::redux_impl<Func, Derived, 3, 0>::run(const Derived&, const Func&) [with Func = Eigen::internal::scalar_sum_op<float>; Derived = Eigen::Matrix<float, -1, 1>; Eigen::internal::redux_impl<Func, Derived, 3, 0>::Scalar = float]: Assertion `size && "you are using an empty matrix"' failed.
texrecon: /home/raaj/mvs-texturing/elibs/eigen/Eigen/src/Core/Redux.h:202: static Eigen::internal::redux_impl<Func, Derived, 3, 0>::Scalar Eigen::internal::redux_impl<Func, Derived, 3, 0>::run(const Derived&, const Func&) [with Func = Eigen::internal::scalar_sum_op<float>; Derived = Eigen::Matrix<float, -1, 1>; Eigen::internal::redux_impl<Func, Derived, 3, 0>::Scalar = float]: Assertion `size && "you are using an empty matrix"' failed.
Aborted (core dumped)

Seems to be happening during the adjustments stage in the global seam levelling step
soulslicer commented 7 years ago

Wow..turns out my transform matrix was inverted.

My transform was RGB to World. The system seems to want World to RGB.