Changes between Version 82 and Version 83 of UvmatHelp


Ignore:
Timestamp:
Jul 5, 2013, 7:46:32 AM (11 years ago)
Author:
sommeria
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UvmatHelp

    v82 v83  
    184184 * '''.fig''' Matlab figures represent plots but also Graphic User Interfaces (GUI). In that case Matlab functions (callbacks) are attached to the graphic objects in the figure and can be activated by the mouse. Matlab figures can be directly opened by the browser of '''uvmat.fig'''.
    185185
    186  * ''''.civ' ''' (obsolete)  ascii text file containing the list of image times and the scaling in pixels/cm. This is an obsolete version of the xml image documentation file. It is stored in the same directory as the corresponding series of images, with name ''root .civ''. It is automatically sought by '''uvmat.fig''' and '''series.fig''', in the absence of an xml file !ImaDoc. (it is read by the function ''read_imatext.m''). The following example is from an experience with 19 bursts of 4 images, named aa001a,aa001b,aa001c,aa001d,aa002a,aa002b,...,aa019c,aa019d, with an extension .png. The corresponding .civ file is named aa.civ. Comments (not included in the file) are indicated with %...
     186 * ''''.civ' ''' (obsolete)  ascii text file containing the list of image times and the scaling in pixels/cm. This is an obsolete version of the xml image documentation file. It is stored in the same directory as the corresponding series of images, with name ''root .civ''. It is automatically sought by '''uvmat.fig''' and '''series.fig''', in the absence of an xml file <!ImaDoc>. (it is read by the function ''read_imatext.m''). The following example is from an experience with 19 bursts of 4 images, named aa001a,aa001b,aa001c,aa001d,aa002a,aa002b,...,aa019c,aa019d, with an extension .png. The corresponding .civ file is named aa.civ. Comments (not included in the file) are indicated with %...
    187187
    188188{{{
     
    555555Transforming image to physical coordinates is a prerequisit for measuring techniques based on imaging. 
    556556
    557 The ''image coordinates'', expressed in pixels, represent the two cartesian axis X,Y of the image, with origin taken at the lower left corner. The coordinate of the first lower left pixel centre is therefore (1/2,1/2). Note that the Y axis is directed upward, while the corresponding image index j increases downward. Therefore, denoting ''npy'' the number of pixels along ''Y'', the (''X,Y'') coordinates of a pixel indexed (''i,j'') are ''X''=''i''-1/2, ''Y''=''npy''-''j''+1/2.
     557The ''image coordinates'', expressed in pixels, represent the two cartesian axis ''X,Y'' of the image, with origin taken at the lower left corner. The coordinate of the first lower left pixel centre is therefore (1/2,1/2). Note that the ''Y'' axis is directed upward, while the corresponding image index j increases downward. Therefore, denoting ''npy'' the number of pixels along ''Y'', the (''X,Y'') coordinates of a pixel indexed (''i,j'') are ''X''=''i''-1/2, ''Y''=''npy''-''j''+1/2.
    558558
    559559The ''physical coordinates'' are defined from the experimental set-up. The correspondance with images is obtained by identifying a set of calibration points whose positions are known in the physical coordinate system. A cartesian calibration grid covering the whole image is the best option, but any set of calibration points can be used. We handle three kinds of transforms:
    560560
    561 -'''rescale''': linear rescaling along x and y + translation (no rotation nor deformation)
    562 
    563 -'''linear''': general linear transform, including translation and rotation (but no perspective effects)
     561-'''rescale''': linear rescaling along ''x'' and ''y'' + translation (no rotation nor deformation)
     562
     563-'''linear''': general linear transform, including translation and rotation (but no projection effects)
    564564
    565565-'''3D projection:''' this transforms handles projection effects, as needed for stereoscopic view, as well as quadratic distortion, according to the pinhole camera  model ( R.Y. Tsai, 'An Efficient and Accurate Camera Calibration Technique for 3D Machine Vision'. Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, Miami Beach, FL, pp. 364-374, 1986). We use a more recent version, with the toolbox [->http://www.vision.caltech.edu/bouguetj/calib_doc/] . To use this option, the number of calibration points should be large enough and well spread over the whole image.
    566566
    567 To deduce the 3D physical coordinates from the 2D image coordinates, the z position, or more generally a plane of cut, defined generally by a laser sheet, must be given as part of the calibration parameters. It is possible to introduce a set of planes obtained by volume scanning.
    568 
    569 The transform coefficients for each image series are stored under the tag <!GeometryCalib> in the corresponding xml documentation file <!ImaDoc>, see [#a3.5Imagedocumentationfiles.xml section 3.5].  Calibration coefficients  can be obtained and dispalyed with the GUI '''geometry_calib.fig'''.
     567To deduce the 3D physical coordinates from the 2D image coordinates, the ''z'' position, or a plane of cut, defined generally by a laser sheet, must be given as part of the calibration parameters. In uvmat, it is possible to introduce a set of planes obtained by volume scanning.
     568
     569The transform coefficients for each image series are stored under the tag <!GeometryCalib> in the corresponding xml documentation file <!ImaDoc>, described in [#a3.5Imagedocumentationfiles.xml section 3.5].  Calibration coefficients  can be obtained and displayed with the GUI '''geometry_calib.fig'''.
    570570
    571571
    572572=== 8.2 The GUI geometry_calib.fig ===
    573 -''' Opening the GUI: ''' it is made visible  from the GUI '''uvmat.fig''' by  the menu bar command '''[!Tools/Geometric calibration] '''.  If calibration data already exist in the current file !ImaDoc, the corresponding parameters and the list of reference points are displayed. The three first columns indicate the physical coordinates and the two last ones the corresponding image coordinates. Calibration points can be alternatively introduced by opening any ImaDoc xml file with the menu bar command''' [Open] ''' of '''geometry_calib.fig'''.
    574 
    575 -''' Plotting calibration points: ''' press the button '''[Plot] ''' to visualise the list of calibration points. The physical or image coordinates will be used in the list '''[!ListCoord]''', depending on the option 'phys' or 'px' in the menu '''[transform_fct]''' of ''' uvmat.fig''' .
     573-''' Opening the GUI: ''' it is made visible  from the GUI '''uvmat.fig''' by  the menu bar command '''[!Tools/Geometric calibration] '''.  If calibration data already exist in the current file <!ImaDoc>, the corresponding parameters and the list of reference points are displayed. The three first columns indicate the physical coordinates and the two last ones the corresponding image coordinates. Calibration points can be alternatively introduced by opening any  xml file <!ImaDoc> with the menu bar command''' [Open] ''' of '''geometry_calib.fig'''.
     574
     575-''' Plotting calibration points: ''' press the button '''[Plot] ''' to visualise the current list of calibration points. The physical or image coordinates will be used in the list '''[!ListCoord]''', depending on the option blank or 'phys' in the menu '''[transform_fct]''' of ''' uvmat.fig''' .
    576576
    577577-''' Appending  calibration points with the mouse: ''' Calibration points can be manually picked out by the mouse (left button click) after a calibration image has been opened by '''uvmat.fig''' (with the option 'blank' in the popup menu '''[transform_fct]'''), and the option '''[mouse_active]''' (at the very bottom) has been selected. Zoom can be used to improve the precision, but must be desactivated for mouse selection (then move across the image by the key board directional arrows). The coordinates in pixel of the selected points get listed in the box '''[!ListCoord]''' of '''geometry_calib.fig'''. A calibration point can be later adjusted by selecting it with the mouse and moving it while pressing the left mouse button. Points can be accumulated from several images (use the key board short cuts 'p' and 'm' to move in the image series without monopolising the mouse).'''''''
     
    591591-''' Recording calibration parameters: '''
    592592
    593 Once the list of calibration points has been completed, press '''[APPLY]''', after selecting the appropriate option in '''[calib_type]'''. (see the previous sub-section 7.1). Note that the more advanced Tsai options  require a sufficient number of calibration points (typically > 10) spread over the image. Calibration coefficients are recorded in the xml file <code><ImaDoc> </code> associated with the image currently opened by uvmat. If previous calibration data already exist, the previous xml file is updated, but  the original one is preserved with the extension .xml~.  If no xml file already exists, it is created. The image transformation to phys coordinates can be directly seen on the '''uvmat.fig''' interface after completion of the command '''[APPLY]'''.
     593Once the list of calibration points has been completed, press '''[APPLY]''', after selecting the appropriate option in '''[calib_type]'''. (see the previous sub-section 7.1). Note that the more advanced Tsai options  require a sufficient number of calibration points (typically > 10) spread over the image. Calibration coefficients are recorded in the xml file <!ImaDoc> associated with the image currently opened by uvmat. If previous calibration data already exist, the previous xml file is updated, but  the original one is preserved with the extension .xml~.  If no xml file already exists, it is created. The image transformation to phys coordinates can be directly seen on the '''uvmat.fig''' interface after completion of the command '''[APPLY]'''.
    594594
    595595To reproduce the same calibrationn for image series, open one of the image in the series, and apply again the calibration with the same points, or copy-paste the section GeometryCalib of the xml documentation file with a text editor.
     
    598598
    599599=== 8.3 Structure of the xml file ===
    600 The coefficients are recorded in the xml element <code><ImaDoc/GeometryCalib></code> as follows:
     600The coefficients are recorded in the xml element <!ImaDoc/GeometryCalib> as follows:
    601601
    602602 * <!CalibrationType>: type of calibration ('rescale', 'linear', '3D...')
     
    719719
    720720 * '''PIV''': makes image comparisons on sliding index pairs, as usual for measuring velocities by particle displacements. A second menu '''[ListPairMode]''' in the panel '''[PairIndices]''' then selects one among three possibilities (not always available depending on the file indexing):
    721    * ''pair j1-j2:'' selects a given j index pair (sometimes denoted by letter index) for the whole time series. This is the most common case for PIV. Pair selection is performed in the menu '''[ListPairCiv1]''' and '''[ListPairCiv2]''' for the second iteration Civ2, see below. If timing from an xml file [#a3.5Imagedocumentationfiles.xml ImaDoc] has been detected, this is indicated in the edit box '''[ImaDoc]''' and the corresponding time intervals are indicated (in ms). For some applications, this time interval may evolve in time, so that reference indices ref_i and ref_j are chosen for the display.
     721   * ''pair j1-j2:'' selects a given j index pair (sometimes denoted by letter index) for the whole time series. This is the most common case for PIV. Pair selection is performed in the menu '''[ListPairCiv1]''' and '''[ListPairCiv2]''' for the second iteration Civ2, see below. If timing from an xml file [#a3.5Imagedocumentationfiles.xml <!ImaDoc>] has been detected, this is indicated in the edit box '''[ImaDoc]''' and the corresponding time intervals are indicated (in ms). For some applications, this time interval may evolve in time, so that reference indices ref_i and ref_j are chosen for the display.
    722722   * series (Di): selects a given  index interval for the i index, around a set of reference i indices. The intervals are denoted Di=0|1, -1|1, -1|2, -2|2 ... , corresponding to the index pairs i|i+1, i-1|i+1, i-1|i+2, i-2|i+2 ...around each reference index i. Pair selection is then performed in the menu '''[ListPairCiv1]''' and '''[ListPairCiv2]''' like for 'pair j1-j2'.
    723723   * series (Dj): same as series (Di) but with the j index.
     
    928928  This GUI '''editxml.fig''' visualises and edits xml files. It is automatically called by the browser of '''uvmat.fig''' when a file with extension .xml is opened.
    929929
    930   When an input file is opened, editxml detects the title key, e.g. <ImaDoc>, and looks for the corresponding xml schema (e.g. {ImaDoc.xsd} ). This schema is sought  in the directory defined by <SchemaPath> in the installation file {PARAM.xml} of uvmat. If the schema is found, the hierarchical structure and keys given by the schema are diplayed.  Otherwise the  keys of the xml file are displayed.
     930  When an input file is opened, editxml detects the title key, e.g. <!ImaDoc>, and looks for the corresponding xml schema (e.g. {ImaDoc.xsd} ). This schema is sought  in the directory defined by <SchemaPath> in the installation file {PARAM.xml} of uvmat. If the schema is found, the hierarchical structure and keys given by the schema are diplayed.  Otherwise the  keys of the xml file are displayed.
    931931
    932932  Simple elements in the xml file  are listed in the forme 'key'='value', and the corresponding attributes are shown in green. Comments from the schema are dispalyed in blue. Complex elements are indicated by '+'. Selecting them on the list gives access to the lower hierarchical level.  Press the  arrow '''[<---]''' to move back upward in the hierarchy.
     
    971971 * 'cell2tab';... % transform a Matlab cell in a character array suitable for display in a table
    972972 * 'fill_GUI';... % fill a GUI with handles 'handles' from input data Param
    973  * 'imadoc2struct';...% convert the image documentation file !ImaDoc into a Matlab structure
     973 * 'imadoc2struct';...% convert the image documentation file <!ImaDoc> into a Matlab structure
    974974 * 'nomtype2pair';... creates nomenclature for index pairs knowing the image nomenclature, used by series fct
    975975 * 'nc2struct';...% transform a netcdf file in a corresponding matlab structure
     
    10001000 * find_field_cells': test field structure for input in proj_field and plot_field, group the variables  into 'fields' with common dimensions
    10011001 * 'find_file_series';...%check the content of an input file and find the corresponding file series
    1002  * 'find_imadoc';...% find the !ImaDoc xml file associated with a given input file
     1002 * 'find_imadoc';...% find the <!ImaDoc> xml file associated with a given input file
    10031003 * 'fullfile_uvmat';...%creates a file name from a root name and indices.
    10041004 * 'get_file_series';...% determine the list of file names and file indices for functions called by 'series'.
     
    10061006 * 'griddata_uvmat';...%make 2D linear interpolation using griddata, with input appropriate for both Matlab 6.5 and 7
    10071007 * 'hist_update';...%  update of a current global histogram by inclusion of a new field
    1008  * 'imadoc2struct';...%convert the image documentation file [wiki:ImaDoc !ImaDoc] into a Matlab structure
     1008 * 'imadoc2struct';...%convert the image documentation file <!ImaDoc> into a Matlab structure
    10091009 * 'interp2_uvmat';...% linearly interpolate an image or scalar defined on a regular grid
    10101010 * '!ListDir';... scan the structure of the directory tree (for dataview.m)
     
    10261026 * 'tps_eval_dxy';...% calculate the derivatives of thin plate spline (tps) interpolation at a set of points (limited to the 2D case)
    10271027 * 'uigetfile_uvmat';... browser, and display of directories, faster than the Matlab fct uigetfile
    1028  * 'update_imadoc';...  %update the !ImaDoc xml file
     1028 * 'update_imadoc';...  %update the xml file <!ImaDoc>.
    10291029 * 'update_waitbar';... update the waitbar display, used for ACTION functions in the GUI 'series'
    10301030