514fd332c07d799b0df9e93e3f5c402199e78b2c
[platform/upstream/opencv.git] / doc / tutorials / features2d / trackingmotion / corner_subpixels / corner_subpixels.markdown
1 Detecting corners location in subpixels {#tutorial_corner_subpixels}
2 =======================================
3
4 Goal
5 ----
6
7 In this tutorial you will learn how to:
8
9 -   Use the OpenCV function @ref cv::cornerSubPix to find more exact corner positions (more exact
10     than integer pixels).
11
12 Theory
13 ------
14
15 Code
16 ----
17
18 @add_toggle_cpp
19 This tutorial code's is shown lines below. You can also download it from
20 [here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/TrackingMotion/cornerSubPix_Demo.cpp)
21 @include samples/cpp/tutorial_code/TrackingMotion/cornerSubPix_Demo.cpp
22 @end_toggle
23
24 @add_toggle_java
25 This tutorial code's is shown lines below. You can also download it from
26 [here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/TrackingMotion/corner_subpixels/CornerSubPixDemo.java)
27 @include samples/java/tutorial_code/TrackingMotion/corner_subpixels/CornerSubPixDemo.java
28 @end_toggle
29
30 @add_toggle_python
31 This tutorial code's is shown lines below. You can also download it from
32 [here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/TrackingMotion/corner_subpixels/cornerSubPix_Demo.py)
33 @include samples/python/tutorial_code/TrackingMotion/corner_subpixels/cornerSubPix_Demo.py
34 @end_toggle
35
36 Explanation
37 -----------
38
39 Result
40 ------
41
42 ![](images/Corner_Subpixels_Original_Image.jpg)
43
44 Here is the result:
45
46 ![](images/Corner_Subpixels_Result.jpg)