Table of Contents
MicMac is a free open-source photogrammetry solution developed at (IGN) - French Mapping Agency - since 2003. A second version named MMVII aimed at facilitating external contributions and being more maintainable in the long term has been in development since 2020.
Some external tools need to be present on your system for MMVII to run properly:
- Git to clone the repository
- CMake to generate build files
- make for parallel processes management
- PROJ for coordinate system conversion and coordinate reference system transformation
- PROJ additional data grids for coordinates tranformations (optional, see doc)
- GDAL for image files handling
- ccache for recompilation optimization (optional)
- OpenMP multi-platform parallel programming (optionnal)
- Doxygen documentation generator (optional)
- vcpkg C/C++ library manager (Windows only)
This section covers the compilation of MMVII source code to generate binaries. (Pre-compiled binaries for Windows are available HERE)
Compilation procedure is discribed below for the 3 main operating systems:
MMVII does not use MicMac v1 anymore, so installing MicMac V1 is not required. However some features of MMVII still require calls to the MicMac v1 library and have not yet been rewritten in MMVII. They are disabled. For those who really need it, you can reactivate use of the MicMac V1 lib :
-
Install MicMac v1 by following the instructions HERE.
-
Activate the CMake option MMVII_KEEP_LIBRARY_MMV1 in the following step 'Configure CMAKE and generate makefiles:'
bash cmake ../ -DMMVII_KEEP_LIBRARY_MMV1=on
Under Linux (Ubuntu) distribution the installation procedure is as follows:
-
Open a terminal
-
Install dependancies specific to MMVII:
sudo apt install pkg-config libproj-dev libgdal-dev libxerces-c-dev
-
Access the folder:
cd micmac/MMVII -
Create a directory for building intermediate files and access it:
mkdir build && cd build
-
Configure CMAKE and generate makefiles:
cmake ../
-
Compile MMVII:
make full -j8
- in general, you can run "make -jNUM" where NUM is the number of CPUs on the machine and can be retrieved by typing
nproc --all, or "NUM-2" if you want to use the computer while compiling - !!!!!!!!!!!!!!! classical pitfall : typing literally "make -j NUM" will run all the compilation simultaneously and will almost certainly crash your computer !!!!!!!!!!!!!
- in general, you can run "make -jNUM" where NUM is the number of CPUs on the machine and can be retrieved by typing
-
Add binaries to the
PATH(adapt the path):echo 'export PATH=/home/src/micmac/MMVII/bin:$PATH' >> ~/.bashrc
Under Windows the installation procedure is as follows:
- Open a Git Bash terminal
- In another working directory, clone the repository:
git clone https://github.com/microsoft/vcpkg.git
- Access the folder:
cd vcpkg - Setup vcpkg:
./bootstrap-vcpkg.bat
vcpkg.exe integrate install
- Open a Git Bash terminal
- Access the folder:
cd micmac/MMVII - Create a directory for building intermediate files and access it:
mkdir build && cd build
- Configure cmake and generate Makefiles:
"[CMAKE_DIR]/cmake.exe" .. "-DCMAKE_TOOLCHAIN_FILE=[VCPKG_DIR]/vcpkg/scripts/buildsystems/vcpkg.cmake"
- Compile MMVII:
"[CMAKE_DIR]/cmake.exe" --build . --target full --config Release
- Add binaries to Windows
PATHenvironment variable via Advanced system settings menu. Example of path (adapt the path):"C:\src\micmac\MMVII\bin"
- If using CLang version XX and want OpenMP:
sudo apt install libomp-XX-dev - You can use
cmake -G Ninja ..to use Ninja build system instead of the native one. (sudo apt install ninja-build) - Use
cmake --build . -j Norcmake --build . -j N -vinstead of make (works with all build systems) - Use
cmake --build . --target cleanorcmake --build . --target cleanall - Use
ccmake ..orcmake-gui ..to change config option: - CMAKE_BUILD_TYPE:
- Debug : -g
- RelWithDebInfo : -O3 -g (default)
- Release : -O3 -DNDEBUG
- CMAKE_CXX_COMPILER (advanced mode : 't'):
- Allow to set compiler version and type (g++, clang)
- Clean :
- make clean : delete build products
- make distclean : delete build products and generated codes
- rm -fr MMVII/build/* : reinitialize the build configuration
You can enable command completion for MMVII in Linux Bash, which simplifies the use of MMVII commands.
Requirements:
bash-completionpython-is-python3
These are typically installed by default on Ubuntu. If not, you can install them using:
bash sudo apt install bash-completion python-is-python3`
Configuration:
-
Ensure MMVII is compiled.
-
Make sure the MMVII executable is in your
$PATH. -
Add the following line to your
${HOME}/.bashrcfile:[ -f ${HOME}/@MICMAC_SOURCE_DIR@/micmac/MMVII/bash-completion/mmvii-completion ] && . ${HOME}/@MICMAC_SOURCE_DIR@/micmac/MMVII/bash-completion/mmvii-completion
After making this modification, the command completion feature will be active in any new terminal session.
Windows:
If you're using bash (installed with git for example) on Windows, completion may also works:
-
You must have python >= 3.7 installed somewhere
-
Edit your ~/.bash_profile and add: (adapt first 2 lines to your case)
MMVII_INSTALL_PATH=/c/micmac/MMVII PYTHON_INSTALL_PATH=/c/Python/Python39/ PATH=${PYTHON_INSTALL_PATH}:${MMVII_INSTALL_PATH}/bin:$PATH [ -f ${MMVII_INSTALL_PATH}/bash-completion/mmvii-completion ] && . ${MMVII_INSTALL_PATH}/bash-completion/mmvii-completion
The vMMVII tool provides a convenient graphical user interface (GUI) for writing MMVII commands. To compile it, add "-DvMMVII_BUILD=ON" on then cmake configure command line.
For Ubuntu 22.04, you can install the necessary QT5 package with the following command:
sudo apt install qtbase5-devFor windows, it will be automatically downloaded and compiled (may take a very long time the first time)
To use vMMVII, simply type vMMVII in a terminal in your working directory.
Please note:
- Currently, there is no documentation available.
- The tool is in beta, so some MMVII parameters may be misinterpreted or may not have the appropriate File Dialog helper.
The latest version of the documentation can be downloaded directly HERE.
- Ensure you have doxygen installed (on Ubuntu, you can use the following command):
sudo apt install doxygen
- Navigate to the MMVII directory:
cd micmac/MMVII - Run the following command:
doxygen Doxyfile
- Ensure you have LaTeX installed (on Ubuntu, you can use the following command):
sudo apt install texlive-latex-base texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra texlive-science
- Navigate to the
MMVII/Docdirectory:cd micmac/MMVII/Doc - Run the following command:
make
- In a terminal type:
MMVII Bench 1
This project is licensed under the CECILL-B License - see the LICENSE.md file for details.
MMVII sources includes codes from:
- hapPLY: Copyright (c) 2018 Nick Sharp, MIT licence, https://github.com/nmwsharp/happly
- Delaunay/delaunator: Copyright (c) 2018 Volodymyr Bilonenko, MIT Licence
- Eigen: Copyright (C) 2008 Gael Guennebaud, Mozilla Public License, https://eigen.tuxfamily.org
- libE57Format, Copyright (C) 2020 Andy Maloney/Kevin Ackley, Boost Software License, https://github.com/asmaloney/libE57Format