Robust Local Optical Flow Libary Documentation  V 1.2
 All Classes Files Functions Variables Enumerations Enumerator Macros Pages
cvwrapper.hpp
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  * @ARTICLE{Senst2012, *
21  * AUTHOR = {Tobias Senst and Volker Eiselein and Thomas Sikora}, *
22  * TITLE = {Robust Local Optical Flow for Feature Tracking}, *
23  * JOURNAL = {IEEE Transactions on Circuits and Systems for Video Technology},*
24  * YEAR = {2012}, *
25  * MONTH = sep, *
26  * PAGES = {1377--1387}, *
27  * VOLUME = {22}, *
28  * NUMBER = {9}, *
29  * DOI = {10.1109/TCSVT.2012.2202070} *
30  * } *
31  * *
32  * @INPROCEEDINGS{Senst2011, *
33  * AUTHOR = {Tobias Senst and Volker Eiselein and Rubén Heras Evangelio and *
34  * Thomas Sikora}, *
35  * TITLE = {Robust Modified L2 Local Optical Flow Estimation and Feature *
36  * Tracking}, *
37  * BOOKTITLE = {IEEE Workshop on Motion and Video Computing}, *
38  * YEAR = {2011}, *
39  * MONTH = jan, *
40  * EDITOR = {Eric Mortensen}, *
41  * PAGES = {685--690}, *
42  * ADDRESS = {Kona, USA}, *
43  * DOI = {10.1109/WACV.2011.5711571}, *
44  * } *
45  * *
46  * COMMERCIAL USAGE: *
47  * It is not allowed to use any content of this package for any commercial *
48  * use or any advertisement for upcoming commercial products. If you want to*
49  * use any content for such a purpose please contact: *
50  * Prof. Dr.-Ing. Thomas Sikora <sikora@nue.tu-berlin.de>. *
51  ******************************************************************************/
52 
53 /******************************************************************************
54  * WARRANTIES: *
55  * *
56  * Software provided by Technische Universität Berlin with this document is *
57  * provided "AS IS" and any express of implied warranties including, but *
58  * not limited to, the implied warranties of merchantability and fitness *
59  * for a particular purpose are disclaimed. *
60  * In no event shall the author or contributors be liable for any direct, *
61  * indirect, incidental, special, exemplary, or consequential damages *
62  * (including, but not limited to, procurement of substitute goods or *
63  * services, loss of use, data, or profits or business interruption) caused in*
64  * any way out of the use of this software, even if advised of the possibility*
65  * of such damage. *
66  ******************************************************************************/
76 #pragma once
77 #ifndef _CVWRAPPER_HPP_
78 #define _CVWRAPPER_HPP_
79 
80 #ifndef _NOT_USE_OPENCV_
81 #include <opencv2\core\core.hpp>
82 #endif
83 
85 
87 class CRPoint
88 {
89 public:
92  : x(0)
93  , y(0)
94  {}
99  CRPoint(const float _x, const float _y)
100  : x(_x)
101  , y(_y)
102  {}
103  float x;
104  float y;
105 };
106 #ifndef _NOT_USE_OPENCV_
107 
111 static void crTocv(std::vector<cv::Point2f> & lhs, const std::vector<CRPoint> & rhs)
112 {
113  lhs.resize(rhs.size());
114  std::vector<CRPoint>::const_iterator i = rhs.begin();
115  std::vector<cv::Point2f>::iterator n = lhs.begin();
116  for(; i != rhs.end(); ++i, ++n)
117  {
118  n->x = i->x;
119  n->y = i->y;
120  }
121 }
126 static void cvTocr(std::vector<CRPoint> & lhs, const std::vector<cv::Point2f> & rhs)
127 {
128  lhs.resize(rhs.size());
129  std::vector<cv::Point2f>::const_iterator i = rhs.begin();
130  std::vector<CRPoint>::iterator n = lhs.begin();
131  for(; i != rhs.end(); ++i, ++n)
132  {
133  n->x = i->x;
134  n->y = i->y;
135  }
136 }
137 #endif
138 
139 
140 #endif
CRPoint(const float _x, const float _y)
Definition: cvwrapper.hpp:99
static void crTocv(std::vector< cv::Point2f > &lhs, const std::vector< CRPoint > &rhs)
Definition: cvwrapper.hpp:111
float y
Definition: cvwrapper.hpp:104
CRPoint()
Default constructor.
Definition: cvwrapper.hpp:91
Wrapper cv::Point2f.
Definition: cvwrapper.hpp:87
static void cvTocr(std::vector< CRPoint > &lhs, const std::vector< cv::Point2f > &rhs)
Definition: cvwrapper.hpp:126
float x
Definition: cvwrapper.hpp:103