OriConvert : Différence entre versions

De MicMac
Aller à : navigation, rechercher
(Allowed commands : The explanations were from the Tapioca page, nowhere close to be correct! (not sure about the real explanations, so just removed absurdities))
 
(20 révisions intermédiaires par un autre utilisateur non affichées)
Ligne 1 : Ligne 1 :
 
[[Image:picto-liste.png|25px]] [[Command|List of commands]]
 
[[Image:picto-liste.png|25px]] [[Command|List of commands]]
 
==Description==
 
==Description==
Tapioca is a simple tool interface for computing tie points. I think Tapioca should be sufficient in 95% of cases. If it is not the case, you will have to refer to a more complex and powerful tool named [[Pastis]] which will be described later. In fact, Tapioca is only an interface to [[Pastis]].
+
The tool [[OriConvert]] is a versatile command used to:
 +
*Transform embedded GPS data from text format to MicMac's Xml orientation format.
 +
*Transform the GPS coordinate system, potentially into an euclidean coordinate system.
 +
*Generate image pattern for selecting a sample of the image block.
 +
*Compute relative speed of each camera in order to determine and correct GPS systematic error (delay).
 +
*Importing external orientation from others software: to come.
  
 
===Syntax===
 
===Syntax===
The global syntax for Tapioca is <br>
+
The global syntax for [[OriConvert]] is :
<pre>mm3d Tapioca UnNamedArgs NamedArgs</pre>
+
<pre>mm3d OriConvert Format_Specification Orientation_File Targeted_Orientation</pre>
  
===Allowed commands===
+
===Allowed commands===
*<b>MulScale</b> : Compute tie points for images in low resolution and then for high resolution.
+
*<b>OriTxtAgiSoft</b>
*<b>All</b> : Compute tie points for all images in a given resolution.
+
*<b>OriBluh</b>
*<b>Line</b> : Compute tie points for linear image canvas.
+
*<b>OriTxtInFile</b>
*<b>File</b> :
+
*<b>Graph</b> :
+
  
 
===Results===
 
===Results===
Tapioca generate a directory named "Homol" ("Homol_SRes" for Tapioca MulScale) in your working directory which contain for each image of your canvas, a directory named "Pastis<i>Image_name</i>". In this directory "Pastis" you will find a binary file (".dat") for each image linked with the first image by tie points. This binary files contains tie points.<br>
+
[[OriConvert]] produce an MicMac orientation based on georeferencing data. You cannot use directly this orientation for processing tools like AperiCloud or C3DC, launch before a [[CenterBascule]].
For example, in Gravillons dataset, all images are linked so this is the arborescence of the Gravillon Homol directory :<br>
+
[[Image:Tapioca_homol_arborescence.png|500px]]
+
  
 
===Workflow===
 
===Workflow===
Tapioca, is generally the first command to launch in a MicMac process.<br>
+
You can launch the [[OriConvert]] whenever you want, but of course before orientation tools.<br>
 
[[Image:Picto-previous.png|20px]] Previous Command : ~<br>
 
[[Image:Picto-previous.png|20px]] Previous Command : ~<br>
[[Image:Picto-next.png|20px]] Next Command : [[Tapas]].
+
[[Image:Picto-next.png|20px]] Next Command : [[CenterBascule]],[[Campari]] etc...
 
+
===Visualize tie points===
+
NB : This tool works only for Linux OS.<br>
+
If you want to visualize tie points matched by Tapioca, you can run the command [[SEL]]:
+
<pre>mm3d SEL image_1 image_2 KH=NB</pre>
+
[[Image:tapioca_exemple_sift.png|x200px]]
+
 
+
==MulScale==
+
The mode MulScale can save significant computation time on large sets of images. Even if it is not optimal for all canvas, it has the benefit of being general and usable with any data set. In this mode, a first computation of tie points is made for all the pairs of images at a low resolution (so it is quite fast), chosen by the user through the ''Size of Low Resolution Images'' option. Then the computation is done at the ''Size of High Resolution Images'' only for the pairs having, at low resolution, a number of tie points exceeding a given threshold (''NbMinPt'').
+
 
+
===Help===
+
You can access to the help by typing :<br>
+
<pre>mm3d Tapioca MulScale -help</pre>
+
  
 +
==Help==
 +
Help is the same for all arguments, You can access by typing :
 +
<pre>mm3d OriConvert -help</pre>
  
 
Mandatory unnamed args :
 
