cdcseacave / openMVS

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

Usage question #18

Closed FreakTheMighty closed 9 years ago

FreakTheMighty commented 9 years ago

When I attempt to import an openMVG using the instructions here. I only get the help message.

I've started setting up a docker build here.

Here is an example where I see the issue. Are there other required arguments that I am missing?

root@857087dc5b43:/opt/openMVS_Build/bin# ./InterfaceOpenMVG -i /data/out/reconstruction_sequential/sfm_data.json -o scene.mvs
00:52:18 [App     ] Build date: Oct 17 2015, 20:47:54
00:52:18 [App     ] CPU: Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
00:52:18 [App     ] RAM: 992.47MB Physical Memory 0B Virtual Memory
00:52:18 [App     ] OS: Linux 3.13.0-48-generic (x86_64)
00:52:18 [App     ] SSE & AVX compatible CPU & OS detected
00:52:18 [App     ] Command line: -i /data/out/reconstruction_sequential/sfm_data.json -o scene.mvs
00:52:18 [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
  -f [ --normalize ] arg (=1)   normalize intrinsics while exporting to OpenMVS
                                format
cdcseacave commented 9 years ago

please use InterfaceOpenMVG2 for json files

FreakTheMighty commented 9 years ago

Aaah, I think that must not have built. Let me do some investigating.

On Sun, Oct 18, 2015, 1:34 AM cDc notifications@github.com wrote:

please use InterfaceOpenMVG2 for json files

— Reply to this email directly or view it on GitHub https://github.com/cdcseacave/openMVS/issues/18#issuecomment-148991282.

pmoulon commented 9 years ago

You must build OpenMVS with OpenMVG as a third party. See here: https://github.com/cdcseacave/openMVS/wiki/Building

-DOpenMVG_DIR:STRING="FULL_PATH/openMVG_Build/openMVG_install/share/openMVG/cmake/"
FreakTheMighty commented 9 years ago

@pmoulon I already had that argument, but I was missing the install for openMVG.

After doing a proper install of openMVG along with the argument, I now get a build error.

The command '/bin/sh -c ln -s /usr/lib/x86_64-linux-gnu/libGLU.so.1.3.1 /usr/lib/x86_64-linux-gnu/libGLU.so && ln -s /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 /usr/lib/x86_64-linux-gnu/libGL.so && mkdir /opt/openMVS_Build && cd /opt/openMVS_Build && cmake . ../openMVS -DCMAKE_BUILD_TYPE=RELEASE -DVCG_DIR="/opt/vcglib" -DCERES_DIR="/usr/local/share/Ceres" -DOpenCV_CAN_BREAK_BINARY_COMPATIBILITY=OFF -DOpenMVG_DIR:STRING="/opt/openMVG_install/share/openMVG/cmake/" && make && cp ./bin/* /usr/bin' returned a non-zero code: 2

Its a bit unclear to me, where the actual error shows up in the logs, things seem to be buried in warnings. The full logs can be viewed here.

pmoulon commented 9 years ago

I don't see file log on the provided link. Perhaps the error could be related to VCG See here https://github.com/OpenMVS/openMVS/wiki/Building

Default compilation settings of OpenMVS reveals some tiny compilation error in VCG. Here the fixes:
FreakTheMighty commented 9 years ago

@pmoulon not sure why you weren't able to see the log, I wonder if its a docker hub permissions issues. If you're interested, you and @cdcseacave are welcome to create accounts and I am happy to add you as collaborators.

I've added the patch that you pointed out. I am still getting an error. I believe this is the important section of the log.

In file included from /opt/openMVS/apps/InterfaceOpenMVG/../../libs/MVS/../Common/Types.h:75:0,
                 from /opt/openMVS/apps/InterfaceOpenMVG/../../libs/MVS/../Common/Common.h:176,
                 from /opt/openMVS/apps/InterfaceOpenMVG/../../libs/MVS/Common.h:38,
                 from /opt/openMVS/apps/InterfaceOpenMVG/InterfaceOpenMVG2.cpp:33:
/opt/openMVS/apps/InterfaceOpenMVG/../../libs/MVS/../Common/FileUtil.h:111:15: error: after previous specification in 'std::string stlplus::folder_up(const string&, unsigned int)' [-fpermissive]
   std::string folder_up(const std::string& folder, unsigned levels = 1);
               ^

In file included from /opt/openMVG_install/include/openMVG/sfm/sfm_view.hpp:10:0,
                 from /opt/openMVG_install/include/openMVG/sfm/sfm_data.hpp:11,
                 from /opt/openMVS/apps/InterfaceOpenMVG/InterfaceOpenMVG2.cpp:38:
/opt/openMVG_install/include/openMVG/third_party/stlplus3/filesystemSimplified/file_system.hpp:192:116: error: default argument given for parameter 3 of 'std::string stlplus::lookup(const string&, const string&, const string&)' [-fpermissive]
   std::string lookup (const std::string& file, const std::string& path, const std::string& splitter = PATH_SPLITTER);
                                                                                                                    ^

In file included from /opt/openMVS/apps/InterfaceOpenMVG/../../libs/MVS/../Common/Types.h:75:0,
                 from /opt/openMVS/apps/InterfaceOpenMVG/../../libs/MVS/../Common/Common.h:176,
                 from /opt/openMVS/apps/InterfaceOpenMVG/../../libs/MVS/Common.h:38,
                 from /opt/openMVS/apps/InterfaceOpenMVG/InterfaceOpenMVG2.cpp:33:
/opt/openMVS/apps/InterfaceOpenMVG/../../libs/MVS/../Common/FileUtil.h:191:15: error: after previous specification in 'std::string stlplus::lookup(const string&, const string&, const string&)' [-fpermissive]
   std::string lookup (const std::string& file, const std::string& path, const std::string& splitter = PATH_SPLITTER);
               ^


Again, in case you guys want do want to checkout the docker build, here is the link to the latest build. https://hub.docker.com/r/freakthemighty/openmvs/builds/buwzfeaswmiyxgswrhvk7v3/

FreakTheMighty commented 9 years ago

I looked at other automated docker builds that I don't own, and I am able to see the log. Please make sure you scroll all the way down the page. The log is very long.

pyp22 commented 9 years ago

Hi can't see the log either. @FreakTheMighty I'm following this as i'm meeting similar errors.

FreakTheMighty commented 9 years ago

@pyp22 are you logged into dockerhub?

pyp22 commented 9 years ago

@FreakTheMighty yep

FreakTheMighty commented 9 years ago

I'll dig through their settings tomorrow. Perhaps there is a way to modify permissions.

pyp22 commented 9 years ago

Had to flushed squid cache.That's ok i'm on it.

FreakTheMighty commented 9 years ago

@pyp22 squid cache?

pyp22 commented 9 years ago

@jesse squid proxy. I got full access since i flushed server's cache..

2015-10-23 5:33 GMT+02:00 Jesse notifications@github.com:

@pyp22 https://github.com/pyp22 squid cache?

— Reply to this email directly or view it on GitHub https://github.com/cdcseacave/openMVS/issues/18#issuecomment-150450784.

cdcseacave commented 9 years ago

Please try the develop branch. FileUtil.h was not even needed, so removed in develop.

FreakTheMighty commented 9 years ago

I've tried with the develop branch, but I am still seeing an error. See the latest build here.

/opt/openMVS/libs/MVS/Mesh.cpp:1765:13: warning: 'void CLN::ComputeStatsArea(const Polyhedron&, CLN::Stats&)' defined but not used [-Wunused-function]
 static void ComputeStatsArea(const Polyhedron& p, Stats& stats)
             ^

make[2]: *** [libs/MVS/CMakeFiles/MVS.dir/Mesh.cpp.o] Error 1

make[1]: *** [libs/MVS/CMakeFiles/MVS.dir/all] Error 2

make: 
*** [all] Error 2


cdcseacave commented 9 years ago

sry, I can not see the build log, can you please post the error?

FreakTheMighty commented 9 years ago

I've copied to log to this gist https://gist.github.com/0307ae439cf060acc5f3. Also, when I log out of docker hub, I can't see the log either. Its possible the build logs aren't visible to non-logged in users.

cdcseacave commented 9 years ago

seems that there is an error in VCG library try removing typename in front of CurVecType like here:

typename CurVecType &PD1() { static typename T::CoordType dummy(0, 0, 0); assert(0); return dummy; }

FreakTheMighty commented 8 years ago

Hmmm, are other people seeing this problem with VCG?

FreakTheMighty commented 8 years ago

Are your builds against revision 5609 of VCG?

cdcseacave commented 8 years ago

I have 5560 here (on windows)

FreakTheMighty commented 8 years ago

Oh oh, that's good news, let me try that. It's too bad VCG doesn't have any tags or branches, trunk seems unstable