Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I install openMVG in Windows? #781

Closed
Stav2se opened this issue Feb 10, 2017 · 43 comments
Closed

How do I install openMVG in Windows? #781

Stav2se opened this issue Feb 10, 2017 · 43 comments
Labels

Comments

@Stav2se
Copy link

Stav2se commented Feb 10, 2017

Hi guys,
I am quite new in programming, so I barely know things so I apologise in advance if my question sounds silly :).

But, what the best way to install the openMVG in windows OS? I have installed VS 15 but I have no clue what to do next.

I really appreciate your help and thank in advance.

Cheers,
Stavros

@pmoulon
Copy link
Member

pmoulon commented Feb 10, 2017

Hi,
You must install git and cmake, checkout the code, compile the code and install.
Build instruction are explained here:
https://github.com/openMVG/openMVG/blob/master/BUILD#L14

Specific explaination for windows:
https://github.com/openMVG/openMVG/blob/master/BUILD#L87

@alvaro562003
Copy link

Hi Stavros,
yesterday, I installed OpenMVG on windows 10 just by following the instructions.
That's was easy and very smooth.
By the way, be patient with the compilation. On my 2CPU laptop..i waited 2 hours.
Good Luck
Alvaro

@pmoulon
Copy link
Member

pmoulon commented Feb 10, 2017

Thanks you @alvaro562003 for your feedback.

Since OpenMVG uses some template to be generic and extensible it does not help for compilation time. BTW, build on GCC is faster.

I would like to find people to help me in finding the compilation bottleneck and try to make the library faster to build, but not easy to find people interested in such challenge ;-)

@Stav2se
Copy link
Author

Stav2se commented Feb 13, 2017

Hi guys,

Thank you so much for your quick feedback. I will give it a shot and let you know how it goes :).

@Stav2se
Copy link
Author

Stav2se commented Feb 13, 2017

Hi Alvaro,

Sorry to be a pain :(. I tried to checkout the code with Git CMD but it comes with a fatal error. I have both git and cmake ready and downloaded the visual basic 2015 but I am most certainly doing something wrong.

Thanks a lot in advance.
Stavros

@Stav2se
Copy link
Author

Stav2se commented Feb 13, 2017

Hi @pmoulon, I am trying to checkout the project but it comes out with the following error:
fatal: unable to access 'https://github.com/openMVG/openMVG.git/': Couldn't resolve host 'github.com'
Do you have any idea what that would be?
Many Thanks
Stavros

@alvaro562003
Copy link

Here are my unique notes on my installation.
git clone https://github.com/openMVG/openMVG.git

git submodule update -i
git checkout -b develop remotes/origin/develop
git submodule init
git submodule update

Cmake-gui Configure, Configure...no error

Double click openMVG.sln
Set release x64
Build the solution
Excellent no intervention..roughly 2hours of compilation/generation

That's all

@Stav2se
Copy link
Author

Stav2se commented Feb 13, 2017

Hi @alvaro562003
Thanks again for that. But it seems I can't get access to the repository (https://github.com/openMVG/openMVG.git), I even tried to get access through the tortoiseSVN but no luck.
Thank you for your support though.

@pmoulon
Copy link
Member

pmoulon commented Feb 14, 2017

@Stav2se I did not know for which reason your computer refuse the access to the git repository.
Did you try to use https://desktop.github.com/

@Stav2se
Copy link
Author

Stav2se commented Feb 14, 2017

Hi @pmoulon, yes I tried the https://desktop.github.com/. I have created something on my desktop but I am not sure if I have the right access still. How should the repository look once I create it?

@pmoulon
Copy link
Member

pmoulon commented Feb 14, 2017

Just try cmake_gui on it, and it will tell you if everything is there or not
https://github.com/openMVG/openMVG/blob/master/BUILD#L93

@Stav2se
Copy link
Author

Stav2se commented Feb 14, 2017

@pmoulon I managed to create the repository but it now comes with the below error. Any idea?

error

This is from a friend's laptop, everything seems to run smoother so far. Thanks again for your help.

@pmoulon
Copy link
Member

pmoulon commented Feb 15, 2017

In order to help you must provide the log that was in the bottom. The log that is in the window where we see "Configuring incomplete"

@Stav2se
Copy link
Author

Stav2se commented Feb 15, 2017

Hi @pmoulon sorry forgot to add the comments. Please see below:

The C compiler identification is unknown
The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:10 (project):
No CMAKE_C_COMPILER could be found.

CMake Error at CMakeLists.txt:10 (project):
No CMAKE_CXX_COMPILER could be found.

Configuring incomplete, errors occurred!
See also "C:/Users/stouse/Desktop/OpenMVGExe/CMakeFiles/CMakeOutput.log".
See also "C:/Users/stouse/Desktop/OpenMVGExe/CMakeFiles/CMakeError.log".

@pmoulon
Copy link
Member

pmoulon commented Feb 15, 2017

Seems like cmake is not able to find your Visual Studio.
Please do File/delete cache, and then configure (be sure at this step to choose the right compiler in the drop down menu)

@Stav2se
Copy link
Author

Stav2se commented Feb 15, 2017

I don't know what to say. I've tried that so many times. Unless I dont have the correct visual studio, although I downloaded the 2015 version.

@Stav2se
Copy link
Author

Stav2se commented Feb 15, 2017

Can I specify the compiler directory somehow?

@pmoulon
Copy link
Member

pmoulon commented Feb 15, 2017

You can specific which compiler you are using in this window, when you launch configure on a fresh first configure session.
image

@Stav2se
Copy link
Author

Stav2se commented Feb 15, 2017

not much luck, but thank you so much for your support @pmoulon :)

