Changes between Version 26 and Version 27 of Tutorial/GeometricCalibration


Ignore:
Timestamp:
Jan 23, 2015, 5:56:40 PM (10 years ago)
Author:
vaillant1p
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Tutorial/GeometricCalibration

    v26 v27  
    5656
    5757== Calibration with a target grid ==
    58 Most 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).
     58Most 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/Angles/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).
    5959
    60 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).
     60If 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, select the option  '''[!CheckEnableMouse]''' to avoid spurious point creation with the mouse).
    6161
    6262If 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).
     
    6464Once 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.
    6565
     66Durind the calibration, some intrinsic parameters are determined and shown in [Intrinsic Parameters] in '''geometry_calib'''. These are the focal lenghts (in pixels on the captor) '''[fx]''' and '''[fy]''', the coordinates of the principal point center '''[Cx]''' and '''[Cy]''' and the radial distortion coefficient (due to the quadratic calibration) '''[kc]'''.
     67
     68'''Note:''' if the serie is missing some images (ie the increment from one image to another is not steady), '''uvmat''' will not allow you to use the arrow '''[->]''' to move from an image to another if the increment is set. To avoid this delete the number in [increment], you will then be able to go from an image to another.
     69
    6670== '''Merging the images of several cameras:''' ==
    6771== 3D calibration : ==
     72Once the grid image is correctly set, click on the [APPEND LIST] button in [Point Lists]. This will save the grid in 'img~.xml'. This document is saved in the same folder as the image. To open this document select [Import.../Calibration points].
     73
     74Now that the calibration is made for the first image we need to do it for the other ones (you can also open the different 'img.ref~~.xml' to skip the calibration). Once a document is open, the grid is shown in '''uvmat''', to save it in the [Point Lists] click on [APPEND LIST], it will appear below the first saved document.
     75
     76When all the grids are selected in [Point Lists], select [APPLY]. The calibration on every image is now made and the values of the intrinsic parameters are reevaluated according to the different data determined by every calibration. Note that the more images used for the calibration, the more precise the intrinsic parameters will be.
     77
     78For the next calibration, to avoid any change on the intrinsic parameters, select the option '''3D_extrinsic'''. It applies a 3D projection and quadratic correction according to the intrinsic parameters.
     79
     80'''Note:''' These corrections take the hypothesis of ''z=0''. If you want to change and set the correct height of the grid, select '''[!Tools/Translate points] in '''geometry_calib''' and enter the correct value of ''z''.
     81
     82
     83
     84
    6885The 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.
    6986