Gravillons tutorial : Différence entre versions

De MicMac
Aller à : navigation, rechercher
(4 Absolute Orientation)
m (Tidied up some phrases)
 
(9 révisions intermédiaires par 4 utilisateurs non affichées)
Ligne 1 : Ligne 1 :
[[Image:picto-liste.png|25px]] [[Tutorial|Tutorial index]]
+
[[Image:picto-liste.png|25px|link=Tutorials]] [[Tutorials|Tutorials index]]
==Download==
+
==Description==
*You can find this dataset at :<code>http://logiciels.ign.fr/?Telechargement,20</code><br>Datasets are available at the bottom of the page, in part test datasets. Then, UnZip the ".zip" archive.
+
In this tutorial, we will approach general concepts, basics tools, and how to process an image dataset with overlaps with MicMac. This dataset is light by design (4 images), in order to focus on the MicMac tools.
 +
This tutorial is designed especially for MicMac beginners with a light photogrammetry background.
  
*There is also a direct link to download it in zip format here : <code>http://micmac.ensg.eu/data/gravillons_dataset.zip</code>
+
==Download==
 +
You can find this dataset at <code>http://micmac.ensg.eu/data/gravillons_dataset.zip</code> <br>
 +
Once you have downloaded it, you have to extract the ".zip" archive.
  
 
==Presentation==
 
==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.
 
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.
File present in the directory are :
+
Files present in the directory are:
 
*4 images : 1.JPG, 2.JPG, 3.JPG, 4.JPG.
 
*4 images : 1.JPG, 2.JPG, 3.JPG, 4.JPG.
 
[[Image:01_gravillons_caroussel.png]]
 
[[Image:01_gravillons_caroussel.png]]
*GCPs coordinates : Dico-Appuis.xml.
+
*GCP coordinates: Dico-Appuis.xml.
*Mesure of GCPs in images : Mesure-Appuis.xml.
+
*Measures of GCPs in images: Mesure-Appuis.xml.
*1 Mask : 1_Masq.tif/1_Masq.xml
+
*1 Mask: 1_Masq.tif/1_Masq.xml
*2 commands scripts : gravillons.sh (Linux) et gravillons.bat (Windows)
+
*2 command scripts: gravillons.sh (Linux) and gravillons.bat (Windows)
During this tutorial, we will approach general concepts, for more details, go further in tutorials or directly in commands pages.
+
  
 
==Tutorial==
 
==Tutorial==
Ligne 32 : Ligne 34 :
 
===2 Internal Orientation+Relative Orientation===
 
===2 Internal Orientation+Relative Orientation===
 
Photogrammetry is composed of three steps :
 
Photogrammetry is composed of three steps :
*Internal Orientation : which consist to determine camera's paremeter (focal length, PPA, PPS, distorsion center, or distorsion parameters).
+
*Internal Orientation : to determine camera parameters (focal length, PPA, PPS, distortion center, or distortion parameters).
*Relative Orientation : which consist to determine position of each camera's from each other in an arbitrary system.
+
*Relative Orientation : to determine the relative position of each camera in an arbitrary coordinate system.
*Absolute Orientation : which consist to bascule the relative orientation to a scaled and oriented system (typically WGS84)
+
*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 call [[Tapas]] :
 
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 call [[Tapas]] :
 
<pre>mm3d Tapas FraserBasic ".*.JPG" Out=Arbitrary</pre>
 
<pre>mm3d Tapas FraserBasic ".*.JPG" Out=Arbitrary</pre>
This tools use a compensation by least squares to determine camera's parameter and relative orientation. The option "FraserBasic", correspond to a model of distorsion for our camera. The "option" Out specify the name of the orientation directory (here it will be Ori-Arbitrary).
+
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. The "option" Out specify the name of the orientation directory (here it will be Ori-Arbitrary).
  
 
===3 Visualize Relative Orientation===
 
===3 Visualize Relative Orientation===
Ligne 50 : Ligne 52 :
 
