MicMacRoom Tutorial: 01 Gravillons

De MicMac
Aller à : navigation, rechercher

Description

In this tutorial, we will approach general concepts, basics tools, and how to process an image dataset with overlaps with MicMacRoom. This dataset is light by design (4 images), in order to focus on the MicMacRoom tools. This tutorial is designed especially for MicMacRoom beginners with a light photogrammetry background.

Download

You can find this dataset at https://micmac.ensg.eu/data/gravillons_dataset.zip
Once you have downloaded it, you have to extract the ".zip" archive.

Presentation

This dataset was created by L.Girod at the University of Oslo, Norway. This dataset was acquired to model a volcano model created by O.Galland. Files present in the directory are:

  • 4 images : 1.JPG, 2.JPG, 3.JPG, 4.JPG.

01 gravillons caroussel.png

  • GCP coordinates: Dico-Appuis.xml.
  • Measures of GCPs in images: Mesure-Appuis.xml.
  • 1 Mask: 1_Masq.tif/1_Masq.xml
  • 2 command scripts: gravillons.sh (Linux) and gravillons.bat (Windows)

Tutorial

0 Project Creation

The usage of MicMacRoom requires a few steps to create your project. First, select all nodes (in the Graph Editor) and delete them. Then, save your project. The first real step is to set up two nodes (to create a node, right click on the Graph Editor space and search for the node):

  1. The CameraInit node
  2. The MicMacProject node

You don't need to change any parameter on these, you just need to link the SfMData Output of CameraInit to the SfMData Input of MicMacProject. This step allows Meshroom and MicMac to work together properly, they are needed in all project where you wish to use the MicMac commands in Meshroom. You can then import all your images.

1 Tie-Points search

The second step is to look for tie points (points that are seen in more than one image), this step is called image matching and performed by the command Tapioca, however, you will see that there are multiple Tapiocas available in MicMacRoom, this is to differentiate beetween certain important options that changes the inputs and outputs of the command. In this case, we will use TapiocaAll (The All option is used here because we know that all the images are going to have tie points with each other (they all depict the same area)). In this node, set the ImageSize to 1500 (ot to -1 if you want to process the tie-points at full resolution). Then, connect ProjectDirectory from MicMacProject to the TapiocaAll node. This is something that you will need to do a lot, as all ProjectDirectory will be linked between all nodes. This is important as it tells MicMacRoom the position of the input and ouput files.

2 Internal Orientation+Relative Orientation

Photogrammetry is composed of three steps :

  • Internal Orientation : to determine camera parameters (focal length, PPA, PPS, distortion center, or distortion parameters).
  • Relative Orientation : to determine the relative position of each camera in an arbitrary coordinate system.
  • Absolute Orientation : to map the relative orientations to a scaled and oriented coordinate system (typically WGS84)

In digital photogrammetry, the two first steps are generally processed at the same time. In MicMac, the tools which perform internal and relative orientation is called Tapas, in MicMacRoom, the node is also called Tapas, you can add it after the TapiocaAll node and link ProjectDirectory, ImagePattern, and HomolDirectory

Then in the Tapas node, put the Calibration Model to FraserBasic This tool uses a compensation by least squares to determine camera parameters and relative orientations. The option "FraserBasic", correspond to a model of distortion for our camera.

3 Visualize Relative Orientation

MicMacRoom include a tools which create a sparse point clouds (TPs) for visualization. This tool is based on the MicMac command AperiCloud and is also named AperiCloud. To use it, add an ApriCloud node and link ProjectDirectory, Image Pattern, Homol Directory, and OrientationDirectory with the Tapas node. At this point, you can start the process if you wish to see the Point Cloud. To find this file, go to the place where you saved your project then Meshroom Cache -> MicMacProject -> Then only folder that should be here is one with a long string as a name -> project and in there you should find all the inputs, intermediary, and output files, including the AperiCloud.ply file which can be viewed in Softwares such as CloudCompare or Meshlab (see Useful softwares for MicMac).

4 Absolute Orientation

4.1 GCPBascule

For this datasets, Ground Control Points, are already measured in images (file "Mesure-Appuis.xml"). With 3 points (X,Y,Z) we can determine the 3D transformation between the arbitrary system (Relative Orientation) and the georeferenced system, this operation is call "Bascule" and can be performed with the GCPBascule MicMac commmand, and with the GCPBascule node as well. To do this: add a GCPBascule node after the AperiCloud. Link the Project Directory and Image Pattern from AperiCloud. Also, link the Orientation Directory from AperiCloud to the Input Orientation of GCPBascule.

It is important at this point to have started the process once, as this is the only way to create the project directory which you will need to access. If you have done it after the previous step to check the Point Cloud then there is no need to start it again. Do not worry about losing time, Meshroom stores every intermediary steps and so when you add more nodes, it will not recaculate the previous ones (expect if you tell it to do so).

Once the process if finished, go to the place where you saved your project then Meshroom Cache -> MicMacProject -> Then only folder that should be here is one with a long string as a name -> project, in this folder, put the Dico-Appuis.xml and Mesure-Appuis.xml that were in the data given at the beginning of this tutorial. Then, in the GCPBascule node, put Dico-Appuis.xml in GCP 3D Coordinate File and Mesure-Appuis.xml in GCP Image coordinates File.

4.2 Campari

This tool process a first Bascule only with the GCPs (Directory Ori-Ground_Init), we will now calculate a second Bascule with GCPs and TPs. To do that, we use the equivalent of the MicMac command Campari, which is the Campari node.

Add a Campari node, link Project Directory and Image Pattern from GCPBascule. Also, link Output Orientation from GCPBascule to Orientation Directory. The last step is to link Homol Directory from """AperiCloud""" to Homol Directory.

4.3 AperiCloud2

We can visualize the new orientation calculated with Campari with AperiCloud.

Add an AperiCloud node. Link Project Directory, Image Pattern, and Homol Directory from Campari. Also link the topmost Orientation Directory from Campari (the one that is only an output) to Orientation Directory on the latest AperiCloud.

On this AperiCloud node, go to the bottom of the settings and change the name of PointCloud to something like AperiCloud2.ply, this will make it so the result of the two AperiCloud do not Override each other.

5 Dense Point Cloud

The last step is to densify the PointCloud, to do that, we will use the C3DC node that is the equivalent of the C3DC MicMac command.

Add a C3DC node. Link Project Directory, Image Pattern, Homol Directory, and Orientation Directory from AperiCloud2. Now you just need to press start!

Result

To find your results: go to the place where you saved your project then Meshroom Cache -> MicMacProject -> Then only folder that should be here is one with a long string as a name -> project

Conclusion

With this tutorial, you went through a complete photogrammetric process with MicMacRoom. This first tutorial was willingly easy and on a minimal dataset to help you kickstart your MicMacRoom skills. To go further, try the next tutorials.