cdcseacave / openMVS

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

[TextureMesh]: Assertion failed: (components.empty() || components[f] == components[fAdj]) #971

Open apurvazaveri opened 1 year ago

apurvazaveri commented 1 year ago

Hello,

I get error when running TextureMesh. Please note that sometimes it works just fine and sometimes when I run the same command it fails with the following error. Although, it fails more often then it works.

11:27:16 [App     ] Build date: Jan 17 2023, 12:08:37
11:27:16 [App     ] CPU: Intel(R) Xeon(R) W-3245 CPU @ 3.20GHz (32 cores)
11:27:16 [App     ] RAM: 160.00GB Physical Memory 160.00GB Virtual Memory
11:27:16 [App     ] OS: Darwin 22.3.0 (x86_64)
11:27:16 [App     ] Disk:
11:27:16 [App     ] SSE & AVX compatible CPU & OS detected
11:27:16 [App     ] Command line: TextureMesh --working-folder /Users/az/test_dense/0 --input-file model_colmap_dense_b_dense_filtered_mesh.mvs --output-file model_colmap_dense_b_textured.mvs --mesh-file out_model_remesh.ply
11:27:17 [App     ] Scene loaded (728ms):
    14 images (14 calibrated) with a total of 285.76 MPixels (20.41 MPixels/image)
    0 points, 65960 vertices, 131721 faces
11:27:17 [App     ] Mesh loaded: 5103 vertices, 9976 faces (5ms)
Initialized views 12 (100%, 13s156ms)
Assertion failed: (components.empty() || components[f] == components[fAdj]), function FaceViewSelection, file /Users/az/third_party/openmvs_011423/openMVS/libs/MVS/SceneTexture.cpp, line 1183.
[1]    13839 abort       --working-folder  --input-file model_colmap_dense_b_dense_filtered_mesh.mvs

What exactly is this assertion checking? Do I need to clean up my mesh? Any pointers on fixing this issue?

cdcseacave commented 1 year ago

I see you are importing a mesh, did you check it to be manifold? you can either manually fix it if so, or use OpenMVS Clean method in ReconstructMesh

apurvazaveri commented 1 year ago

my mesh is manifold i had to rebuild and the issue went away.