<pre>mm3d GCPBascule ".*.JPG" Arbitrary Ground_Init Dico-Appuis.xml Mesure-Appuis.xml</pre>
 
<pre>mm3d GCPBascule ".*.JPG" Arbitrary Ground_Init Dico-Appuis.xml Mesure-Appuis.xml</pre>
 
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 command [[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 command [[Campari]] :
<pre>mm3d Campari" ".*.JPG" Ground_Init Ground</pre>
+
<pre>mm3d Campari ".*.JPG" Ground_Init Ground</pre>
 
The new orientation is stocked in the directory "Ori-Ground". We can visualize it with [[AperiCloud]] :
 
The new orientation is stocked in the directory "Ori-Ground". We can visualize it with [[AperiCloud]] :
<pre>mm3d AperiCloud ".*JPG" Ground</pre>
+
<pre>mm3d AperiCloud ".*.JPG" Ground</pre>
 
You can visualize the points cloud created in Meshlab.
 
You can visualize the points cloud created in Meshlab.
  
 
<div class="toccolours mw-collapsible mw-collapsed" style="background-color: Lavender;width: 1400px">
 
<div class="toccolours mw-collapsible mw-collapsed" style="background-color: Lavender;width: 1400px">
 
<h6 style="font-family: Helvetica:font-size: 40px">Go further</h6>
 
<h6 style="font-family: Helvetica:font-size: 40px">Go further</h6>
<div class="mw-collapsible-content">The file "Mesure-Appuis.xml" is already furnished in the dataset, it contain the mesurements of each marks in image coordinates (px). If you want to mesure marks by yourself, you can use the tool [[SaisieAppuisInitQT]] before GCPBascule etc...
+
<div class="mw-collapsible-content">The file "Mesure-Appuis.xml" is already provided in the dataset, it contain the measurements of each GCPs in image coordinates (px). If you want to mesure the GCPs by yourself, you can use the tool [[SaisieAppuisInitQT]] before GCPBascule etc...
 
<pre>mm3d SaisieAppuisInitQT ".*.JPG" Arbitrary Dico-Appuis.xml Mesure-Appuis.xml</pre>
 
<pre>mm3d SaisieAppuisInitQT ".*.JPG" Arbitrary Dico-Appuis.xml Mesure-Appuis.xml</pre>
It launch a GUI to click on marks, when it's finish don't forget to save before to leave. It will create to files :
+
It launch a GUI to click on GCPs, when it's finish don't forget to save before leaving. It will create to files :
*Mesure-Appuis-S2D.xml : Mesurements of marks in images coordinates.
+
*Mesure-Appuis-S2D.xml : Measurements of GCPs in images coordinates.
*Mesure-Appuis-S3D.xml : Mesurements of marks in Relative Orientation (here "Arbitrary"). Warning no unit.
+
*Mesure-Appuis-S3D.xml : Measurements of GCPs in Relative Orientation (here "Arbitrary"). Warning no unit.
 
So for the following command don't forget to use "Mesure-Appuis-S2D.xml" instead of "Mesure-Appuis.xml".
 
So for the following command don't forget to use "Mesure-Appuis-S2D.xml" instead of "Mesure-Appuis.xml".
 +
 +
This command is best explained in the [[Pierrerue_tutorial|Pierrerue tutorial]].
 
</div>
 
</div>
 
</div>
 
</div>
Ligne 73 : Ligne 77 :
 
===6 Create a Dense Points Cloud===
 
===6 Create a Dense Points Cloud===
 
This last tool doesn't create directly a 3D point cloud. To generate it, you have to run an other tools, Nuage2Ply :
 
This last tool doesn't create directly a 3D point cloud. To generate it, you have to run an other tools, Nuage2Ply :
<pre>mm3d Nuage2Ply" "MM-Malt-Img-1/NuageImProf_STD-MALT_Etape_7.xml" Attr="1.JPG" Out=1.ply RatioAttrCarte=2</pre>
+
<pre>mm3d Nuage2Ply "MM-Malt-Img-1/NuageImProf_STD-MALT_Etape_7.xml" Attr="1.JPG" Out=1.ply RatioAttrCarte=2</pre>
 
Then visualize the 3D model "1.ply" in Meshlab.
 
Then visualize the 3D model "1.ply" in Meshlab.
  
 
===Conclusion===
 
===Conclusion===
 
With this tutorial, you went through a complete photogrammetric process with MicMac. This first tutorial was willingly easy and on a minimal dataset to help you kickstart your MicMac skills. To go further, try the next tutorials.
 
With this tutorial, you went through a complete photogrammetric process with MicMac. This first tutorial was willingly easy and on a minimal dataset to help you kickstart your MicMac skills. To go further, try the next tutorials.

Version actuelle en date du 5 octobre 2017 à 21:26

Picto-liste.png Tutorials index

Description

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

Download

You can find this dataset at http://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

1 Tie-Points search

The first step of each MicMac pipline is to look for tie points (points that are seen in more than one image), this step is call image matching and performed by the command Tapioca :

mm3d Tapioca All ".*.JPG" 1500

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).

Go further
To process tie points at full resolution, use "-1" (instead of 1500 here):
mm3d Tapioca All ".*.JPG" -1

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 call Tapas :

mm3d Tapas FraserBasic ".*.JPG" Out=Arbitrary

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. The "option" Out specify the name of the orientation directory (here it will be Ori-Arbitrary).

3 Visualize Relative Orientation

Relative Orientation
Meshlab visualization

MicMac include a tools which create a sparse point clouds (TPs) for visualization. This tool is AperiCloud :

mm3d AperiCloud ".*.JPG" Arbitrary

After this step, a ".ply" file will appear in your working directory, open it with Meshlab (Screenshot 1 : see Useful softwares for MicMac)

4 Absolute Orientation

Absolute Orientation
Absolute Orientation

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 by the command GCPBascule :

mm3d GCPBascule ".*.JPG" Arbitrary Ground_Init Dico-Appuis.xml Mesure-Appuis.xml

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 command Campari :

mm3d Campari ".*.JPG" Ground_Init Ground

The new orientation is stocked in the directory "Ori-Ground". We can visualize it with AperiCloud :

mm3d AperiCloud ".*.JPG" Ground

You can visualize the points cloud created in Meshlab.

Go further
The file "Mesure-Appuis.xml" is already provided in the dataset, it contain the measurements of each GCPs in image coordinates (px). If you want to mesure the GCPs by yourself, you can use the tool SaisieAppuisInitQT before GCPBascule etc...
mm3d SaisieAppuisInitQT ".*.JPG" Arbitrary Dico-Appuis.xml Mesure-Appuis.xml

It launch a GUI to click on GCPs, when it's finish don't forget to save before leaving. It will create to files :

  • Mesure-Appuis-S2D.xml : Measurements of GCPs in images coordinates.
  • Mesure-Appuis-S3D.xml : Measurements of GCPs in Relative Orientation (here "Arbitrary"). Warning no unit.

So for the following command don't forget to use "Mesure-Appuis-S2D.xml" instead of "Mesure-Appuis.xml".

This command is best explained in the Pierrerue tutorial.

5 Create a depth map

3D Points Cloud

With any orientation directory, you can compute a depth map. The method consisting on using all the images to create a 3D model is call dense correlation or densification. In MicMac, it's performed by the command Malt :

mm3d Malt GeomImage ".*.JPG" Ground Master="1.JPG" ZoomF=2

6 Create a Dense Points Cloud

This last tool doesn't create directly a 3D point cloud. To generate it, you have to run an other tools, Nuage2Ply :

mm3d Nuage2Ply "MM-Malt-Img-1/NuageImProf_STD-MALT_Etape_7.xml" Attr="1.JPG" Out=1.ply RatioAttrCarte=2

Then visualize the 3D model "1.ply" in Meshlab.

Conclusion

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