cdcseacave / openMVS

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

Can we convert openMVS output to COLMAP #1040

Open dinushazoomi opened 1 year ago

dinushazoomi commented 1 year ago

Is your feature request related to a problem? Please describe. I would like to use the openMVS output to display a user-interactive window, where the user can view the coordinates of the 3D reconstructed point cloud.

Describe the solution you'd like if I can convert the openMVS output to COLMAP I can use something like https://github.com/rerun-io/rerun/tree/main for that.

cdcseacave commented 1 year ago

already implemented, see InterfaceCOLMAP app

adricostas commented 3 months ago

Hello,

I was also trying to export a MVS scene to colmap format with InterfaceCOLMAP app. This is the command that I'm using: ./InterfaceCOLMAP --working-folder $WORKING_FOLDER --input-file sceneMVS.mvs --output-file $WORKING_FOLDER/colmap/

However, this is not working. I get the following error:

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted

It seems that is breaking here:

if (!ARCHIVE::SerializeLoad(scene, MAKE_PATH_SAFE(OPT::strInputFileName)))

Is the command ok? How can I get rid off this error?

Thanks!

cdcseacave commented 3 months ago

it seems to work just fine, here is an example:

InterfaceCOLMAP scene.mvs
08:43:50 [App     ] OpenMVS x64 v2.3.0
08:43:50 [App     ] Build date: Aug  7 2024, 08:42:52
08:43:50 [App     ] CPU:  (14 cores)
08:43:50 [App     ] RAM: 36.00GB Physical Memory 0B Virtual Memory
08:43:50 [App     ] OS: Darwin 23.6.0 (arm64)
08:43:50 [App     ] Disk:
08:43:50 [App     ] warning: no SSE compatible CPU or OS detected
08:43:50 [App     ] Command line: InterfaceCOLMAP scene.mvs
08:43:50 [App     ] Writing cameras: sparse/cameras.bin
08:43:50 [App     ] Writing points: sparse/points3D.bin
08:43:50 [App     ] Writing fusion configuration: stereo/fusion.cfg
08:43:50 [App     ] Writing patch-match configuration: stereo/patch-match.cfg
08:43:50 [App     ] Writing images: sparse/images.bin
08:43:50 [App     ] Input data exported: 83 images & 27659 vertices (29ms)
adricostas commented 3 months ago

Ok, thanks for verifying. Just in case this could help someone, it seems that my problem was that I was exporting the scene with mvsScene->Save() function instead of mvsScene->SaveInterface(). Now it is working.