aded0d1c98cb3bec48d3ad14e41733335b2ef71b
[platform/upstream/opencv.git] / doc / tutorials / features2d / trackingmotion / generic_corner_detector / generic_corner_detector.markdown
1 Creating your own corner detector {#tutorial_generic_corner_detector}
2 =================================
3
4 Goal
5 ----
6
7 In this tutorial you will learn how to:
8
9 -   Use the OpenCV function @ref cv::cornerEigenValsAndVecs to find the eigenvalues and eigenvectors
10     to determine if a pixel is a corner.
11 -   Use the OpenCV function @ref cv::cornerMinEigenVal to find the minimum eigenvalues for corner
12     detection.
13 -   Implement our own version of the Harris detector as well as the Shi-Tomasi detector, by using
14     the two functions above.
15
16 Theory
17 ------
18
19 Code
20 ----
21
22 @add_toggle_cpp
23 This tutorial code's is shown lines below. You can also download it from
24 [here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/TrackingMotion/cornerDetector_Demo.cpp)
25
26 @include samples/cpp/tutorial_code/TrackingMotion/cornerDetector_Demo.cpp
27 @end_toggle
28
29 @add_toggle_java
30 This tutorial code's is shown lines below. You can also download it from
31 [here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/TrackingMotion/generic_corner_detector/CornerDetectorDemo.java)
32
33 @include samples/java/tutorial_code/TrackingMotion/generic_corner_detector/CornerDetectorDemo.java
34 @end_toggle
35
36 @add_toggle_python
37 This tutorial code's is shown lines below. You can also download it from
38 [here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/TrackingMotion/generic_corner_detector/cornerDetector_Demo.py)
39
40 @include samples/python/tutorial_code/TrackingMotion/generic_corner_detector/cornerDetector_Demo.py
41 @end_toggle
42
43 Explanation
44 -----------
45
46 Result
47 ------
48
49 ![](images/My_Harris_corner_detector_Result.jpg)
50
51 ![](images/My_Shi_Tomasi_corner_detector_Result.jpg)