Problem with InterfaceOpenMVG

362 views
Skip to first unread message

Cícero Moraes

unread,
Feb 10, 2016, 6:22:40 PM2/10/16
to ope...@googlegroups.com
Hey there!

First of all, congratulations for the software openMVs, it is fantástic.

My names is Cícero Moraes ( https://en.wikipedia.org/wiki/Cícero_Moraes ), I'm a 3D designer and I'm working in a team that are developing an addon to make photogrammetry "inside" Blender.

Initially we would use openMVG+openMVS. We tested MVE too, and all works well with exportation, with exception of openMVS.

I build the code of GitHub following all the instructions in two computers, one i7 with 12 GB RAM (Ubuntu 15.10) with and other i5 with 4 GB RAM (Ubuntu 15.04).

When I use:

InterfaceOpenMVG -i sfm_data.json -o scene.mvs
20:06:44 [App     ] Build date: Feb  8 2016, 20:47:18
20:06:44 [App     ] CPU: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
20:06:44 [App     ] RAM: 11.70GB Physical Memory 27.94GB Virtual Memory
20:06:44 [App     ] OS: Linux 3.19.0-20-generic (x86_64)
20:06:44 [App     ] SSE & AVX compatible CPU & OS detected
20:06:44 [App     ] Command line: -i sfm_data.json -o scene.mvs
20:06:44 [App     ] Available options:

Generic options: [... appear the options]


It simply doesn't works. The log shows a lot of options that is not present in any document I read. In the docs appear only the -i with .jason file and the scene.mvs output.

I tried to fill the options, but when I put the list.txt with the image it crashed my computers. It is like a infinity loop command. The PC starts to stay slow and I have to wait a lot time to stop... or I have to restart it:

InterfaceOpenMVG -i sfm_data.json  -l list.txt -o scene.mvs
19:56:23 [App     ] Build date: Feb  8 2016, 20:47:18
19:56:23 [App     ] CPU: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
19:56:23 [App     ] RAM: 11.70GB Physical Memory 27.94GB Virtual Memory
19:56:23 [App     ] OS: Linux 3.19.0-20-generic (x86_64)
19:56:23 [App     ] SSE & AVX compatible CPU & OS detected
19:56:23 [App     ] Command line: -i sfm_data.json -l list.txt -o scene.mvs
19:56:23 [App     ] Reading:
19:56:23 [App     ] list.txt
19:56:23 [App     ] sfm_data.json
19:56:23 [App     ] Reading BAF file with:
19:56:23 [App     ]  num_intrinsics: 0
19:56:24 [App     ]  num_poses: 1667416698
19:56:24 [App     ]  num_points: 32587 [and... it craches or be slow]

I did it a lot of times, with some different options, but in all attempts or it doesn't run, or it crashes my PC.

Sorry to boring you, but I need a help to make it run.

Thank you for the attention. A big hug!

--
Cícero Moraes
Animator & 3D Artist
(66) 9903 7511
Homepage: www.ciceromoraes.com.br

cDc

unread,
Feb 10, 2016, 6:45:30 PM2/10/16
to openMVS, cogi...@gmail.com
Hi Cicero,

Sorry to hear you had problems using OpenMVS. Let's try to find a solution together.

First, please tell me what code you use for OpenMVS and OpenMVG. On my side, the latest version of OpenMVG (https://github.com/openMVG/openMVG/commit/b4b5149d99a0047d555d32c931427f5eb16ab25f) and the latest version OpenMVS (https://github.com/cdcseacave/openMVS/commit/227662cf4ac30252ce5710b6964eab98626513e4) are for sure working.

InterfaceOpenMVG can parse both the old OpenMVG format .BAF and also the new format, either .JSON or .BIN. In order to use it with the new format, all you have to do is:

```
InterfaceOpenMVG sfm_data.bin
```

Please note that you have to run this from the same path you run all the OpenMVG binaries. That is a limitation of the OpenMVG project format, caused by saving the relative path from the current folder (the folder you use for running the binaries) and not the relative path to the .BIN file.

Let's assume your current folder is Project, and it contains a subfolder called Images and a subfolder called SFM. Let's say you just did the sfm reconstruction using the command:

```
openMVG_main_GlobalSfM.exe -i SFM/sfm_data.json -m SFM -o SFM
```

then you have to run InterfaceOpenMVG also from the folder Project with the following command:

```
InterfaceOpenMVG SFM/sfm_data.json
```

A work around is to use the "w" parameter, in that case you can run InterfaceOpenMVG  from anywhere:

```
InterfaceOpenMVG SFM/sfm_data.json -w "path_to\Project"
```

Hope this solves the problem!

Cheers!

Cícero Moraes

unread,
Feb 10, 2016, 7:23:37 PM2/10/16
to cDc, openMVS
Hi cDc,

Thank you very much for the answer!

1) I download and build the two software in las day 8.
2) I tried to run in all the commands above, but it doesn't work.

