SBGlobBascule

De MicMac
Aller à : navigation, rechercher

Picto-liste.png List of commands

Description

SBGlobBascule is a tool for ”scene based global” bascule, it is used when no absolute information is available but the user still wishes to give some physical meaning to the orientation.

  • SBGlobBascule use a selected number of images, on which the user has created mask, these mask must define part of the image belonging to the plane.
  • SBGlobBascule select the tie points belonging to the mask, and compute by least square fitting an estimation of this plane.
  • finally bascule SBGlobBascule compute the rotation that transform current coordinates in a new system where the fitted plane correspond to the plane Z = 0.
  • SBGlobBascule fix also the orientation inside the plane.
  • optionally SBGlobBascule can fix the the global scale.

Syntax

The syntax is

mm3d SBGlobBascule FullName OrientationIn Images_measures_xml_file OrientationOut NamedArgs 

Help

You can access to the help by typing : mm3d SBGlobBascule -help

Mandatory unnamed args :
  * string :: {Full name (Dir+Pat)}
  * string :: {Orientation in}
  * string :: {Images measures xml file}
  * string :: {Out : orientation }
Named args :
  * [Name=ExpTxt] bool
  * [Name=PostPlan] string :: {Set NONE if no plane}
  * [Name=DistFS] REAL :: {Distance between Ech1 and Ech2 to fix scale (if not given no scaling)}
  * [Name=Rep] string :: {Target coordinate system (Def = ki, ie normal is vertical)}
  * [Name=CPI] bool :: {Calibration Per Image (Def=false)}

Study case: scaling a model with only a scale information

In the case where you would like to scale a model having only a scale information (like a scale bar for example), you can use SBGlobBascule to generate a new orientation folder with a scale factor applied to the input orientation.

First, you have to generate a xml file containing the position of the points Ech1 and Ech2 (using SaisieBasc for instance), and then call SBGlobBascule by setting optional arguments PostPlan=NONE and DistFS to the distance between Ech1 and Ech2.

The use of PostPlan=NONE will prevent you from entering a mask defining a plan.


Example

With the dataset of street Saint Martin, an example of use is :

mm3d SBGlobBascule "IMGP41((6[7-9])|([7-8][0-9])).JPG" Mur MesureBasc.xml LocBasc PostPlan=_MasqPlan DistFS=1.2

The meaning of the arguments are:

  • First arg is the pattern defining the image we want to use;
  • Second arg (Mur) defines the input orientation;
  • Third arg (MesureBasc.xml) is a file that contains image measurement for defining orientation;
  • Fourth arg (Basc) defines the output orientation;
  • Optional arg PostPlan= MasqPlan means that if image is IMGP4171.JPG (or IMGP4171.CR2 or...), then the associated mask IMGP4171 MasqPlan.tif
  • If there are several masks it will use all them for fitting the plane (which can be useful with wide dataset when high accuracy is required); of course if there are no existing mask an error will occur;
  • Optional arg DistFS=0.6 is used to fix the scale;

Open the file MesureBasc.xml, you will see that it contains measurement of points in image. Although the syntax should be quite obvious, it is described in section 6.4.4.1. To create a file like MesureBasc.xml user can of course do it with a text editor, alternatively he can, on Linux, use the interactive tool SaisieBasc described in 8.4.4. Once created, the following information will be looked for by SBGlobBascule in this file :

  • Measurement of points named Line1 and Line2; they will fix orientation in the plane by imposing that line Line1-Line2 is parallel to Ox;
  • These points need only to be measured in one image, as they are assumed to be in the plane computed on the mask; is they have been measured several time, a warning will occur;
  • Optional a point Origine to fix the origin of the repair;
  • Optionally two point Ech1 and Ech2 to fix the scale, each point must be entered in at least two images, so that a 3d position can be computed; when DistFS is entered, new coordinate system is computed with the constraint that the distant between the 3d position of Ech1 and Ech2 is equal to DistFS; if DistFS is entered and Ech1 and Ech2 do not exist in at least two images, an error occurs;