Add next and previous navigation links to all tutorials
[platform/upstream/opencv.git] / doc / tutorials / features2d / feature_detection / feature_detection.markdown
1 Feature Detection {#tutorial_feature_detection}
2 =================
3
4 @prev_tutorial{tutorial_corner_subpixels}
5 @next_tutorial{tutorial_feature_description}
6
7 Goal
8 ----
9
10 In this tutorial you will learn how to:
11
12 -   Use the @ref cv::FeatureDetector interface in order to find interest points. Specifically:
13     -   Use the cv::xfeatures2d::SURF and its function cv::xfeatures2d::SURF::detect to perform the
14         detection process
15     -   Use the function @ref cv::drawKeypoints to draw the detected keypoints
16
17 \warning You need the <a href="https://github.com/opencv/opencv_contrib">OpenCV contrib modules</a> to be able to use the SURF features
18 (alternatives are ORB, KAZE, ... features).
19
20 Theory
21 ------
22
23 Code
24 ----
25
26 @add_toggle_cpp
27 This tutorial code's is shown lines below. You can also download it from
28 [here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/features2D/feature_detection/SURF_detection_Demo.cpp)
29 @include samples/cpp/tutorial_code/features2D/feature_detection/SURF_detection_Demo.cpp
30 @end_toggle
31
32 @add_toggle_java
33 This tutorial code's is shown lines below. You can also download it from
34 [here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/features2D/feature_detection/SURFDetectionDemo.java)
35 @include samples/java/tutorial_code/features2D/feature_detection/SURFDetectionDemo.java
36 @end_toggle
37
38 @add_toggle_python
39 This tutorial code's is shown lines below. You can also download it from
40 [here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/features2D/feature_detection/SURF_detection_Demo.py)
41 @include samples/python/tutorial_code/features2D/feature_detection/SURF_detection_Demo.py
42 @end_toggle
43
44 Explanation
45 -----------
46
47 Result
48 ------
49
50 -#  Here is the result of the feature detection applied to the `box.png` image:
51
52     ![](images/Feature_Detection_Result_a.jpg)
53
54 -#  And here is the result for the `box_in_scene.png` image:
55
56     ![](images/Feature_Detection_Result_b.jpg)