MicMac

From gnewarchaeology wiki
Revision as of 15:01, 4 July 2014 by Dncgst (Talk | contribs) (Created page with "<yambe:breadcrumb /> __NOTOC__ == References == * http://logiciels.ign.fr/?-Micmac,3- == CLI tools == The pipeline for transforming a set of images in a 3D model, and opt...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
MicMac



References

CLI tools

The pipeline for transforming a set of images in a 3D model, and optionally generating ortho-photo, is made essentially of four ”complex” tools:

– Pastis. In fact, this tool is no more than an interface to the well known Sift++; – Apero starts from tie points generated by Pastis, and optional complementary measurements, and generates external and internal orientations compatible with these measurements; – MICMAC starts from orientation generated by Apero and computes image matching; – Porto starts from individual rectified images, that have been optionally generated by MicMac, and generates a global ortho-photo; this tool is still in a very early stage.

There are several auxiliary tools that may be helpful for importing or exporting data at different steps of this pipeline:

– BatchFDC for batching a set of commands; – Casa for computing analytic surface (cylinder . . . ), from points cloud, very early stage; – ClipIm for clipping image; – ConvertIm for some image convertion; – Dequant for quantifying an image; – GrShade for compute shading from depth image; – MapCmd transforms a command working on a single file in a command working on a set of files; – CpFileVide to complete; – MpDcraw, an interface to the great dcraw offering some low-level service useful for image matching; – MyRename for image renaming, using modern regular expression and giving the possibility to integrate xif data in the new name, tricky but necessary in the existing pipeline; – Nuage2Ply, a tool to convert depth map in point cloud; – SaisieMasq, a user friendly (compared to others . . . ) tool to create mask upon an image; – ScaleIm, tool for scaling image; – ScaleNuage, tool for scaling internal representation of point cloud; – tiff info, tool for giving information about a tiff file; – to8Bits, tool for converting 16 or 32 bit image in a 8 bit image; – SupMntIm, tool for generating a superposition of image and MNT in hypsometry and level curves; – PanelIm. Gather images in a panel.

All in one command

– Tapioca, full automatic tie points computation works. In fact, this tool is no more than an interface to Pastis; – Tapas, full automatic orientation computation works; – full automatic matching is not achieved, there exist some piece of code that may be already usefull for some users; – Malt, semi-automatic matching works;

The universal command

The syntax for calling the tools is based on a unique command mm3d:

mm3d Command arg1 arg2 ... argn NameOpt1=Argot1 ...

For backward compatibility (support of existing user’s script), the old syntax is still supported for most of the existing tool. However, it is recommended for new scripts to be based on the universal command mm3d.

For the main command, a log file mm3d-LogFile.txt is created, this file stores a global history of all the processing.

= Tapioca

The simplest case of use of Tapioca is when you only want to compute tie points between all the pairs of a set of images.

Tapioca All Files Size ArgOpt=
  • Files is the concatenation of the directory where the files are located with a regular expression used as a filter on the existing files of the directory;
  • Size is used to shrink the images. It does not specify a scale but the desired width for shrinking the images: −1 means, conventionally, no shrinking; if the initial image has a width of 5000, and the value is 2000, it will specify a scaling of 0.4.

The only optional arguments are those common to all modes (ExpTxt and ByP):

  • ExpTxt=1 means that the export is made in text mode.
mm3d Tapioca All "../micmac_data/ExempleDoc/Boudha/IMG_[0-9]{4}.tif" -1 ExpTxt=1

Optimization

Linear structures

It often occurs that the photos canvas has a linear structure. In this case, you know that K th can only have tie points with images in the interval [K − δ, K + δ]; giving this information to Tapioca can save a lot of time.

Tapioca Line Files Size delta ArgOpt=
Multi scale

The mode MulScale can save significant computation time on large sets of images. A first computation of tie points is made for all the pairs of images at very low resolution (so it is quite fast). Then the computation, at the desired resolution, is done only for the pairs having, at low resolution, a number of tie points exceeding a given threshold.

Tapioca MulScale Files SizeLow Size NbMinPt= ArgOpt=
  • NbMinPt is the threshold on the number of tie points detected at low resolution, its default value is 2.
File of pairs

Sometimes, you will have external information (like embedded GPS) that allows you to know which pairs of images are potential candidates for tie points. The easiest way to communicate your information is to write a file containing the explicit list of pairs of images. It is possible in the File mode.

Tapioca File NameOfFile Size ArgOpt=

The file containing the pairs must have the following structure:

<?xml version="1.0" ?>
<SauvegardeNamedRel>
   <Cple>IMG_5564.tif IMG_5565.tif</Cple>
   <Cple>IMG_5574.tif IMG_5575.tif</Cple>
   <Cple>IMG_5580.tif IMG_5579.tif</Cple>
   <Cple>IMG_5581.tif IMG_5582.tif</Cple>
</SauvegardeNamedRel>

Tapas

The general tool for computing orientation of images is Apero. Tapas is a tool offering most of the possibilities of Apero for computing purely relative orientations.

Tapas ModeCalib PatternImage
  • ModeCalib is an enumerated value specifying a model of calibration;
  • PatternImage is a pattern specifying the subset of images to orientate.

The possible value of ModeCalib are:

RadialExtended a model with radial distorsion (10 degrees of freedom); RadialBasic a ”subset” of previous model (5 degrees of freedom); Fraser a radial model, with decentric and affine parameters (12 degrees of freedom); FraserBasic same as previous with (10 degrees of freedom); FishEyeEqui a model adapted for diagonal fisheyes equilinear (14 degrees of freedom); HemiEqui same model as previous, but adapted to hemispheric equilinear fisheye; AutoCal and Figee , with this tag no model is defined, all the calibration must have a value.

Optimization

Successive calls

With large data set, it is often preferable to proceed in two step:

  1. compute on a small set of image a value of intrinsic calibration. This set of image should be favorable to calibration; ideally, it should fullfil the following requirements:
    • all image converging to same part of the scene,to facilitate the computation of external orientation
    • a scene with sufficient depth variation ,to have accurate focal length estimation;
    • a image acquisition where there position of the same ground points are located at very different position in the different images where they are seen, this is to have accurate estimation of distortion; this can be obtained by rotating the camera;
  2. use the calibration obtained on the small set as an initial value for the global orientation.

Multiple lenses with Tapas

External links