Mandatory unnamed args :
*string :: {Full Name (Dir+Pat)}
+
*string :: {Format specification}
*INT :: {Size of Low Resolution Images}
+
*string :: {Orientation file}
*INT :: {Size of High Resolution Images}
+
*string :: {Targeted orientation}
  
 
Named args :
 
Named args :
*[Name=ExpTxt] INT :: {Export files in text format (Def=false means binary)}
+
*[Name=ChSys] string :: {Change coordinate file}
*[Name=ByP] INT :: {By process}
+
*[Name=Calib] string :: {External XML calibration file}
*[Name=PostFix] string :: {Add postfix in directory}
+
*[Name=AddCalib] bool :: {Try to add calibration, def=true}
*[Name=NbMinPt] INT :: {Minimum number of points}
+
*[Name=ConvOri] string :: {Orientation convention (like eConvAngPhotoMGrade ...)}
*[Name=DLR] INT :: {Do Low Resolution}
+
*[Name=PrePost] vector<std::string> :: {[Prefix,Postfix] to generate name of image from id}
*[Name=Pat2] string :: {Second pattern}
+
*[Name=KN2I] string :: {Key 2 compute Name Image from Id in file}
*[Name=Detect] string
+
*[Name=DN] REAL :: {Neighbooring distance for Image Graph}
*[Name=Match] string
+
*[Name=ImC] string :: {Image "Center" for computing AltiSol}
*[Name=NoMax] bool
+
*[Name=NbImC] INT :: {Number of neighboors around Image "Center" (Def=50)}
*[Name=NoMin] bool
+
*[Name=RedSizeSC] INT :: {Reduced Size of image to use for Tapioca for AltiSol (Def=1000)}
*[Name=NoUnknown] bool
+
*[Name=Reexp] string :: {Reexport as Matrix (internal set up)}
 +
*[Name=Regul] REAL :: {Regularisation cost (Cost of hole), Def=5.0}
 +
*[Name=RegNewBr] REAL :: {cost of creating a new branch (Def=0.4, prop to Regul)}
 +
*[Name=Reliab] REAL :: {Threshold for reliable speed, Def=0.75 (prop to Regul)}
 +
*[Name=CalcV] bool :: {Compute speed (def = false)}
 +
*[Name=Delay] REAL :: {Delay to take into account after speed estimate}
 +
*[Name=TFC] bool :: {Teta from cap : compute orientation from speed)}
 +
*[Name=RefOri] string :: {Ref Orientation (internal purpose)}
 +
*[Name=SiftR] INT :: {Resolution of sift point for Tapioca ,when ImC, (Def No Sift)}
 +
*[Name=SiftLR] INT :: {Low Resolution of sift point for MultisCale ,when ImC (Def no multicale)}
 +
*[Name=NameCple] string :: {Name of XML file to save couples}
 +
*[Name=Delaunay] bool :: {Add delaunay arc when save couple (Def=true)}
 +
*[Name=DelaunayCross] bool :: {Complete delaunay with some crossing trick arc when save couple (Def=true)}
 +
*[Name=Cpt] vector<int> :: {============ [CptMin,CptMax] for tuning purpose =======}
 +
*[Name=UOC] bool :: {Use Only Center (tuning)}
 +
*[Name=MTD1] bool :: {Compute Metadata only for first image (tuning)}
 +
*[Name=Line] INT :: {Nb neighbour in the same line}
 +
*[Name=CBF] bool :: {Export calib as a link to existing file}
 +
*[Name=AltiSol] REAL :: {Average altitude of ground}
 +
*[Name=Prof] REAL :: {Average Prof of images}
 +
*[Name=OffsetXY] Pt2dr :: {Offset to substract from X,Y (To avoid possible round off error)}
 +
*[Name=CalOFC] string :: {When specified compute initial orientation from centers (in Ori-GenFromC) Ori-${CalOFC}, must contains internal calibrations}
 +
*[Name=OkNoIm] bool :: {Do not create error if image does not exist (def = false)}
 +
*[Name=SzW] REAL :: {Size for visualisation}
  
 +
==OriTxtAgiSoft==
 +
This tools is designed to convert orientation from Agisoft PhotoScan into MicMac orientation format.
 
===Example===
 
===Example===
For example with the Buddha dataset, you can launch :
 