@Stav2se
Copy link
Author

Stav2se commented Feb 15, 2017

just to double check, is the below version of visual studio correct?

visual studio

@pmoulon
Copy link
Member

pmoulon commented Feb 15, 2017

Yes, but as I said to you, I really think that the problem is related to the fact that either cmake_gui is not detecting your visual studio or that the wrong compiler is send in the generator window.

@Stav2se
Copy link
Author

Stav2se commented Feb 16, 2017

Hi @pmoulon, everything has gone a bit smoother today. I just needed to update the visual studio library. But cmake-gui has come up with a few more errors (please see below), before I move on to build should I resolve these first?

The C compiler identification is MSVC 19.0.24210.0
The CXX compiler identification is MSVC 19.0.24210.0
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
target changed from "" to "auto"
Detected: Vendor ID 'GenuineIntel' CPU Family '6' CPU Model '60' CPU Flags ''
Detected CPU: haswell
Performing Test check_c_compiler_flag__arch_AVX
Performing Test check_c_compiler_flag__arch_AVX - Success
Performing Test check_cxx_compiler_flag__arch_AVX
Performing Test check_cxx_compiler_flag__arch_AVX - Success
Checking for C++11 compiler
Checking for C++11 compiler - unavailable
Try OpenMP C flag = [/openmp]
Performing Test OpenMP_FLAG_DETECTED
Performing Test OpenMP_FLAG_DETECTED - Success
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.8/Modules/FindOpenMP.cmake:179 (if):
if given arguments:

"TRUE"

An argument named "TRUE" appears in a conditional statement. Policy
CMP0012 is not set: if() recognizes numbers and boolean constants. Run
"cmake --help-policy CMP0012" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.8/Modules/FindOpenMP.cmake:224 (_OPENMP_GET_SPEC_DATE)
CMakeLists.txt:129 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

Try OpenMP CXX flag = [/openmp]
Performing Test OpenMP_FLAG_DETECTED
Performing Test OpenMP_FLAG_DETECTED - Success
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.8/Modules/FindOpenMP.cmake:179 (if):
if given arguments:

"TRUE"

An argument named "TRUE" appears in a conditional statement. Policy
CMP0012 is not set: if() recognizes numbers and boolean constants. Run
"cmake --help-policy CMP0012" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.8/Modules/FindOpenMP.cmake:266 (_OPENMP_GET_SPEC_DATE)
CMakeLists.txt:129 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

