From 7e95bada9aebfbfdcbdbdfcad350c5df520d86e1 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 16 Feb 2016 12:07:45 +0100 Subject: [PATCH 1/9] Add specific building instructions --- BUILD.md | 15 +++++++++++++ BUILD.md~ | 0 README | 3 +++ README~ | 26 ++++++++++++++++++++++ Readme.txt | 14 +----------- Readme.txt~ | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 107 insertions(+), 13 deletions(-) create mode 100644 BUILD.md create mode 100644 BUILD.md~ create mode 100644 README~ create mode 100644 Readme.txt~ diff --git a/BUILD.md b/BUILD.md new file mode 100644 index 00000000..da2bd8a8 --- /dev/null +++ b/BUILD.md @@ -0,0 +1,15 @@ +# Windows +Windows => Use precompiled binary, or compile it with VS2008/2010 (Express or pro, Pro will allow you to enable Opemp in CMVS) + => Use CMake GUI in order to generate the Visual Studio project file (in ./program you will find the main CMakeLists.txt). + +# Linux compilations (Ubuntu used as example) +``` +#Prepare and empty machine for building: +sudo apt-get update -qq && sudo apt-get install -qq +sudo apt-get -y install git jpeg boost boost-graph +git clone https://github.com/pmoulon/CMVS-PMVS +mkdir CMVS-PMVS_build && cd CMVS-PMVS_build +cmake ../CMVS-PMVS/program +make +sudo make install +``` diff --git a/BUILD.md~ b/BUILD.md~ new file mode 100644 index 00000000..e69de29b diff --git a/README b/README index 25a7d3ab..a192e1f5 100644 --- a/README +++ b/README @@ -1,5 +1,8 @@ This is a modified version of CMVS/PMVS. +Building: + - See [BUILD.md](https://github.com/pmoulon/CMVS-PMVS/BUILD.md) + Main modification: - cross platform compilation Linux, Windows => CMake build system generator. - added bug fix from Nghia Ho. diff --git a/README~ b/README~ new file mode 100644 index 00000000..295aef36 --- /dev/null +++ b/README~ @@ -0,0 +1,26 @@ +This is a modified version of CMVS/PMVS. + +Building: + - See [BUILD.md](https://github.com/pmoulon/CMVS-PMVS) + +Main modification: + - cross platform compilation Linux, Windows => CMake build system generator. + - added bug fix from Nghia Ho. + - make PLY, PSET, PATCH export faster and optional. + - Replaced GSL simplex/lmfit with nlopt optimizer + - Replaced image loading routines with CImg. Now PPMs are supported properly, with optional support for PNG and TIFF + - Replaced BLAS/LAPACK with Eigen + - Updated internal jpeg library and miniBoost + - CMake-system now supports system boost, jpeg and other libraries if available. + - Replaced pthread with tinycthread to get rid of pthread.dll on Windows + +Authors : +[Original code author] Yasutaka Furukawa http://www.cs.washington.edu/homes/furukawa/ + +[Initial Cmake multiplatform port ] Pierre moulon pmoulon[AT]gmail.com + +-------------------- +- Web ressources : - +-------------------- +[CMVS/PMVS] http://http://grail.cs.washington.edu/software/cmvs/ +[CMake version] http://opensourcephotogrammetry.blogspot.com/ https://github.com/pmoulon/CMVS-PMVS diff --git a/Readme.txt b/Readme.txt index 6eeb2d45..96f87633 100644 --- a/Readme.txt +++ b/Readme.txt @@ -18,19 +18,7 @@ Date : 13 July 2011 -- Compilation -- -------------------- -Windows => Use precompiled binary, or compile it with VS2008/2010 (Express or pro, Pro will allow you to enable Opemp in CMVS) - => Use CMake GUI in order to generate the Visual Studio project file (in ./program you will find the main CMakeLists.txt). - -Linux => use makefile in program/main. - - Or use CMake build system : -=> Install the following libraries : jpeg boost boost-graph - $ mkdir OutputLinux - $ cd OutputLinux - $ cmake . .. - $ make - => That's all. Openmp is not activated yet. Add openmp in the cmvs link option and define the _OPENMP cxx flags - +- See https://github.com/pmoulon/CMVS-PMVS/BUILD.md -------------------- ---- Notes : ---- diff --git a/Readme.txt~ b/Readme.txt~ new file mode 100644 index 00000000..6eeb2d45 --- /dev/null +++ b/Readme.txt~ @@ -0,0 +1,62 @@ +Authors : +[main author] Yasutaka Furukawa furukawa[AT]cs.washington.edu +[main author] Jean Ponce Jean.Ponce[AT]ens.fr +[Windows Porting] Pierre moulon pmoulon[AT]gmail.com + +Special thanks to ASTRE Henri for the PTHREAD 64 bits lib and dll : http://www.visual-experiments.com/ + +Date : 13 July 2011 + +-------------------- +- Web ressources : - +-------------------- +[CMVS] http://grail.cs.washington.edu/software/cmvs/ +[windows porting] http://francemapping.free.fr/Portfolio/Prog3D/CMVS.html + + +-------------------- +-- Compilation -- +-------------------- + +Windows => Use precompiled binary, or compile it with VS2008/2010 (Express or pro, Pro will allow you to enable Opemp in CMVS) + => Use CMake GUI in order to generate the Visual Studio project file (in ./program you will find the main CMakeLists.txt). + +Linux => use makefile in program/main. + + Or use CMake build system : +=> Install the following libraries : jpeg boost boost-graph + $ mkdir OutputLinux + $ cd OutputLinux + $ cmake . .. + $ make + => That's all. Openmp is not activated yet. Add openmp in the cmvs link option and define the _OPENMP cxx flags + + +-------------------- +---- Notes : ---- +-------------------- +To test it : ./WinX-VS2010/Readme.txt "Usage of the binaries" + +What have been done on native Yasutaka Furukawa source code : + +- Create the CMake build system for CMVS/PMVS2 and required library. + +- Optimize a little bit JPEG image loading. + +- Update CMVS source code in order to compile. + +- Add changes from Nghia Ho http://nghiaho.com/ + - memoize pow(2,X) + - Change GSL simplex to lmfit. + +- Replaced GSL simplex/lmfit with nlopt optimizer + +- Replaced image loading routines with CImg. Now PPMs are supported properly, with optional support for PNG and TIFF + +- Replaced BLAS/LAPACK with Eigen + +- Updated internal jpeg library and miniBoost + +- CMake-system now supports system boost, jpeg and other libraries if available. + +- Replaced pthread with tinycthread to get rid of pthread.dll on Windows From 47ac49e929f2eb8db205db324bc0a38c5008ba27 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 16 Feb 2016 12:08:39 +0100 Subject: [PATCH 2/9] Add specific building instructions --- BUILD.md~ | 0 README~ | 26 ---------------------- Readme.txt~ | 62 ----------------------------------------------------- 3 files changed, 88 deletions(-) delete mode 100644 BUILD.md~ delete mode 100644 README~ delete mode 100644 Readme.txt~ diff --git a/BUILD.md~ b/BUILD.md~ deleted file mode 100644 index e69de29b..00000000 diff --git a/README~ b/README~ deleted file mode 100644 index 295aef36..00000000 --- a/README~ +++ /dev/null @@ -1,26 +0,0 @@ -This is a modified version of CMVS/PMVS. - -Building: - - See [BUILD.md](https://github.com/pmoulon/CMVS-PMVS) - -Main modification: - - cross platform compilation Linux, Windows => CMake build system generator. - - added bug fix from Nghia Ho. - - make PLY, PSET, PATCH export faster and optional. - - Replaced GSL simplex/lmfit with nlopt optimizer - - Replaced image loading routines with CImg. Now PPMs are supported properly, with optional support for PNG and TIFF - - Replaced BLAS/LAPACK with Eigen - - Updated internal jpeg library and miniBoost - - CMake-system now supports system boost, jpeg and other libraries if available. - - Replaced pthread with tinycthread to get rid of pthread.dll on Windows - -Authors : -[Original code author] Yasutaka Furukawa http://www.cs.washington.edu/homes/furukawa/ - -[Initial Cmake multiplatform port ] Pierre moulon pmoulon[AT]gmail.com - --------------------- -- Web ressources : - --------------------- -[CMVS/PMVS] http://http://grail.cs.washington.edu/software/cmvs/ -[CMake version] http://opensourcephotogrammetry.blogspot.com/ https://github.com/pmoulon/CMVS-PMVS diff --git a/Readme.txt~ b/Readme.txt~ deleted file mode 100644 index 6eeb2d45..00000000 --- a/Readme.txt~ +++ /dev/null @@ -1,62 +0,0 @@ -Authors : -[main author] Yasutaka Furukawa furukawa[AT]cs.washington.edu -[main author] Jean Ponce Jean.Ponce[AT]ens.fr -[Windows Porting] Pierre moulon pmoulon[AT]gmail.com - -Special thanks to ASTRE Henri for the PTHREAD 64 bits lib and dll : http://www.visual-experiments.com/ - -Date : 13 July 2011 - --------------------- -- Web ressources : - --------------------- -[CMVS] http://grail.cs.washington.edu/software/cmvs/ -[windows porting] http://francemapping.free.fr/Portfolio/Prog3D/CMVS.html - - --------------------- --- Compilation -- --------------------- - -Windows => Use precompiled binary, or compile it with VS2008/2010 (Express or pro, Pro will allow you to enable Opemp in CMVS) - => Use CMake GUI in order to generate the Visual Studio project file (in ./program you will find the main CMakeLists.txt). - -Linux => use makefile in program/main. - - Or use CMake build system : -=> Install the following libraries : jpeg boost boost-graph - $ mkdir OutputLinux - $ cd OutputLinux - $ cmake . .. - $ make - => That's all. Openmp is not activated yet. Add openmp in the cmvs link option and define the _OPENMP cxx flags - - --------------------- ----- Notes : ---- --------------------- -To test it : ./WinX-VS2010/Readme.txt "Usage of the binaries" - -What have been done on native Yasutaka Furukawa source code : - -- Create the CMake build system for CMVS/PMVS2 and required library. - -- Optimize a little bit JPEG image loading. - -- Update CMVS source code in order to compile. - -- Add changes from Nghia Ho http://nghiaho.com/ - - memoize pow(2,X) - - Change GSL simplex to lmfit. - -- Replaced GSL simplex/lmfit with nlopt optimizer - -- Replaced image loading routines with CImg. Now PPMs are supported properly, with optional support for PNG and TIFF - -- Replaced BLAS/LAPACK with Eigen - -- Updated internal jpeg library and miniBoost - -- CMake-system now supports system boost, jpeg and other libraries if available. - -- Replaced pthread with tinycthread to get rid of pthread.dll on Windows From 79107f57bc7151fc7996fd2d4bd4deeb71a89f57 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 16 Feb 2016 12:10:10 +0100 Subject: [PATCH 3/9] Add specific building instructions --- README | 2 +- README~ | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 README~ diff --git a/README b/README index a192e1f5..9027231e 100644 --- a/README +++ b/README @@ -1,7 +1,7 @@ This is a modified version of CMVS/PMVS. Building: - - See [BUILD.md](https://github.com/pmoulon/CMVS-PMVS/BUILD.md) + - See https://github.com/pmoulon/CMVS-PMVS/BUILD.md Main modification: - cross platform compilation Linux, Windows => CMake build system generator. diff --git a/README~ b/README~ new file mode 100644 index 00000000..a192e1f5 --- /dev/null +++ b/README~ @@ -0,0 +1,26 @@ +This is a modified version of CMVS/PMVS. + +Building: + - See [BUILD.md](https://github.com/pmoulon/CMVS-PMVS/BUILD.md) + +Main modification: + - cross platform compilation Linux, Windows => CMake build system generator. + - added bug fix from Nghia Ho. + - make PLY, PSET, PATCH export faster and optional. + - Replaced GSL simplex/lmfit with nlopt optimizer + - Replaced image loading routines with CImg. Now PPMs are supported properly, with optional support for PNG and TIFF + - Replaced BLAS/LAPACK with Eigen + - Updated internal jpeg library and miniBoost + - CMake-system now supports system boost, jpeg and other libraries if available. + - Replaced pthread with tinycthread to get rid of pthread.dll on Windows + +Authors : +[Original code author] Yasutaka Furukawa http://www.cs.washington.edu/homes/furukawa/ + +[Initial Cmake multiplatform port ] Pierre moulon pmoulon[AT]gmail.com + +-------------------- +- Web ressources : - +-------------------- +[CMVS/PMVS] http://http://grail.cs.washington.edu/software/cmvs/ +[CMake version] http://opensourcephotogrammetry.blogspot.com/ https://github.com/pmoulon/CMVS-PMVS From 97aeff11f96cda73f25e99661910af2468756639 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 16 Feb 2016 12:12:39 +0100 Subject: [PATCH 4/9] remove README~ --- README~ | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 README~ diff --git a/README~ b/README~ deleted file mode 100644 index a192e1f5..00000000 --- a/README~ +++ /dev/null @@ -1,26 +0,0 @@ -This is a modified version of CMVS/PMVS. - -Building: - - See [BUILD.md](https://github.com/pmoulon/CMVS-PMVS/BUILD.md) - -Main modification: - - cross platform compilation Linux, Windows => CMake build system generator. - - added bug fix from Nghia Ho. - - make PLY, PSET, PATCH export faster and optional. - - Replaced GSL simplex/lmfit with nlopt optimizer - - Replaced image loading routines with CImg. Now PPMs are supported properly, with optional support for PNG and TIFF - - Replaced BLAS/LAPACK with Eigen - - Updated internal jpeg library and miniBoost - - CMake-system now supports system boost, jpeg and other libraries if available. - - Replaced pthread with tinycthread to get rid of pthread.dll on Windows - -Authors : -[Original code author] Yasutaka Furukawa http://www.cs.washington.edu/homes/furukawa/ - -[Initial Cmake multiplatform port ] Pierre moulon pmoulon[AT]gmail.com - --------------------- -- Web ressources : - --------------------- -[CMVS/PMVS] http://http://grail.cs.washington.edu/software/cmvs/ -[CMake version] http://opensourcephotogrammetry.blogspot.com/ https://github.com/pmoulon/CMVS-PMVS From 60bb7eb836c34cbb422afa8eadc12ea92e928198 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 16 Feb 2016 12:14:01 +0100 Subject: [PATCH 5/9] Add openmp line --- BUILD.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BUILD.md b/BUILD.md index da2bd8a8..da862daf 100644 --- a/BUILD.md +++ b/BUILD.md @@ -12,4 +12,6 @@ mkdir CMVS-PMVS_build && cd CMVS-PMVS_build cmake ../CMVS-PMVS/program make sudo make install + + => Openmp is not activated yet. Add openmp in the cmvs link option and define the _OPENMP cxx flags ``` From 3c5d1a11b2bdf376729099b46f06fb30169b322e Mon Sep 17 00:00:00 2001 From: mad-de Date: Tue, 16 Feb 2016 16:03:32 +0100 Subject: [PATCH 6/9] Update BUILD.md --- BUILD.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILD.md b/BUILD.md index da862daf..8c871b25 100644 --- a/BUILD.md +++ b/BUILD.md @@ -4,7 +4,7 @@ Windows => Use precompiled binary, or compile it with VS2008/2010 (Express or pr # Linux compilations (Ubuntu used as example) ``` -#Prepare and empty machine for building: +#Prepare an empty machine for building: sudo apt-get update -qq && sudo apt-get install -qq sudo apt-get -y install git jpeg boost boost-graph git clone https://github.com/pmoulon/CMVS-PMVS From 1630deeb713ce78fad9344d293cfdbf8efa502c1 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 16 Feb 2016 18:46:30 +0100 Subject: [PATCH 7/9] Add Openmp to CMaklists.txt --- program/CMakeLists.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/program/CMakeLists.txt b/program/CMakeLists.txt index 2a4cd941..61d2d438 100644 --- a/program/CMakeLists.txt +++ b/program/CMakeLists.txt @@ -30,6 +30,9 @@ INCLUDE_DIRECTORIES( FIND_PACKAGE(Threads REQUIRED) SET(PMVS_LIBRARIES ${PMVS_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) +# OPTIONS +OPTION(CIMG_USE_OPENMP "Enable OpenMP parallelization in cimg" ON) + # Eigen SET( EIGEN3_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/thirdParty/Eigen ) SET( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${EIGEN3_INCLUDE_DIR}/cmake" ) @@ -95,6 +98,30 @@ IF(PMVS_USE_TIFF) ENDIF(TIFF_FOUND) ENDIF(PMVS_USE_TIFF) +# OpenMP +# ============================================================================== +# OpenMP detection +# ============================================================================== +IF(CIMG_USE_OPENMP) + FIND_PACKAGE(OpenMP) + IF(OPENMP_FOUND) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") + OPTION(CIMG_USE_OPENMP "Use OpenMP for parallelization in cimg" ON) + ADD_DEFINITIONS(-DCIMG_USE_OPENMP) + IF (NOT MSVC) + IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + # for those using the clang with OpenMP support + LIST(APPEND OPENMVG_LIBRARY_DEPENDENCIES iomp) + ELSE() + LIST(APPEND OPENMVG_LIBRARY_DEPENDENCIES gomp) + ENDIF() + ENDIF(NOT MSVC) + ENDIF(OPENMP_FOUND) +ELSE(CIMG_USE_OPENMP) + OPTION(OpenMVG_USE_OPENMP "Use OpenMP for parallelization in cimg" OFF) + UPDATE_CACHE_VARIABLE(CIMG_USE_OPENMP OFF) + REMOVE_DEFINITIONS(-DCIMG_USE_OPENMP) +ENDIF(CIMG_USE_OPENMP) ADD_SUBDIRECTORY(base) ADD_SUBDIRECTORY(main) From 92919246ced5bb696d1b4ac7e21b16264b15c7e8 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 16 Feb 2016 18:49:40 +0100 Subject: [PATCH 8/9] delete line from CMAKELISTS.txt --- BUILD.md | 2 -- BUILD.md~ | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 BUILD.md~ diff --git a/BUILD.md b/BUILD.md index 8c871b25..968b5b84 100644 --- a/BUILD.md +++ b/BUILD.md @@ -12,6 +12,4 @@ mkdir CMVS-PMVS_build && cd CMVS-PMVS_build cmake ../CMVS-PMVS/program make sudo make install - - => Openmp is not activated yet. Add openmp in the cmvs link option and define the _OPENMP cxx flags ``` diff --git a/BUILD.md~ b/BUILD.md~ new file mode 100644 index 00000000..8c871b25 --- /dev/null +++ b/BUILD.md~ @@ -0,0 +1,17 @@ +# Windows +Windows => Use precompiled binary, or compile it with VS2008/2010 (Express or pro, Pro will allow you to enable Opemp in CMVS) + => Use CMake GUI in order to generate the Visual Studio project file (in ./program you will find the main CMakeLists.txt). + +# Linux compilations (Ubuntu used as example) +``` +#Prepare an empty machine for building: +sudo apt-get update -qq && sudo apt-get install -qq +sudo apt-get -y install git jpeg boost boost-graph +git clone https://github.com/pmoulon/CMVS-PMVS +mkdir CMVS-PMVS_build && cd CMVS-PMVS_build +cmake ../CMVS-PMVS/program +make +sudo make install + + => Openmp is not activated yet. Add openmp in the cmvs link option and define the _OPENMP cxx flags +``` From 88b95fa2b5e8af5a9ffc3442a804b8acf0f45eda Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 16 Feb 2016 18:50:02 +0100 Subject: [PATCH 9/9] delete line from CMAKELISTS.txt --- BUILD.md~ | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 BUILD.md~ diff --git a/BUILD.md~ b/BUILD.md~ deleted file mode 100644 index 8c871b25..00000000 --- a/BUILD.md~ +++ /dev/null @@ -1,17 +0,0 @@ -# Windows -Windows => Use precompiled binary, or compile it with VS2008/2010 (Express or pro, Pro will allow you to enable Opemp in CMVS) - => Use CMake GUI in order to generate the Visual Studio project file (in ./program you will find the main CMakeLists.txt). - -# Linux compilations (Ubuntu used as example) -``` -#Prepare an empty machine for building: -sudo apt-get update -qq && sudo apt-get install -qq -sudo apt-get -y install git jpeg boost boost-graph -git clone https://github.com/pmoulon/CMVS-PMVS -mkdir CMVS-PMVS_build && cd CMVS-PMVS_build -cmake ../CMVS-PMVS/program -make -sudo make install - - => Openmp is not activated yet. Add openmp in the cmvs link option and define the _OPENMP cxx flags -```