1 Features2D + Homography to find a known object {#tutorial_feature_homography}
2 ==============================================
7 In this tutorial you will learn how to:
9 - Use the function @ref cv::findHomography to find the transform between matched keypoints.
10 - Use the function @ref cv::perspectiveTransform to map the points.
12 \warning You need the <a href="https://github.com/opencv/opencv_contrib">OpenCV contrib modules</a> to be able to use the SURF features
13 (alternatives are ORB, KAZE, ... features).
22 This tutorial code's is shown lines below. You can also download it from
23 [here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/features2D/feature_homography/SURF_FLANN_matching_homography_Demo.cpp)
24 @include samples/cpp/tutorial_code/features2D/feature_homography/SURF_FLANN_matching_homography_Demo.cpp
28 This tutorial code's is shown lines below. You can also download it from
29 [here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/features2D/feature_homography/SURFFLANNMatchingHomographyDemo.java)
30 @include samples/java/tutorial_code/features2D/feature_homography/SURFFLANNMatchingHomographyDemo.java
34 This tutorial code's is shown lines below. You can also download it from
35 [here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/features2D/feature_homography/SURF_FLANN_matching_homography_Demo.py)
36 @include samples/python/tutorial_code/features2D/feature_homography/SURF_FLANN_matching_homography_Demo.py
45 - And here is the result for the detected object (highlighted in green). Note that since the homography is estimated with a RANSAC approach,
46 detected false matches will not impact the homography calculation.
48 ![](images/Feature_Homography_Result.jpg)