Compiling DensifyPointCloud

203 views
Skip to first unread message

Alan Buchanan

unread,
Jan 16, 2017, 9:07:52 AM1/16/17
to openMVS
Hello,

I am playing with openMVS. I have had a lot of trouble being able to create and compile the project. However I think I am almost there

Currenlty I get 9 unresolved external symbols for MVS:OPTDENSE.

DensifyPointCloud.obj : error LNK2019: unresolved external symbol "void __cdecl MVS::OPTDENSE::init(void)" (?init@OPTDENSE@MVS@@YAXXZ) referenced in function "bool __cdecl Initialize(unsigned __int64,char const * *)" (?Initialize@@YA_N_KPEAPEBD@Z)
1>DensifyPointCloud.obj : error LNK2019: unresolved external symbol "void __cdecl MVS::OPTDENSE::update(void)" (?update@OPTDENSE@MVS@@YAXXZ) referenced in function "bool __cdecl Initialize(unsigned __int64,char const * *)" (?Initialize@@YA_N_KPEAPEBD@Z)
1>DensifyPointCloud.obj : error LNK2001: unresolved external symbol "class SEACAVE::CConfigTable MVS::OPTDENSE::oConfig" (?oConfig@OPTDENSE@MVS@@3VCConfigTable@SEACAVE@@A)
1>DensifyPointCloud.obj : error LNK2001: unresolved external symbol "unsigned int MVS::OPTDENSE::nMinResolution" (?nMinResolution@OPTDENSE@MVS@@3IA)
1>DensifyPointCloud.obj : error LNK2001: unresolved external symbol "unsigned int MVS::OPTDENSE::nResolutionLevel" (?nResolutionLevel@OPTDENSE@MVS@@3IA)
1>DensifyPointCloud.obj : error LNK2001: unresolved external symbol "unsigned int MVS::OPTDENSE::nMinViewsFuse" (?nMinViewsFuse@OPTDENSE@MVS@@3IA)
1>DensifyPointCloud.obj : error LNK2001: unresolved external symbol "unsigned int MVS::OPTDENSE::nNumViews" (?nNumViews@OPTDENSE@MVS@@3IA)
1>DensifyPointCloud.obj : error LNK2001: unresolved external symbol "unsigned int MVS::OPTDENSE::nEstimateColors" (?nEstimateColors@OPTDENSE@MVS@@3IA)
1>DensifyPointCloud.obj : error LNK2001: unresolved external symbol "unsigned int MVS::OPTDENSE::nEstimateNormals" (?nEstimateNormals@OPTDENSE@MVS@@3IA)


I must be missing a library for this. I have done a search on the libraries and can find any source code for this.

Any advice will be appreciated.

I downloaded the DensifyPointCloud binary from the web and used it to test the other libraries. I notice they don't seem to load the images and run the processing.
I suspect this may because I have loaded the jPeg library. Is that a valid assumption ?

I would like to confirm first before attempting CMake again ad it takes me many hours to make modifications to get the program to compile.

Regards,

Alan








cDc

unread,
Jan 16, 2017, 10:25:56 AM1/16/17
to openMVS
Sry to hear you have trouble compiling OpenMVS. On what OS do you want to compile?

Alan Buchanan

unread,
Jan 17, 2017, 12:18:44 AM1/17/17
to openMVS
I am using Windows 10 x64 using Visual Studio 2015

cDc

unread,
Jan 17, 2017, 12:27:53 AM1/17/17
to openMVS
Did you build the MVS library static or dynamic? Dynamic linking was never tested on windows, so you might want to export the access to this variables. Or make sure you build everything as static libs.

Alan Buchanan

unread,
Jan 17, 2017, 3:39:20 AM1/17/17
to openMVS
I have just recompiled as a static library with the same result.

One thing I notice is I get these errors for libboost_program_options-vc140-mt-1_62.lib.

1>libboost_program_options-vc140-mt-1_62.lib(options_description.obj) : error LNK2005: "public: class boost::program_options::options_description & __cdecl boost::program_options::options_description::add(class boost::program_options::options_description const &)" (?add@options_description@program_options@boost@@QEAAAEAV123@AEBV123@@Z) already defined in boost_program_options-vc140-mt-1_62.lib(boost_program_options-vc140-mt-1_62.dll)
.
I think this may be my problem. if I delete this library then 4 of 5 programs compile with DensifyPointCloud unabe to find a OPTDENSE library.

Any ideas ?

cDc

unread,
Jan 17, 2017, 8:17:43 AM1/17/17
to openMVS
You are maybe mixing MT with MD libraries. Make sure that you are consistent.

Alan Buchanan

unread,
Jan 17, 2017, 8:55:21 AM1/17/17
to openMVS
After a horrendous day I have managed to get openMVS compiled.

For anybody else who wants to do this.

Copy every dependency library (openCV, openMVG, cgal, etc) to the same diretcory as openMVS
1. Go through each setting in the make file to ensure it compiles with the /MT instead of the /MD flag
    - The settings 'shared_lib'etc doesn't guarantee this is done.
2. Compile openMVG with minimal settinsg (no Glog or Glags)
    - GLog directory should opint to minilog
3. Change the CGAL output from the default of libCGAL-vc140-mt-4.9 to libCGAL-vc140-mt-s-4.9
3. Once you get to compiling in openMVS various errors will occur that you fix manually
   - add cxSparse.lib, remove a couple of the duplicate dependencies under boost, add cuda.lib
   - and various other problems associated with paths to include files

Anyway DensifyPoint Cloud still crashes (same as the downloaded binaries) but at least I have a chance to find out what the bug is.

Cheers,
Alan

 

cDc

unread,
Jan 17, 2017, 9:01:13 AM1/17/17
to openMVS
If you have any improvements for the CMake scripts, please share them with us. Thx!

Alan Buchanan

unread,
Jan 17, 2017, 10:12:29 AM1/17/17
to openMVS
Definitely some room for improvement in the installation process.

Unfortunately I am not up to speed on CMake so not able to add anything positive.

I am more than happy to offer some suggestions. based on what I have experienced

Brian Loudon

unread,
Jul 4, 2017, 1:49:47 PM7/4/17
to openMVS
Yes, I also find that the downloadable binaries crash on my computer, which is very odd as I had previous versions that worked!

I am also struggling yet again with compiling openmvs, though at the moment I am trying to compile it as shared libs, my latest error is  string of errors with it not finding Cuda functions.
Reply all
Reply to author
Forward
0 new messages