Closed Majid9287 closed 5 months ago
I solved this problem by referring to #1058
Pls see wiki or the python script for using OpenMVS included
Pls see wiki or the python script for using OpenMVS included
When exporting a textured mesh from OpenMVS TextureMesh, I get scene_dense_mesh_refine_texture.ply with no color information. Why is this happening, and how can I get a textured output with color?
Command used: [os.path.join(OPENMVS_BIN, "TextureMesh"), "scene_dense.mvs", "-m" ,"scene_dense_mesh_refine.ply", "-o", "scene_dense_mesh_refine_texture.mvs", "--decimate", "0.5", "-w",mvs_dir]
OpenMVS does not output a mesh with vertex color, only with texture
I'm facing a perplexing issue with OpenMVS that I'm hoping someone in this community might be able to shed some light on.
Problem:
I'm running a 3D reconstruction pipeline using OpenMVS, and I've noticed that the ReconstructMesh, RefineMesh, and TextureMesh steps are not generating the expected .mvs output files (e.g., scene_dense_mesh.mvs, scene_dense_mesh_refine.mvs, scene_dense_mesh_refine_texture.mvs). Instead, I'm only getting the corresponding .ply files (e.g., scene_dense_mesh.ply, scene_dense_mesh_refine.ply, scene_dense_mesh_refine_texture.ply). `INFO:root:Running subprocess command: /usr/local/bin/OpenMVS/DensifyPointCloud scene.mvs --resolution-level 1 --number-views 8 -w /tmp/tmpq8m3cb27/mvs INFO:root:Command output: 12:37:21 [App ] OpenMVS x64 v2.3.0 12:37:21 [App ] Build date: May 21 2024, 22:59:34 12:37:21 [App ] CPU: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz (4 cores) 12:37:22 [App ] RAM: 3.76GB Physical Memory 1.00GB Virtual Memory 12:37:22 [App ] OS: Linux 5.15.146.1-microsoft-standard-WSL2 (x86_64) 12:37:22 [App ] Disk: 937.09GB (1006.85GB) space 12:37:22 [App ] SSE & AVX compatible CPU & OS detected 12:37:22 [App ] Command line: DensifyPointCloud scene.mvs --resolution-level 1 --number-views 8 -w /tmp/tmpq8m3cb27/mvs 12:37:22 [App ] Camera model loaded: platform 0; camera 0; f 1.059x1.059; poses 5 12:37:22 [App ] Scene loaded from interface format (68ms): 5 images (5 calibrated) with a total of 28.74 MPixels (5.75 MPixels/image) 3973 points, 0 vertices, 0 faces 12:37:22 [App ] The camera directions mean is unbalanced; the scene will be considered unbounded (no ROI) 12:37:22 [App ] Point-cloud composed of 3973 points with:
INFO:root:Command stderr: INFO:root:Directory contents of /tmp/tmpq8m3cb27/mvs: ['scene_dense.ply', 'scene_dense.mvs', 'depth0004.dmap', 'depth0002.dmap', 'image_2.jpg', 'depth0003.dmap', 'image_4.jpg', 'depth0001.dmap', 'image_0.jpg', 'scene.mvs', 'DensifyPointCloud-2405281237218B45E7.log', 'image_1.jpg', 'depth0000.dmap', 'image_3.jpg'] INFO:root:Running subprocess command: /usr/local/bin/OpenMVS/ReconstructMesh scene_dense.mvs -w /tmp/tmpq8m3cb27/mvs INFO:root:Command output: 12:48:21 [App ] OpenMVS x64 v2.3.0 12:48:21 [App ] Build date: May 21 2024, 22:59:34 12:48:21 [App ] CPU: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz (4 cores) 12:48:21 [App ] RAM: 3.76GB Physical Memory 1.00GB Virtual Memory 12:48:21 [App ] OS: Linux 5.15.146.1-microsoft-standard-WSL2 (x86_64) 12:48:21 [App ] Disk: 936.91GB (1006.85GB) space 12:48:21 [App ] SSE & AVX compatible CPU & OS detected 12:48:21 [App ] Command line: ReconstructMesh scene_dense.mvs -w /tmp/tmpq8m3cb27/mvs 12:48:21 [App ] Camera model loaded: platform 0; camera 0; f 1.059x1.059; poses 5 12:48:21 [App ] Scene loaded from interface format (44ms): 5 images (5 calibrated) with a total of 7.18 MPixels (1.44 MPixels/image) 3973 points, 0 vertices, 0 faces 12:48:22 [App ] Point-cloud 'scene_dense.ply' loaded: 664763 points (692ms) Points inserted 664763 (100%, 5s752ms) 12:48:28 [App ] Delaunay tetrahedralization completed: 664763 points -> 287500 vertices, 1855242 (+232) cells, 3710600 (+348) faces (6s143ms) Points weighted 287500 (100%, 15s252ms) 12:48:46 [App ] Delaunay tetrahedras weighting completed: 1855474 cells, 3710948 faces (17s576ms) 12:48:52 [App ] Delaunay tetrahedras graph-cut completed (139945 flow): 286146 vertices, 572645 faces (5s477ms) 12:48:52 [App ] Mesh reconstruction completed: 286366 vertices, 572645 faces (30s143ms) 12:48:57 [App ] Cleaned mesh: 286202 vertices, 571896 faces (5s166ms) 12:49:00 [App ] Cleaned mesh: 286202 vertices, 571896 faces (2s467ms) 12:49:02 [App ] Cleaned mesh: 286202 vertices, 571896 faces (2s11ms) 12:49:02 [App ] Mesh saved: 286202 vertices, 571896 faces (202ms) 12:49:02 [App ] MEMORYINFO: { 12:49:02 [App ] VmPeak: 1018480 kB 12:49:02 [App ] VmSize: 685072 kB 12:49:02 [App ] } ENDINFO
INFO:root:Command stderr: INFO:root:Directory contents of /tmp/tmpq8m3cb27/mvs: ['scene_dense.ply', 'scene_dense.mvs', 'depth0004.dmap', 'depth0002.dmap', 'image_2.jpg', 'ReconstructMesh-2405281248218B4715.log', 'depth0003.dmap', 'scene_dense_mesh.ply', 'image_4.jpg', 'depth0001.dmap', 'image_0.jpg', 'scene.mvs', 'DensifyPointCloud-2405281237218B45E7.log', 'image_1.jpg', 'depth0000.dmap', 'image_3.jpg'] INFO:root:Running subprocess command: /usr/local/bin/OpenMVS/RefineMesh scene_dense_mesh.mvs --scales 1 --gradient-step 25.05 -w /tmp/tmpq8m3cb27/mvs INFO:root:Command output: 12:49:02 [App ] OpenMVS x64 v2.3.0 12:49:02 [App ] Build date: May 21 2024, 22:59:34 12:49:02 [App ] CPU: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz (4 cores) 12:49:02 [App ] RAM: 3.76GB Physical Memory 1.00GB Virtual Memory 12:49:02 [App ] OS: Linux 5.15.146.1-microsoft-standard-WSL2 (x86_64) 12:49:02 [App ] Disk: 936.90GB (1006.85GB) space 12:49:02 [App ] SSE & AVX compatible CPU & OS detected 12:49:02 [App ] Command line: RefineMesh scene_dense_mesh.mvs --scales 1 --gradient-step 25.05 -w /tmp/tmpq8m3cb27/mvs 12:49:02 [App ] MEMORYINFO: { 12:49:02 [App ] VmPeak: 194648 kB 12:49:02 [App ] VmSize: 194648 kB 12:49:02 [App ] } ENDINFO
INFO:root:Command stderr: ERROR:root:Error in refining the mesh with scales and max face area: ERROR:root:Error during 3D model generation: Error in refining the mesh with scales and max face area (Exit code: 1)`
`run_subprocess( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_ComputeSfM_DataColor"), "-i", f"{reconstruction_dir}/sfm_data.bin", "-o", os.path.join(reconstruction_dir, "colorized.ply")], "Error in colorizing structure" )