Found OpenMP: /openmp
-- Did not find MOSEK header
-- Did not find MOSEK library
Could not find mosek library on this machine.
Eigen 3.2.8 found (include: C:/Users/stouse/openMVG/src/third_party/eigen)
Flann 1.8.4 found (include: C:/Users/stouse/openMVG/src/third_party/flann/src/cpp/flann)
CoinUtils 2.9.3 found (include: C:/Users/stouse/openMVG/src/dependencies/osi_clp/CoinUtils/src)
Clp 1.15.11 found (include: C:/Users/stouse/openMVG/src/dependencies/osi_clp/Clp/src)
Osi 0.106.10 found (include: C:/Users/stouse/openMVG/src/dependencies/osi_clp/Osi/src/Osi)
Lemon found (include: C:/Users/stouse/openMVG/src/third_party/lemon/lemon)
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE)
Could NOT find Wget (missing: WGET_EXECUTABLE)
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
Could NOT find Ghostscript (missing: GHOSTSCRIPT_EXECUTABLE)
Could NOT find GLPK (missing: GLPK_LIBRARY GLPK_INCLUDE_DIR GLPK_PROPER_VERSION_FOUND) (Required is at least version "4.33")
Could NOT find ILOG (missing: ILOG_CPLEX_LIBRARY ILOG_CPLEX_INCLUDE_DIR)
Could NOT find COIN (missing: COIN_INCLUDE_DIR COIN_CBC_LIBRARY COIN_CBC_SOLVER_LIBRARY COIN_CGL_LIBRARY COIN_CLP_LIBRARY COIN_COIN_UTILS_LIBRARY COIN_OSI_LIBRARY COIN_OSI_CBC_LIBRARY COIN_OSI_CLP_LIBRARY)
Could NOT find SOPLEX (missing: SOPLEX_LIBRARY SOPLEX_INCLUDE_DIR)
Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of long long
Check size of long long - done
Looking for pthread.h
Looking for pthread.h - not found
Found Threads: TRUE
Looking for stdlib.h
Looking for stdlib.h - found
Looking for assert.h
Looking for assert.h - found
Looking for fcntl.h
Looking for fcntl.h - found
Looking for io.h
Looking for io.h - found
Looking for jbg_newlen
Looking for jbg_newlen - not found
Looking for mmap
Looking for mmap - not found
Looking for search.h
Looking for search.h - found
Looking for string.h
Looking for string.h - found
Looking for unistd.h
Looking for unistd.h - not found

===============================================================
Ceres-solver configuration.

Eigen 3.2.8 found (include: C:/Users/stouse/openMVG/src/third_party/eigen)
-- Found Eigen version 3.2.8: C:/Users/stouse/openMVG/src/third_party/eigen

===============================================================
Disabling the use of Eigen as a sparse linear algebra library.
This does not affect the covariance estimation algorithm
which can still use the EIGEN_SPARSE_QR algorithm.

A library with BLAS API not found. Please specify library location.
LAPACK requires BLAS
-- Did not find LAPACK library, disabling LAPACK support.
-- Did not find BLAS library, disabling LAPACK support.
-- Building without SuiteSparse.
-- Found CXSparse in: ../cxsparse/Include, building with CXSparse.
-- Google Flags disabled; no tests or tools will be built!
-- Compiling minimal glog substitute into Ceres.
-- Using minimal glog substitute (include): internal/ceres/miniglog
-- Building with OpenMP.
Performing Test COMPILER_HAS_CXX11_FLAG
Performing Test COMPILER_HAS_CXX11_FLAG - Success
Looking for C++ include unordered_map
Looking for C++ include unordered_map - found
Performing Test HAVE_UNORDERED_MAP_IN_STD_NAMESPACE
Performing Test HAVE_UNORDERED_MAP_IN_STD_NAMESPACE - Success
-- Found unordered_map/set in std namespace.
Looking for C++ include memory
Looking for C++ include memory - found
Performing Test HAVE_SHARED_PTR_IN_STD_NAMESPACE
Performing Test HAVE_SHARED_PTR_IN_STD_NAMESPACE - Success
-- Found shared_ptr in std namespace using header.
-- Building Ceres as a static library.
Creating configured Ceres config.h output directory: C:/Users/stouse/Desktop/OpenMVGExe/third_party/ceres-solver/config/ceres/internal
Enabling CERES_NO_LAPACK in Ceres config.h
Enabling CERES_NO_SUITESPARSE in Ceres config.h
Enabling CERES_USE_OPENMP in Ceres config.h
Enabling CERES_STD_UNORDERED_MAP in Ceres config.h
-- Do not build any example.

