Skip to content
This repository has been archived by the owner on Mar 17, 2020. It is now read-only.

Implementation of Preparation

Diogo Cruz edited this page Feb 17, 2019 · 4 revisions

The first program developed is "Preparation". The purpose of this program is to create a database of feature points in order to obtain the homography matrix in a future phase and to create a database of points of interest.

When you start the setup program, you can select the points of interest you want to save on the map. Click on the map and enter in the console the label associated with the point. This tag will also later be associated with existing images of their places of interest. Points are represented on the map as they are added. If saved points already exist, they are loaded and represented on the map as well.

When the user already has all the saved points, this one presses in the ESC. The points will be saved and the stage of calculation and persistence of the feature points will be started.

Among the most recent algorithms, SIFT, KAZE, AKAZE, and BRISK are the ones with the highest accuracy in relation to image rotation when comparing algorithms, and SIFT, AKAZE, and KAZE are the ones that detect the least number of features.[1] So the group opted to try the KAZE algorithm and got good results. KAZE needs a computational power greater than the SURF due to the construction of the non-linear scale space, but it is in the same order of magnitude of the SIFT.

The KAZE algorithm for the detection of feature points calculates the normalized determinant of the Hessian matrix at multiple levels [2], which is considered a detection by Blobs [3].

Regarding the descriptor, the process is similar to SURF. The algorithm finds the dominant orientation in a circular area, creates samples of parts of the area, and, for each of the samples, calculates the first order derivatives. The value of the derivatives, as a function of the Gaussian centered at the point of interest, is represented as points in the vector space and the dominant orientation is obtained through the larger vector.

After the feature points are obtained, they are stored in a respective database and the next phase is started.

Finally, if specified at the beginning of the program, the matrix of intrinsic values of the camera and its distortion parameters are obtained. This calculation is done taking into account a set of images previously obtained from a chessboard in different perspectives, where all the corners of the board of each image are searched, and if this pattern is found in the image, it is added to a list for the calibration. After this is done, the resulting values are stored in a .yaml file in the ./resources/calibrations directory, so that it can be used later. Therefore, this calibration only needs to be performed once, the first time the program is used. The images to be used for this calibration are in the directory: ./resources/chessboard, where files will be searched using the regular expression <label> *, where is any name given to the image. The reprojection error value is calculated in this calibration, which, with the dataset used, represents a value around 0.07, which we consider to be a very positive result and an indicator of the quality of the calibration.

Preparation interface

[1] S. A. K. Tareen e Z. Saleem, «A comparative analysis of SIFT, SURF, KAZE, AKAZE, ORB, and BRISK», em 2018 International Conference on Computing, Mathematics and Engineering Technologies (iCoMET), 2018, pp. 1–10.

[2] P. F. Alcantarilla, A. Bartoli, e A. J. Davison, «KAZE Features», em Computer Vision – ECCV 2012, 2012, pp. 214–227.

[3] «Blob detection», Wikipedia. 13-Out-2018.