MicMac v2 (MMVII)
July 29, 2026 · View on GitHub
Table of Contents
- Description
- Prerequisites
- Installation from sources (Linux/Windows)
- Installation from binary (Windows only)
- Running MMVII from a container image
- 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
- Windows
- Mac
- a container image, which installs no dependency on your machine
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.
Building in a container image
A second image, distinct from the one that runs MMVII, carries the whole build toolchain — g++ and clang-18, PROJ, GDAL, Xerces, pybind11 and the LaTeX set — and no MMVII: it compiles the sources you give it, so nothing has to be installed on your machine.
docker pull ghcr.io/micmac-v2/build-mmvii
cd <your MMVII source directory>
docker run --rm -it -v "$PWD:$PWD" -w "$PWD" ghcr.io/micmac-v2/build-mmvii
That opens a shell in your own source directory, where cmake, ninja,
make -C Doc a4 and pip wheel work exactly as described above. The single command
mmvii-build does the whole full cycle, and takes its compiler from CC and CXX:
docker run --rm -e CC=clang-18 -e CXX=clang++-18 \
-v "$PWD:$PWD" -w "$PWD" ghcr.io/micmac-v2/build-mmvii mmvii-build
As for the MMVII image, --user is optional and -w is what makes the container adopt
your identity, so the build products (bin/, build/, src/GeneratedCodes/) belong to
you and never to root. The ccache of the build lives in <build directory>/ccache. The
image converts to a Singularity/Apptainer image as well; use singularity run there
rather than exec, so that the entry point applies.
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.
Running MMVII from a container image
A ready-to-use image containing a compiled MMVII is published for each version of
the main branch:
ghcr.io/micmac-v2/mmvii:latest
Nothing has to be compiled or installed: the image carries MMVII, its data directories and all its libraries. It is a Linux x86-64 image; on Windows and macOS it runs through Docker Desktop.
The image is built for Docker, and converts to a Singularity/Apptainer image without any change.
Docker
Get the image:
docker pull ghcr.io/micmac-v2/mmvii
Commands that need no data of yours require nothing else:
docker run --rm ghcr.io/micmac-v2/mmvii MMVII # list the MMVII commands
docker run --rm ghcr.io/micmac-v2/mmvii MMVII Bench 1 # run the self tests
To work on your own files, the container must see them, run as you, and start in the current directory:
docker run --rm -it \
--user "$(id -u):$(id -g)" -e HOME="$HOME" \
-v "$HOME:$HOME" -v "$PWD:$PWD" -w "$PWD" \
ghcr.io/micmac-v2/mmvii MMVII <command> <arguments>
--user is optional: given none, the container drops root immediately and adopts the
owner of the directory named by -w, so it writes your files as you and never runs your
command as root. -w "$PWD" is what carries that identity — without it the container
starts in a directory of its own and falls back to an account that cannot write in your
files, and MMVII fails as soon as it writes its log file. Passing --user explicitly
remains valid, and is what the MMVII shell function of the next section does. Mounting
$HOME and passing HOME is what keeps your MMVII profile from one container to the
next; without them MMVII works in a temporary home, with its default settings. Mounting
the directories under the same paths as on the host means an absolute path
designates the same file on both sides.
That command line is too long to type repeatedly: see
Command completion in your own shell, which
turns it into a plain short MMVII command.
Without a command, the image opens an interactive bash session, with the MMVII command completion already enabled — useful to chain several commands at the cost of a single container:
docker run --rm -it \
--user "$(id -u):$(id -g)" -e HOME="$HOME" \
-v "$HOME:$HOME" -v "$PWD:$PWD" -w "$PWD" \
ghcr.io/micmac-v2/mmvii
The prompt of that session displays I have no name!, because your user id is unknown
inside the image; this is only cosmetic.
Singularity / Apptainer
Build the image once, from the published Docker image (replace singularity with
apptainer throughout if that is what you use):
singularity build mmvii.sif docker://ghcr.io/micmac-v2/mmvii:latest
Then run MMVII, from any directory:
singularity exec mmvii.sif MMVII # list the MMVII commands
singularity exec mmvii.sif MMVII Bench 1 # run the self tests
singularity exec mmvii.sif MMVII <command> <arguments>
Nothing has to be mounted and no user option is needed: Singularity/Apptainer runs as you, keeps the current directory and makes your home directory available, so paths already designate the same files inside and outside. This is also why the read-only image is enough — an image file is read only by construction.
Without a command, the image opens an interactive bash session, with the MMVII command completion already enabled:
singularity run mmvii.sif
Use run and not singularity shell, which starts a bash that does not read its
initialisation files, and therefore has no completion.
Command completion in your own shell
Optionally, mmvii-bash-init sets up your own bash — outside any container — so
that you no longer have to type a docker run or singularity exec command line. It:
- defines an
MMVIIcommand, which runs the container on the current directory, so thatMMVII Bench 1orMMVII <command> <arguments>are enough; - enables the
<TAB>command completion of MMVII, on command names, argument names and argument values, exactly as if MMVII were installed on your system.
Nothing is installed on your system. Ask the image for the command to type:
docker run --rm ghcr.io/micmac-v2/mmvii mmvii-bash-init
singularity exec mmvii.sif mmvii-bash-init
It prints the command, which you then type — one line, with the image it came from already filled in:
source <(docker run --rm ghcr.io/micmac-v2/mmvii mmvii-bash-init --emit)
source <(singularity exec mmvii.sif mmvii-bash-init --emit)
You can put that line in your ${HOME}/.bashrc so that every new terminal is set up;
each one then starts one container, which takes about a second. Run it again after
updating the image, so that the completion follows the new version.
MMVII is defined as an exported bash function, so it is also available in the bash
scripts started from that shell, without their having to set anything up. It is not
available to a /bin/sh script, nor to a program calling MMVII directly; those must
use the full docker run or singularity exec command.
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 displays "Bench is successful." near the end and specifically 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.
This section describes the completion for an MMVII installed on your system. If you use the container image instead, the completion is already enabled inside it, and one command enables it in your own shell: see Running MMVII from a container image.
Requirements:
bash-completionpython3
These are typically installed by default on Ubuntu. If not, you can install them using:
bash sudo apt install bash-completion 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