Ceres-solver configuration end.

Configured Eigen 3.2.8

Could NOT find Sphinx (missing: SPHINX_EXECUTABLE)
Sphinx need to be installed to generate the sphinx documentation
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
Doxygen need to be installed to generate the doxygen documentation

** OpenMVG version: 1.1.0
** Build Shared libs: OFF
** Build OpenMVG tests: OFF
** Build OpenMVG documentation: ON
** Build OpenMVG samples applications: ON
** Build OpenMVG openGL examples: OFF
** Enable code coverage generation: OFF
** Enable OpenMP parallelization: ON
** Build OpenCV+OpenMVG samples programs: OFF
** Use OpenCV SIFT features: OFF

EIGEN: 3.2.8 (internal)
CERES: 1.11.0 (internal)
FLANN: 1.8.4 (internal)
LIBTIFF: (internal)
LIBPNG: (internal)
LIBJPEG (internal)
CLP: 1.15.11 (internal)
COINUTILS: 2.9.3 (internal)
OSI: 0.106.10 (internal)
LEMON: 1.3 (internal)

Configuring done
Generating done

@pmoulon
Copy link
Member

pmoulon commented Feb 16, 2017

Great, you are making progress 👍

The next steps are:

  • Open the generated visual studio solution
  • Switch the compilation mode to Release (top of the window)
  • Build the project called BUILD_ALL
  • Then build the target call INSTALL

@Stav2se
Copy link
Author

Stav2se commented Feb 17, 2017

Almost there hopefully :). A few more problems during build process. It works fine when I build the ALL_BUILD but when I try to build the INSTALL it comes up with some errors. Please see below:

visual

@pmoulon
Copy link
Member

pmoulon commented Feb 17, 2017

I think you must run Visual studio in administrator mode in order to run the install target.
right click on visual studio icon and run as administrator and then build the install target again.

Btw, you can already play with the compiled binaries.
Please go to your BUILD directory and you can use the exported python scripts:
https://openmvg.readthedocs.io/en/latest/software/SfM/SfM/#openmvg-sfm-pipelines-demo

@Stav2se
Copy link
Author

Stav2se commented Feb 20, 2017

I will have a go shortly, thanks again for your help @pmoulon.

@Stav2se
Copy link
Author

Stav2se commented Feb 20, 2017

Hi @pmoulon, I just build the install as well with no problems. Where do I find the .exe file?

@pmoulon
Copy link
Member

pmoulon commented Feb 20, 2017

You will find the compiled exe in your build directory and the installation target have copied them into your ProgramFiles/OpenMVG (if you done the install step).

@Stav2se
Copy link
Author

Stav2se commented Feb 21, 2017

Hi @pmoulon, in that case I dont think it has been compiled correctly as I can't find the openmvg gui anywhere. I have also tried running the exe files that have been created in the lib in ProgramFiles/OpenMVG but none of them is able to run. Below I have attached a screenshot of the openmvg build folder.

openmvg build

@pmoulon
Copy link
Member

pmoulon commented Feb 21, 2017

Note that there is no GUI, openmvg provide only command line binaries. So if you open it in your explorer it will launch and close.

Take a look at the doc https://openmvg.readthedocs.io/en/latest/software/SfM/SfM/#openmvg-sfm-pipelines-demo
So go to OpenMVG_Build/software/SfM and then type cmd in the address bar of your file explorer and then run the provided command line from the doc

