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