<pre>mm3d Tapioca MulScale "IMG_[0-9]{4}.tif" 300 -1</pre>
 
For example with the Cuxa dataset, you can launch :
 
<pre>mm3d Tapioca MulScale "Abbey-IMG_.*.jpg" 200 800</pre>
 
 
==All==
 
Tie points are looked for in all possible pair of images at the reduced resolution chosen by the user in the ''Size of image'' option.
 
 
===Help===
 
You can access to the help by typing :
 
<pre>mm3d Tapioca All -help</pre>
 
 
Mandatory unnamed args :
 
*string :: {Full Name (Dir+Pat)}
 
*INT :: {Size of image}
 
 
Named args :
 
*[Name=ExpTxt] INT :: {Export files in text format (Def=false means binary)}
 
*[Name=PostFix] string :: {Add postfix in directory}
 
*[Name=ByP] INT :: {By process}
 
*[Name=Pat2] string :: {Second pattern}
 
*[Name=Detect] string
 
*[Name=Match] string
 
*[Name=NoMax] bool
 
*[Name=NoMin] bool
 
*[Name=NoUnknown] bool
 
  
 +
==OriBluh==
 
===Example===
 
===Example===
For example with the Ramses dataset, you can launch : <br>
+
 
<pre>mm3d Tapioca All "IMG.*CR2" 1000</pre>
+
==OriTxtInFile==
 +
GPS and attitude extracted from telemetry logs are generally structured as followed :
 +
<pre>
 +
image latitude longitude altitude yaw pitch roll
 +
R0040438.JPG 50.5860992029 4.7957755452 375.046 319.9 8.2 -2.1
 +
R0040439.JPG 50.5864719060 4.7953921650 376.604 319.4 10.1 3.6
 +
</pre>
  
For example with the Zhenjue dataset, you can launch : <br>
+
In this example (from the [[GrandLeez|UAS GrandLeez]] dataset, file GPS WPK Grand-Leez.csv), column titles are
<pre>mm3d Tapioca All ".*JPG" 1500</pre>
+
specified on the first line. Nevertheless, MicMac has its own convention regarding column title. We have
 +
to add columns specs but with the symbols K, W, P standing
 +
for kappa, omega and phi.
  
==Line==
+
<pre>
It often occurs that the photos canvas has a linear structure, for example, when you acquire photos of a facade walking along the street. In this case, you know that the <math>Kth</math> image can only have tie points with images in the interval [K - δ, K + δ] giving this information to Tapioca can save a lot of time. The argument ''Number of adjacent images to look for'' sets δ. The ''Circ'' option is used if the acquisition is circular (the first and last image see each other). All the other arguments have the same meaning as in the ''All'' mode.
+
#F=N Y X Z K W P
 
+
#
===Help===
+
#image latitude longitude altitude yaw pitch roll
You can access to the help by typing :
+
R0040438.JPG 50.5860992029 4.7957755452 375.046 319.9 8.2 -2.1
<pre>mm3d Tapioca Line -help</pre>
+
R0040439.JPG 50.5864719060 4.7953921650 376.604 319.4 10.1 3.6
 
