![]() |
OpenCV
3.4.0
Open Source Computer Vision
|
In this tutorial we will learn how to use AKAZE [4] local features to detect and match keypoints on two images. We will find keypoints on a pair of images with given homography matrix, match them and count the
number of inliers (i. e. matches that fit in the given homography).
You can find expanded version of this example here: https://github.com/pablofdezalc/test_kaze_akaze_opencv
We are going to use images 1 and 3 from Graffity sequence of Oxford dataset.
Homography is given by a 3 by 3 matrix:
You can find the images (graf1.png, graf3.png) and homography (H1to3p.xml) in opencv/samples/cpp.
Check if our matches fit in the homography model
If the distance from first keypoint's projection to the second keypoint is less than threshold, then it it fits in the homography.
We create a new set of matches for the inliers, because it is required by the drawing function.