Changes between Version 41 and Version 42 of Tutorial/GeometricCalibration
- Timestamp:
- Jan 26, 2015, 11:11:52 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Tutorial/GeometricCalibration
v41 v42 31 31 To repeat the calibration for several image series obtained with the same camera at the same position, different methods can be used. 32 32 33 - 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. 33 - 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. 34 34 35 35 - Open with '''uvmat''' one of the image of the series to calibrate, select '''[Tools/geometric calibration]''', and in the GUI '''geometry_calib''', the menu bar '''[!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]] 36 36 37 37 - In case of many image series, use '''[REPLICATE]''' 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'''). 38 39 38 40 39 == Calibration with reference points == … … 55 54 To improve the precision we then apply the option 'linear' in '''calib_type''', which seeks a general linear transform, including rotation. The precision is indeed improved to about 1 pixel. The previous xml file has been saved with a ~, ('Dalsa1.xml~') so it can be reverted in case of error. 56 55 57 == Calibration with a target grid ==56 == 3D calibration with a target grid == 58 57 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/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. 59 58 … … 66 65 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. 67 66 67 This 3D calibration relies on the [https://servforge.legi.grenoble-inp.fr/projects/soft-uvmat/search?q=attachment%3A3D_view.pdf pinhole camera model] (see [https://servforge.legi.grenoble-inp.fr/projects/soft-uvmat/search?q=wiki%3AUvmatHelp%23GeometryCalib UvmatHelp#GeometryCalib] section 8.1). It involves ''intrinsic parameters'' which characterize the optical system (camera and objective lens) and ''extrinsic parameters'' which describe the translation and rotation of the camera with respect to the physical coordinates. detailler sur le GUI. The intrinsic parameters are shown in the frame '''[Intrinsic Parameters] '''in the GUI '''geometry_calib'''. These are the focal lenghts (in pixel size on the sensor) '''[fx]''' and '''[fy]''', the quadratic radial distortion coefficient '''[kc]''' and the coordinates '''[Cx]''' and '''[Cy]''' of the optical centre for this distortion (expressed in pixels on the image). 68 68 69 '''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 == 3D calibration improved by multiple planes: == 70 The calibration of previous section provides 3D information thanks to the inclination of the calibration grid, but the precision is not optimum, and the process would not converge for a grid perpendicular to the line of view. A more precise procedure consists in first determining the intrinsic parameters by mutiple views of the same grid with different inclinations, as shown in the example **. 70 71 71 == 3D calibration with multiple planes: == 72 Open su the grid image is correctly set, click on the '''[APPEND LIST]''' button in '''[Point Lists]'''. This will save the grid as 'img~.xml'. This document is saved in the same folder as the image. To open this document select '''[Import.../Calibration points]'''. 72 73 73 The calibration of previous section provides 3D information thanks to the inclination of the calibration grid, but the precision is not optimum, and the process would not converge for a grid perpendicular to the line of view. A more precise procedure consists in first determining the intrinsic parameters by mutiple views of the same grid with different inclinations, as shown in the example **. 74 75 with a 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. 76 The 3D options involve a full 3D calibration relying on the [attachment:3D_view.pdf pinhole camera model] (see [wiki:UvmatHelp#GeometryCalib] section 8.1). 77 78 Once the grid image is correctly set, click on the '''[APPEND LIST]''' button in '''[Point Lists]'''. This will save the grid as 'img~.xml'. This document is saved in the same folder as the image. To open this document select '''[Import.../Calibration points]'''. 79 80 Durind 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]'''. 74 Durind the calibration, some intrinsic parameters are determined 81 75 82 76 Now that the calibration is made for the first image we need to do it for the other ones (you can also open the different grids '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. … … 86 80 For 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. 87 81 82 '''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. 83 88 84 '''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''. 89 85 90 91 86 == '''Merging the images of several cameras:''' == 92 93 94 87 z position}} 95 88