@Stav2se
Copy link
Author

Stav2se commented Feb 21, 2017

Thanks again :). I just thought it would be an actual gui from a video I saw online. It would be just great as it is anyway. Thanks a lot for all your support @pmoulon I will let you know how my first project gets on.

@pmoulon
Copy link
Member

pmoulon commented Feb 21, 2017

I think you saw this http://www.regard3d.org/index.php/download

@Stav2se
Copy link
Author

Stav2se commented Feb 21, 2017

Is that something you have worked on? I would be interested on your work mainly.

@alvaro562003
Copy link

Hello,

I installed today OpenMVG on aws ec2/windows server. This main issue of Stav2se seem to concern only the installation of visual studio. Actually, I installed it in at least 5 steps before having cmake giving configure done without error.

  • 1 step: download the iso as you mentionned previously
  • 2 step: double click on the isofile to create one more drive
  • 3 step: vs_xxxxx.exe /layout to install the visual software on c:\pack
  • 4 step create a c++ project so that vs install others libraries

be patient!!!

@pmoulon
Copy link
Member

pmoulon commented Feb 23, 2017

@Stav2se

  • Regard3D have been made by @rhiestan
  • On my side I mainly work on OpenMVG

@alvaro562003 I'm curious about your usage of OpenMVG. The fact that you mention aws made me curious ;-) 💻 ☁️ 💻 ➡️ feel free to join openmvg.slack.com and explain us more about your project!

@pmoulon
Copy link
Member

pmoulon commented Feb 23, 2017

Since @Stav2se manage to compile and install OpenMVG, I'm closing the thread.

@pmoulon pmoulon closed this as completed Feb 23, 2017
@Stav2se
Copy link
Author

Stav2se commented Feb 23, 2017

Thanks a lot for everything :)

@alvaro562003
Copy link

@pmoulon
For the moment i have a laptop overloaded by many applications and its organization is chaotic.
So to have a clear environment, i am using ec2 as it is far much cheaper that buying a new computer

@Marietto2008
Copy link

Someone can send me the exe file of openMVG for windows 64 ?

@pmoulon
Copy link
Member

pmoulon commented Dec 18, 2017

I can try to build them and put them in the release github page. Stay tuned ;-)
https://github.com/openMVG/openMVG/releases

During this time you can play with OpenMVG v1.0:
https://github.com/openMVG/openMVG/releases/download/v1.0/ReleaseV1.0.Pangio.kuhlii.WindowsBinaries_VS2015.zip

FYI, OpenMVG is actually v1.3

@Marietto2008
Copy link

Marietto2008 commented Dec 19, 2017

I'm trying to make work the addon for blender called "ortogonblender",that you can find here :

"https://www.blendernation.com/2017/09/17/digital-3d-orthognathic-surgery-ortogonblender-addon/

this addon has been created for linux and "openMVG" and "Dicom2STL" have been configured with the linux paths ; instead I'm using windows 10. So,in the blender user preferences I have configured these paths :

C:\Users\MarioZio\Desktop\OrtogOn\Tools\Programs\DicomToMesh\build\dicom2mesh.exe

C:\Users\MarioZio\Desktop\OrtogOn\Tools\Programs\openMVG\openMVG_Build\software\SfM\SfM_SequentialPipeline.py

I would like to know if there is or what's the equivalent file on windows for "SfM_SequentialPipeline.py" ; because I suspect that this py file does not work here. Below you can see what's error it gives...
2017-12-19_1-28-27

@pmoulon
Copy link
Member

pmoulon commented Dec 19, 2017

The error message just says that it does not find the given binary.
SfM_SequentialPipeline.py contains path to the binary folder. You can update it to fit your platform

@pmoulon
Copy link
Member

pmoulon commented Dec 19, 2017

@Marietto2008 Here the binaries for the v1.3 release https://github.com/openMVG/openMVG/releases/download/v1.3/ReleaseV1.3.Yellowtail.WindowsBinaries_VS2015.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants