Changes between Version 13 and Version 14 of Tutorial/GeometricCalibration


Ignore:
Timestamp:
Apr 14, 2014, 2:52:20 PM (10 years ago)
Author:
sommeria
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Tutorial/GeometricCalibration

    v13 v14  
    1515To see the calibration points on the image, first display the whole image by unselecting '''fix''' (tag '''[!CheckFixLimits]''') in the frame '''Coordinates''' of uvmat. Then press '''PLOT PTS''' in '''geometry_calib'''.
    1616
    17 To perform the calibration, press '''APPLY''', first with the default option 'rescale' in '''calib_type'''.  The image is now displayed in phys coordinates. A xml file 'images.xml', containing the calibration parameters and reference point coordinates, has been created in the folder 'UVMAT_DEMO01_pair' (it should be identical with the file 'images.ref.xml' put for reference). [[BR]]Note that the xml file name reproduces the name of the folder containing the images, so that images from different cameras should not be put in the same folder.
    18 
    19 To apply the same calibration to a set of image folders, use the press button '''REPLICATE''' instead of '''APPLY'''.
     17To perform the calibration, press '''APPLY''', first with the default option 'rescale' in '''calib_type'''.  The image is now displayed in phys coordinates. A xml file 'images.xml', containing the calibration parameters and reference point coordinates, has been created in the folder 'UVMAT_DEMO01_pair' (it should be identical with the file 'images.ref.xml' put for reference). [[BR]]Note that the xml file name reproduces the name of the folder containing the images, so that images from different cameras should not be
    2018
    2119== Translating the coordinates ==
    22 The origin of the phys coordiantes is now arbitrary. It is more convenient to have it for instance at the centre of the cylinder, now at (x,y)=(1.69, 4.05).
     20The origin of the phys coordinates is now arbitrary. It is more convenient to have it for instance at the centre of the cylinder, now at (x,y)=(1.69, 4.05).
    2321
    2422To get the precise position of the cylindre, it is useful to introduce a projection circle, using in '''uvmat''' the menu bar command Projection '''object/ellipse'''. In '''set_object''', select '''!ProjMode=''''none', so that the line is just used as a marker, without projection operation. Set XMax=1, YMax=1, the radius of the circle, and the coordinates (1.69, 4.05) of the centre in the table '''Coord'''. Then press '''REFRESH'''. To optimise the visualisation, zoom in and increase the image contrast to MaxA=100.
    2523
    2624To shift the coordinates, activate in geometry_calib the menu bar command '''!Tools/Translate points''', and fills  (x=-1.69, y=-4.05) in the edit box which pops up. the phys coordinates of the calibration points are then shifted, and a new calibration put the cylindre centre at the origin (0,0).
     25
     26put in the same folder.
     27
     28== '''Repeating the calibration''' ==
     29To repeat the calibration for several image series obtained with the same camera at the same position, different methods can be used.
     30
     31-Copy the xml to the appropriate location, with the same name (but extension .xml) and path as the flle containing the image series. This is however not appropriate in general as the xml file contains other information, in particular about image timing. 
     32
     33-Open with '''uvmat''' one of the image of the series to calibrate, select '''Tools/geometric calibration''', and in the GUI '''geometry_calib''', the menu ba'''r Import/All''', then press''' APPLY'''. For further repetitions, the GUI '''geometry_calib''' can be left opened while new image series are opened, and '''APPLY''' repeated each time without importing the calibration data again. [[BR]]
     34
     35-In case of many image series, use '''RELICATE''' instead of '''APPLY''' in the GUI '''geometry_calib. '''Then select the 'campaign' to calibrate, i.e. the folder containing the series of experiments. Then in the new GUI '''browse_data''', select the set of experiments and the corresponding set of data series to which the calibration must apply (this is used like '''Open campaign''' in '''uvmat''').
     36
    2737
    2838== Calibration with reference points ==
     
    4656Most precise and general calibration relies on the use of a target grid. As an example, open in uvmat the image ima_6 in 'UVMAT_DEMO07_GeometryCalibration/Dalsa1' (accessible on http://servforge.legi.grenoble-inp.fr/pub/soft-uvmat/). Open the menu bar '''Tools/geometric calibration '''and''' '''pick four corner points ABCD with the mouse define the periphery of the phys grid selected for calibration. The first point A will define the phys axis origin while AB defines the x axis and AD the y axis. AB and DC should be parallel on the phys grid (see fig). Then select''' Tools/Detect grid '''on the upper menu bar of''' geometry_calib: '''you get a new GUI '''detect_grid''' in which you define (in phys units) the grid mesh and the positions of the  first and last points on each axis. A z position can be defiend as well, do not fill it in this example. The option white markers is selected (by default) indicating that the grid is white (the opposite option would be needed for a grid made of black crosses on a white background). After validation by '''OK''', the detected grid appears on uvmat (see fig).
    4757
    48 If a  point is not correct, select the option '''[!CheckEnableMouse]''' in '''geometry_calib'''. Then you can adjust the point marker by selecting it with the (left button) mouse and moving it while keeping the mouse pressed (when adjustement is finished, nselected the option  '''[!CheckEnableMouse]''' to avoid spurious point creation with the mouse).
     58If a  point is not correct, select the option '''[!CheckEnableMouse]''' in '''geometry_calib'''. Then you can adjust the point marker by selecting it with the (left button) mouse and moving it while keeping the mouse pressed (when adjustement is finished, nselected the option  '''[!CheckEnableMouse]''' to avoid spurious point creation with the mouse).
    4959
    5060If the grid image is of poor quality, it is alternatively possble to mark all the points by the mouse, using the '''Tools/Create''' grid instead of '''Tools/Detect grid''' in geometry_calib (not convenient in general).
    5161
    52 Once the grid has been marked, the calibration can be performed by the press button '''APPLY'''. We observe that the simple option 'rescale' is not appropriate in this case: a perspective effect is clearly visible, together with a non-linear deformation (grid lines are curved on the image). Therefore select the option '3D_quadr' which applies a 3D projection and quadratic correction. The grid image now appears of good quality in phys coordinates. 
     62Once the grid has been marked, the calibration can be performed by the press button '''APPLY'''. We observe that the simple option 'rescale' is not appropriate in this case: a perspective effect is clearly visible, together with a non-linear deformation (grid lines are curved on the image). Therefore select the option '3D_quadr' which applies a 3D projection and quadratic correction. The grid image now appears of good quality in phys coordinates. 
    5363
    54 == 3D calibration :  ==
    55 The previous calibration corrects for 3D projection effects and gives some 3D indication. This is however made more precise by introducing different views of the same grid with different orientations, like shown in mages 1 to 5. 
     64== '''Merging the images of several cameras:''' ==
     65== 3D calibration : ==
     66The previous calibration corrects for 3D projection effects and gives some 3D indication. This is however made more precise by introducing different views of the same grid with different orientations, like shown in mages 1 to 5.
    5667
    57 z position 
     68z position
    5869
    59 '''Merging the images of several cameras:'''
    60 
    61 '''Setting laser slices: '''
     70== '''Setting laser slices: ''' ==