For example, the last attempt I put the global location:

./InterfaceOpenMVG -i ~/del/openMVG/piso/sfm_data.json -o ~/del/openMVG/piso/scene.mvs
21:15:30 [App     ] Build date: Feb  8 2016, 20:47:18
21:15:30 [App     ] CPU: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
21:15:30 [App     ] RAM: 11.70GB Physical Memory 27.94GB Virtual Memory
21:15:30 [App     ] OS: Linux 3.19.0-20-generic (x86_64)
21:15:30 [App     ] SSE & AVX compatible CPU & OS detected
21:15:30 [App     ] Command line: -i /home/cogitas3d/del/openMVG/piso/sfm_data.json -o /home/cogitas3d/del/openMVG/piso/scene.mvs
21:15:30 [App     ] Available options:

Generic options:
  -h [ --help ]                         produce this help message
  -w [ --working-folder ] arg           working directory (default current 
                                        directory)
  -c [ --config-file ] arg (=InterfaceOpenMVG.cfg)
                                        file name containing program options
  --archive-type arg (=2)               project archive type: 0-text, 1-binary,
                                        2-compressed binary
  --process-priority arg (=-1)          process priority (below normal by 
                                        default)
  --max-threads arg (=0)                maximum number of threads (0 for using 
                                        all available cores)
  -v [ --verbosity ] arg (=2)           verbosity level

Main options:
  -l [ --images-list-file ] arg         input filename containing image list
  -i [ --input-file ] arg               input filename containing camera poses 
                                        and image list
  -o [ --output-file ] arg              output filename for storing the mesh
  --output-image-folder arg (=undistorted_images)
                                        output folder to store undistorted 
                                        images
  -f [ --normalize ] arg (=1)           normalize intrinsics while exporting to
                                        OpenMVS format

It doesn't work, unfortunately.

May it a Ubuntu problem?

I saw that in the site you show an exemple:

InterfaceOpenMVG2 -i sfm_data.json -o scene.mvs
When I build appeared only these files:

DensifyPointCloud                       
InterfaceOpenMVG                         
RefineMesh
TextureMesh
InterfaceVisualSFM
ReconstructMesh

Withou the number 2 at final. May I do something wrong? (I follow the wiki page).

Thank you again.

cDc

unread,
Feb 10, 2016, 7:50:06 PM2/10/16
to openMVS, cogi...@gmail.com
1) you should try the latest OpenMVS version. Apart of that, make sure you link against OpenMVG. That means that when running cmake for OpenMVS, make sure the OpenMVG lib is found and used (you'll get a message saying if it is found and used or not). In your case I am 99% sure that you did not link to OpenMVG.

2) the doc is old, there is no 2 anymore

cDc

unread,
Feb 10, 2016, 8:13:39 PM2/10/16
to openMVS
Nothing special, just follow the steps in the wiki (https://github.com/cdcseacave/openMVS/wiki/Building)

The key here is using OpenMVG_DIR flag, for example:

cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_DIR="$main_path/vcglib" -DOpenCV_CAN_BREAK_BINARY_COMPATIBILITY=OFF -DOpenMVG_DIR:STRING="$main_path/openMVG_build/openMVG_install/share/openMVG/cmake/"

making sure that all the paths correspond to your setup, and that you built OpenMVG as instructed in the same document (https://github.com/cdcseacave/openMVS/wiki/Building).


On 10-Feb-16 17:05, Cícero Moraes wrote:
>
> Yes, vou have reason. I build four times And all This times appeared that openMVG was not linked.
>
> I tried all, I follow the steps, I downloaded all the libs. So I thought it was normal.
>
> Have a way to solve this?
>
> Thank vou.
Reply all
Reply to author
Forward
0 new messages