MicMac v2 (MMVII)
June 30, 2026 ยท View on GitHub
Table of Contents
- Description
- Prerequisites
- Installation from sources (Linux/Windows)
- Installation from binary (Windows only)
- Run a test
- Documentation
- MMVII Command Completion
- License
- Useful links
Description
MicMac is a free open-source photogrammetry solution developed at (IGN) - French Mapping Agency - since 2003. This repository contains the second version named MMVII aimed at facilitating external contributions and being more maintainable in the long term has been in development since 2020.
Prerequisites
Compilation tools are required to build MMVII:
- C++ compiler (g++ or clang on Linux, MSVC++ on Windows)
- Git to clone the repository
- CMake to generate build files
- make or ninbja to build executable (Linux only)
- ccache for recompilation optimization (Linux only optional)
- vcpkg C/C++ library manager (Windows only)
- OpenMP multi-platform parallel programming (optionnal)
- Doxygen documentation generator (optional)
Some external libraries need to be present on your system (installation is described bellow for each platform):
- 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
Installation from sources
This section covers the compilation of MMVII source code to generate binaries.
(Pre-compiled binaries for Windows are available HERE)
Some specific MMVII commands may require the MicMac V1 binary and will complain if it is not found. In this case, install micmac v1 and make sure that micmac/bin is in you PATH environment variable.
Compilation procedure is described below for:
Linux Ubuntu distribution
-
Open a terminal
-
Install dependancies specific to MMVII:
sudo apt install pkg-config libproj-dev libgdal-dev libxerces-c-dev -
Access the folder:
cd 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 use "NUM-2" if you want to use the computer while compiling
- 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/MMVII/bin:$PATH' >> ~/.bashrc
Windows
Install vcpkg
- 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.batvcpkg.exe integrate install
Install MMVII
- Open a Git Bash terminal
- Access the folder:
cd 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\MMVII\bin"
Mac
- Install dependencies
brew install cmake proj gdal xerces-c - Clone MMVII repository
git clone https://github.com/micmac-V2/MMVII.git - Change directory to MMVII
cd MMVII - Build and compile
mkdir build && cd build cmake .. -DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" make full -j$(sysctl -n hw.logicalcpu) - Add to PATH
echo 'export PATH=/Users/your_username/MMVII/bin:$PATH' >> ~/.zshrc source ~/.zshrc - Run benchmarks
MMVII Bench 1
Bench passes if it does not end with a fatal error block.
Additionnal notes
Compilation details
- 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
Compilation with micmac V1 API
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.
-
Enable the CMake option MMVII_KEEP_LIBRARY_MMV1 and specify the source path of mimac in MMV1_PATH in the step Configure CMAKE and generate makefiles:
cmake .. -DMMVII_KEEP_LIBRARY_MMV1=on -DMMV1_PATH=your_directory_of_micmacv1
Graphical User Interface vMMVII
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-dev
For 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.
Installation from binary (Windows only)
WARNING: MMVII is essentially a command line tool with a somewhat specific syntax.
Download the MMVII archive file here.
Extract the .zip file in the directory of you choice (avoid c:\Program Files), c:\pgms for example.
The main executable will be c:\pgms\MMV2\bin\MMVII.EXE. There is a graphical front-end to help writing command line: c:\pgms\MMV2\bin\vMMVII.EXE.\
You can add the MMVI\bin path (in this example, c:\pgms\MMVII\bin) to your environment PATH variable.
Run a test
- In a terminal type:
MMVII Bench 1
There may be a lot of cryptic messages and some "## - Nb Warning " at the end, but the test passed if execution does not end with a message of the form:
######################################
Level=[UserEr:xxxxxxx]
Mes=[xxxxxxx xxxxxxxxxx xxxxxx xxxxxx]
========= ARGS OF COMMAND ==========
C:\pgms\MMVII\bin\MMVII.exe Bench 1
Documentation
The latest version of the (work in progress) documentation can be downloaded directly HERE. You can build documentation from sources if you have installed the MMVII sources:
Building Doxygen HTML documentation
- Ensure you have doxygen installed (on Ubuntu, you can use the following command):
sudo apt install doxygen - Navigate to the MMVII directory:
cd MMVII - Run the following command:
doxygen Doxyfile
Building PDF documentation
- 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 MMVII/Doc - Run the following command:
make
MMVII Command Completion
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 (replace @MICMAC_SOURCE_DIR@ with the directectory where your MMVII directory is)[ -f ${HOME}/@MICMAC_SOURCE_DIR@/MMVII/bash-completion/mmvii-completion ] && . ${HOME}/@MICMAC_SOURCE_DIR@/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/src/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
License
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