openMVS icon indicating copy to clipboard operation
openMVS copied to clipboard

Can we convert openMVS output to COLMAP

Open dinushazoomi opened this issue 2 years ago • 1 comments

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.

dinushazoomi avatar Aug 08 '23 16:08 dinushazoomi

already implemented, see InterfaceCOLMAP app

cdcseacave avatar Aug 11 '23 06:08 cdcseacave

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!

adricostas avatar Aug 06 '24 13:08 adricostas

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)

cdcseacave avatar Aug 07 '24 05:08 cdcseacave

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.

adricostas avatar Aug 08 '24 06:08 adricostas