Robust Local Optical Flow Libary Documentation  V 1.2
 All Classes Files Functions Variables Enumerations Enumerator Macros Pages
IFeatureTracker.h
Go to the documentation of this file.
1 /******************************************************************************
2  * COPYRIGHT: *
3  * *
4  * This file is the property of the author and Communication Systems Group, *
5  * Technische Universität Berlin. All rights reserved. *
6  * *
7  * It may not be publicly disclosed, distributed, used, copied or modified *
8  * without prior written authorization by a representative of *
9  * Communication Systems Group, Technische Universität Berlin or the author. *
10  * Any modified version of this document needs to contain this header. *
11  ******************************************************************************/
12 
13 /******************************************************************************
14  * THERMS IF USAGE: *
15  * PERSONAL, NON-COMMERCIAL or ACADEMIC USAGE: *
16  * You are free to use this software for whatever you like. If you use this *
17  * algorithm for a scientific publication, please cite the one of the *
18  * following paper: *
19  * *
20  * @INPROCEEDINGS{ICIPSenst2014, *
21  * AUTHOR = {Tobias Senst and Thilo Borgmann and Ivo Keller and Thomas *
22  * Sikora}, *
23  * TITLE = {Cross based Robust Local Optical Flow}, *
24  * BOOKTITLE = {21th IEEE International Conference on Image Processing}, *
25  * YEAR = {2014}, *
26  * MONTH = okt, *
27  * PAGES = {1967--1971}, *
28  * ADDRESS = {Paris, France}, *
29  * } *
30  * *
31  * @INPROCEEDINGS{ICIPSenst2013, *
32  * AUTHOR = {Tobias Senst and Jonas Geistert and Ivo Keller and Thomas *
33  * Sikora}, *
34  * TITLE = {Robust Local Optical Flow Estimation using Bilinear Equations for *
35  * Sparse Motion Estimation}, *
36  * BOOKTITLE = {20th IEEE International Conference on Image Processing}, *
37  * YEAR = {2013}, *
38  * MONTH = sep, *
39  * PAGES = {2499--2503}, *
40  * ADDRESS = {Melbourne, Australia}, *
41  * DOI = {10.1109/ICIP.2013.6738515}, *
42  * } *
43  * *
44  * @ARTICLE{TCSVTSenst2012, *
45  * AUTHOR = {Tobias Senst and Volker Eiselein and Thomas Sikora}, *
46  * TITLE = {Robust Local Optical Flow for Feature Tracking}, *
47  * JOURNAL = {IEEE Transactions on Circuits and Systems for Video Technology},*
48  * YEAR = {2012}, *
49  * MONTH = sep, *
50  * PAGES = {1377--1387}, *
51  * VOLUME = {22}, *
52  * NUMBER = {9}, *
53  * DOI = {10.1109/TCSVT.2012.2202070} *
54  * } *
55  * *
56  * @INPROCEEDINGS{WACVSenst2011, *
57  * AUTHOR = {Tobias Senst and Volker Eiselein and Rubén Heras Evangelio and *
58  * Thomas Sikora}, *
59  * TITLE = {Robust Modified L2 Local Optical Flow Estimation and Feature *
60  * Tracking}, *
61  * BOOKTITLE = {IEEE Workshop on Motion and Video Computing}, *
62  * YEAR = {2011}, *
63  * MONTH = jan, *
64  * EDITOR = {Eric Mortensen}, *
65  * PAGES = {685--690}, *
66  * ADDRESS = {Kona, USA}, *
67  * DOI = {10.1109/WACV.2011.5711571}, *
68  * } *
69  * *
70  * COMMERCIAL USAGE: *
71  * It is not allowed to use any content of this package for any commercial *
72  * use or any advertisement for upcoming commercial products. If you want to*
73  * use any content for such a purpose please contact: *
74  * Prof. Dr.-Ing. Thomas Sikora <sikora@nue.tu-berlin.de>. *
75  ******************************************************************************/
76 
77 /******************************************************************************
78  * WARRANTIES: *
79  * *
80  * Software provided by Technische Universität Berlin with this document is *
81  * provided "AS IS" and any express of implied warranties including, but *
82  * not limited to, the implied warranties of merchantability and fitness *
83  * for a particular purpose are disclaimed. *
84  * In no event shall the author or contributors be liable for any direct, *
85  * indirect, incidental, special, exemplary, or consequential damages *
86  * (including, but not limited to, procurement of substitute goods or *
87  * services, loss of use, data, or profits or business interruption) caused in*
88  * any way out of the use of this software, even if advised of the possibility*
89  * of such damage. *
90  ******************************************************************************/
99 #pragma once
100 #ifndef _IFEATURETRACKER_H_
101 #define _IFEATURETRACKER_H_
102 
103 #include <OpticalFlow/cvwrapper.hpp>
104 #ifndef _NOT_USE_OPENCV_
105 #include <opencv2/core/core.hpp>
106 #include <opencv2\imgproc\imgproc.hpp>
107 #else
108 #include <stdlib.h>
109 #include <vector>
110 #define uchar unsigned char
111 #endif
112 #ifdef DECL_STATIC
113  #define DECL_SPEC
114 #else
115 #ifndef DECL_SPEC
116  #ifdef _USRDLL
117  #ifdef WIN32
118  #ifdef _USRDLL
119  #define DECL_SPEC __declspec(dllexport)
120  #else
121  #define DECL_SPEC __declspec(dllimport)
122  #endif // DLL_EXPORT
123  #endif // WIN32
124  #ifdef __GNUG__
125  #define DECL_SPEC __attribute__ ((visibility("default")))
126  #endif // __GNUG__
127  #endif
128  #ifndef DECL_SPEC
129  #define DECL_SPEC
130  #endif
131 #endif // DECLSPEC_DEFINED
132 #endif
133 
140 {
141 public:
142  virtual ~FeatureTrackerContext() {};
143 };
144 
150 class DECL_SPEC IFeatureTracker
151 {
152 public:
153  virtual ~IFeatureTracker() {};
170  virtual void run(
171  const uchar * imgPtr1,
172  unsigned int step1,
173  const uchar * imgPtr2,
174  unsigned int step2,
175  unsigned int nRows,
176  unsigned int nCols,
177  std::vector<CRPoint> & prevPoints,
178  std::vector<CRPoint> & currPoints,
179  const FeatureTrackerContext * context){};
180 
191  #ifndef _NOT_USE_OPENCV_
192  virtual void run(
193  const cv::Mat & prevImage,
194  const cv::Mat & currImage,
195  std::vector<cv::Point2f> & prevPoints,
196  std::vector<cv::Point2f> & currPoints,
197  const FeatureTrackerContext * context) = 0;
198  #endif
199 
202  virtual FeatureTrackerContext * createDefaultParameter() = 0;
203 };
204 
215 #endif
Feature tracker parameter base class This class is the base class for all parameter classes in that l...
RLOF Interface.
OpenCV wrapper.
virtual void run(const uchar *imgPtr1, unsigned int step1, const uchar *imgPtr2, unsigned int step2, unsigned int nRows, unsigned int nCols, std::vector< CRPoint > &prevPoints, std::vector< CRPoint > &currPoints, const FeatureTrackerContext *context)