+
</pre>
Mandatory unnamed args :
+
*string :: {Full Name (Dir+Pat)}
+
*INT :: {Image size}
+
*INT :: {Number of adjacent images to look for (&#948)}
+
 
+
Named args :
+
*[Name=ExpTxt] INT :: {Export files in text format (Def=false means binary)}
+
*[Name=Jump] vector<int> :: {Densification by jump }
+
*[Name=PostFix] string :: {Add postfix in directory}
+
*[Name=ByP] INT :: {By process}
+
*[Name=Circ] INT :: {In line mode if it's a loop (begin ~ end)}
+
*[Name=ForceAdSupResol] bool :: {to force computation even when Resol
+
*[Name=Detect] string
+
*[Name=Match] string
+
*[Name=NoMax] bool
+
*[Name=NoMin] bool
+
*[Name=NoUnknown] bool
+
  
 
===Example===
 
===Example===
For example with the Ramses dataset, you can launch :
+
Once the file has been modified, the following command can be used:
<pre> mm3d Tapioca Line "IMG.*CR2" 3 1000</pre>
+
<pre>mm3d OriConvert OriTxtInFile GPS_WPK_Grand-Leez.csv Nav-Brut NameCple=FileImagesNeighbour.xml</pre>
 
+
==Graph==
+
 
+
===Help===
+
You can access to the help by typing :<br>
+
<pre>mm3d Tapioca Graph -help</pre>
+
 
+
Mandatory unnamed args :
+
*string :: {Full images' pattern (directory+pattern)}
+
*INT :: {Processing size of image (for the greater dimension)}
+
 
+
Named args :
+
*[Name=ByP] INT :: {By process}
+
*[Name=Detect] string :: {executable used to detect keypoints}
+
*[Name=MaxPoint] INT :: {number of points used per image to construct the graph (default 200)}
+
*[Name=MinScale] REAL :: {if specified, points with a lesser scale are ignored}
+
*[Name=MaxScale] REAL :: {if specified, points with a greater scale are ignored}
+
*[Name=NbRequired] INT :: {number of matches to create a connexion between two images (default 1)}
+
*[Name=Out] string :: {name of the produced XML file}
+
*[Name=PrintGraph] bool :: {print result graph in standard output}
+
 
+
==File==
+
A file specifying a set of images to be matched is needed here. Such a file can either be generated manually or be produced with [[OriConvert]] when the images come with GPS information, the images to be matched together being within a given distance threshold of each others.
+
 
+
===Help===
+
You can access to the help by typing :<br>
+
<pre>mm3d Tapioca File -help</pre>
+
 
+
Mandatory unnamed args :
+
*string :: {XML-File of pair}
+
*INT :: {Resolution}
+
 
+
Named args :
+
*[Name=ExpTxt] INT :: {Export files in text format (Def=false means binary)}
+
*[Name=PostFix] string :: {Add postfix in directory}
+
*[Name=ByP] INT :: {By process}
+
*[Name=Detect] string
+
*[Name=Match] string
+
*[Name=NoMax] bool
+
*[Name=NoMin] bool
+
*[Name=NoUnknown] bool
+
 
+
===Example===
+
In the tutorial [[GrandLeez]], we use the option File for [[Tapioca]].
+
The file <i>FileImagesNeighbour.xml</i> contain for each images, his differents neighboors. If you open the file, you can see :
+
<pre>
+
    <Cple>R0040439.JPG R0040519.JPG</Cple>
+
    <Cple>R0040439.JPG R0040514.JPG</Cple>
+
    <Cple>R0040439.JPG R0040444.JPG</Cple>
+
    <Cple>R0040439.JPG R0040517.JPG</Cple>
+
    <Cple>R0040439.JPG R0040438.JPG</Cple>
+
    <Cple>R0040439.JPG R0040440.JPG</Cple>
+
    <Cple>R0040439.JPG R0040441.JPG</Cple>
+
    <Cple>R0040439.JPG R0040516.JPG</Cple>
+
    <Cple>R0040439.JPG R0040442.JPG</Cple>
+
    <Cple>R0040439.JPG R0040515.JPG</Cple>
+
    <Cple>R0040439.JPG R0040443.JPG</Cple>
+
</pre>
+
It means, image <i>R0040439.JPG</i> is connected with all the images detailed in <Cple> tag. So you can run the tie point generation with [[Tapioca]] using this file :
+
<pre>mm3d Tapioca File FileImagesNeighbour.xml -1</pre>
+

Version actuelle en date du 28 décembre 2016 à 14:28

Picto-liste.png List of commands

Description

The tool OriConvert is a versatile command used to:

  • Transform embedded GPS data from text format to MicMac's Xml orientation format.
  • Transform the GPS coordinate system, potentially into an euclidean coordinate system.
  • Generate image pattern for selecting a sample of the image block.
  • Compute relative speed of each camera in order to determine and correct GPS systematic error (delay).
  • Importing external orientation from others software: to come.

Syntax

The global syntax for OriConvert is :

mm3d OriConvert Format_Specification Orientation_File Targeted_Orientation

Allowed commands

  • OriTxtAgiSoft
  • OriBluh
  • OriTxtInFile

Results

OriConvert produce an MicMac orientation based on georeferencing data. You cannot use directly this orientation for processing tools like AperiCloud or C3DC, launch before a CenterBascule.

Workflow

You can launch the OriConvert whenever you want, but of course before orientation tools.
Picto-previous.png Previous Command : ~
Picto-next.png Next Command : CenterBascule,Campari etc...

Help

Help is the same for all arguments, You can access by typing :

mm3d OriConvert -help

Mandatory unnamed args :

  • string :: {Format specification}
  • string :: {Orientation file}
  • string :: {Targeted orientation}

Named args :

  • [Name=ChSys] string :: {Change coordinate file}
  • [Name=Calib] string :: {External XML calibration file}
  • [Name=AddCalib] bool :: {Try to add calibration, def=true}
  • [Name=ConvOri] string :: {Orientation convention (like eConvAngPhotoMGrade ...)}
  • [Name=PrePost] vector<std::string> :: {[Prefix,Postfix] to generate name of image from id}
  • [Name=KN2I] string :: {Key 2 compute Name Image from Id in file}
  • [Name=DN] REAL :: {Neighbooring distance for Image Graph}
  • [Name=ImC] string :: {Image "Center" for computing AltiSol}
  • [Name=NbImC] INT :: {Number of neighboors around Image "Center" (Def=50)}
  • [Name=RedSizeSC] INT :: {Reduced Size of image to use for Tapioca for AltiSol (Def=1000)}
  • [Name=Reexp] string :: {Reexport as Matrix (internal set up)}
  • [Name=Regul] REAL :: {Regularisation cost (Cost of hole), Def=5.0}
  • [Name=RegNewBr] REAL :: {cost of creating a new branch (Def=0.4, prop to Regul)}
  • [Name=Reliab] REAL :: {Threshold for reliable speed, Def=0.75 (prop to Regul)}
  • [Name=CalcV] bool :: {Compute speed (def = false)}
  • [Name=Delay] REAL :: {Delay to take into account after speed estimate}
  • [Name=TFC] bool :: {Teta from cap : compute orientation from speed)}
  • [Name=RefOri] string :: {Ref Orientation (internal purpose)}
  • [Name=SiftR] INT :: {Resolution of sift point for Tapioca ,when ImC, (Def No Sift)}
  • [Name=SiftLR] INT :: {Low Resolution of sift point for MultisCale ,when ImC (Def no multicale)}
  • [Name=NameCple] string :: {Name of XML file to save couples}
  • [Name=Delaunay] bool :: {Add delaunay arc when save couple (Def=true)}
  • [Name=DelaunayCross] bool :: {Complete delaunay with some crossing trick arc when save couple (Def=true)}
  • [Name=Cpt] vector<int> :: {============ [CptMin,CptMax] for tuning purpose =======}
  • [Name=UOC] bool :: {Use Only Center (tuning)}
  • [Name=MTD1] bool :: {Compute Metadata only for first image (tuning)}
  • [Name=Line] INT :: {Nb neighbour in the same line}
  • [Name=CBF] bool :: {Export calib as a link to existing file}
  • [Name=AltiSol] REAL :: {Average altitude of ground}
  • [Name=Prof] REAL :: {Average Prof of images}
  • [Name=OffsetXY] Pt2dr :: {Offset to substract from X,Y (To avoid possible round off error)}
  • [Name=CalOFC] string :: {When specified compute initial orientation from centers (in Ori-GenFromC) Ori-${CalOFC}, must contains internal calibrations}
  • [Name=OkNoIm] bool :: {Do not create error if image does not exist (def = false)}
  • [Name=SzW] REAL :: {Size for visualisation}

OriTxtAgiSoft

This tools is designed to convert orientation from Agisoft PhotoScan into MicMac orientation format.

Example

OriBluh

Example

OriTxtInFile

GPS and attitude extracted from telemetry logs are generally structured as followed :

image latitude longitude altitude yaw pitch roll
R0040438.JPG 50.5860992029 4.7957755452 375.046 319.9 8.2 -2.1
R0040439.JPG 50.5864719060 4.7953921650 376.604 319.4 10.1 3.6

In this example (from the UAS GrandLeez dataset, file GPS WPK Grand-Leez.csv), column titles are specified on the first line. Nevertheless, MicMac has its own convention regarding column title. We have to add columns specs but with the symbols K, W, P standing for kappa, omega and phi.

#F=N Y X Z K W P
#
#image latitude longitude altitude yaw pitch roll
R0040438.JPG 50.5860992029 4.7957755452 375.046 319.9 8.2 -2.1
R0040439.JPG 50.5864719060 4.7953921650 376.604 319.4 10.1 3.6

Example

Once the file has been modified, the following command can be used:

mm3d OriConvert OriTxtInFile GPS_WPK_Grand-Leez.csv Nav-Brut NameCple=FileImagesNeighbour.xml