Add next and previous navigation links to all tutorials
[platform/upstream/opencv.git] / doc / tutorials / features2d / feature_description / feature_description.markdown
1 Feature Description {#tutorial_feature_description}
2 ===================
3
4 @prev_tutorial{tutorial_feature_detection}
5 @next_tutorial{tutorial_feature_flann_matcher}
6
7 Goal
8 ----
9
10 In this tutorial you will learn how to:
11
12 -   Use the @ref cv::DescriptorExtractor interface in order to find the feature vector correspondent
13     to the keypoints. Specifically:
14     -   Use cv::xfeatures2d::SURF and its function cv::xfeatures2d::SURF::compute to perform the
15         required calculations.
16     -   Use a @ref cv::DescriptorMatcher to match the features vector
17     -   Use the function @ref cv::drawMatches to draw the detected matches.
18
19 \warning You need the <a href="https://github.com/opencv/opencv_contrib">OpenCV contrib modules</a> to be able to use the SURF features
20 (alternatives are ORB, KAZE, ... features).
21
22 Theory
23 ------
24
25 Code
26 ----
27
28 @add_toggle_cpp
29 This tutorial code's is shown lines below. You can also download it from
30 [here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/features2D/feature_description/SURF_matching_Demo.cpp)
31 @include samples/cpp/tutorial_code/features2D/feature_description/SURF_matching_Demo.cpp
32 @end_toggle
33
34 @add_toggle_java
35 This tutorial code's is shown lines below. You can also download it from
36 [here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/features2D/feature_description/SURFMatchingDemo.java)
37 @include samples/java/tutorial_code/features2D/feature_description/SURFMatchingDemo.java
38 @end_toggle
39
40 @add_toggle_python
41 This tutorial code's is shown lines below. You can also download it from
42 [here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/features2D/feature_description/SURF_matching_Demo.py)
43 @include samples/python/tutorial_code/features2D/feature_description/SURF_matching_Demo.py
44 @end_toggle
45
46 Explanation
47 -----------
48
49 Result
50 ------
51
52 Here is the result after applying the BruteForce matcher between the two original images:
53
54 ![](images/Feature_Description_BruteForce_Result.jpg)