OpenCV453
superres/optical_flow.hpp
1/*M///////////////////////////////////////////////////////////////////////////////////////
2//
3// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4//
5// By downloading, copying, installing or using the software you agree to this license.
6// If you do not agree to this license, do not download, install,
7// copy or use the software.
8//
9//
10// License Agreement
11// For Open Source Computer Vision Library
12//
13// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
14// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
15// Third party copyrights are property of their respective owners.
16//
17// Redistribution and use in source and binary forms, with or without modification,
18// are permitted provided that the following conditions are met:
19//
20// * Redistribution's of source code must retain the above copyright notice,
21// this list of conditions and the following disclaimer.
22//
23// * Redistribution's in binary form must reproduce the above copyright notice,
24// this list of conditions and the following disclaimer in the documentation
25// and/or other materials provided with the distribution.
26//
27// * The name of the copyright holders may not be used to endorse or promote products
28// derived from this software without specific prior written permission.
29//
30// This software is provided by the copyright holders and contributors "as is" and
31// any express or implied warranties, including, but not limited to, the implied
32// warranties of merchantability and fitness for a particular purpose are disclaimed.
33// In no event shall the Intel Corporation or contributors be liable for any direct,
34// indirect, incidental, special, exemplary, or consequential damages
35// (including, but not limited to, procurement of substitute goods or services;
36// loss of use, data, or profits; or business interruption) however caused
37// and on any theory of liability, whether in contract, strict liability,
38// or tort (including negligence or otherwise) arising in any way out of
39// the use of this software, even if advised of the possibility of such damage.
40//
41//M*/
42
43#ifndef OPENCV_SUPERRES_OPTICAL_FLOW_HPP
44#define OPENCV_SUPERRES_OPTICAL_FLOW_HPP
45
46#include "opencv2/core.hpp"
47
48namespace cv
49{
50 namespace superres
51 {
52
55
56 class CV_EXPORTS DenseOpticalFlowExt : public cv::Algorithm
57 {
58 public:
59 virtual void calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2 = noArray()) = 0;
60 virtual void collectGarbage() = 0;
61 };
62
63
64 class CV_EXPORTS FarnebackOpticalFlow : public virtual DenseOpticalFlowExt
65 {
66 public:
68 virtual double getPyrScale() const = 0;
70 virtual void setPyrScale(double val) = 0;
72 virtual int getLevelsNumber() const = 0;
74 virtual void setLevelsNumber(int val) = 0;
76 virtual int getWindowSize() const = 0;
78 virtual void setWindowSize(int val) = 0;
80 virtual int getIterations() const = 0;
82 virtual void setIterations(int val) = 0;
84 virtual int getPolyN() const = 0;
86 virtual void setPolyN(int val) = 0;
88 virtual double getPolySigma() const = 0;
90 virtual void setPolySigma(double val) = 0;
92 virtual int getFlags() const = 0;
94 virtual void setFlags(int val) = 0;
95 };
96 CV_EXPORTS Ptr<FarnebackOpticalFlow> createOptFlow_Farneback();
97 CV_EXPORTS Ptr<FarnebackOpticalFlow> createOptFlow_Farneback_CUDA();
98
99
100// CV_EXPORTS Ptr<DenseOpticalFlowExt> createOptFlow_Simple();
101
102
103 class CV_EXPORTS DualTVL1OpticalFlow : public virtual DenseOpticalFlowExt
104 {
105 public:
107 virtual double getTau() const = 0;
109 virtual void setTau(double val) = 0;
111 virtual double getLambda() const = 0;
113 virtual void setLambda(double val) = 0;
115 virtual double getTheta() const = 0;
117 virtual void setTheta(double val) = 0;
119 virtual int getScalesNumber() const = 0;
121 virtual void setScalesNumber(int val) = 0;
123 virtual int getWarpingsNumber() const = 0;
125 virtual void setWarpingsNumber(int val) = 0;
127 virtual double getEpsilon() const = 0;
129 virtual void setEpsilon(double val) = 0;
131 virtual int getIterations() const = 0;
133 virtual void setIterations(int val) = 0;
135 virtual bool getUseInitialFlow() const = 0;
137 virtual void setUseInitialFlow(bool val) = 0;
138 };
139 CV_EXPORTS Ptr<DualTVL1OpticalFlow> createOptFlow_DualTVL1();
140 CV_EXPORTS Ptr<DualTVL1OpticalFlow> createOptFlow_DualTVL1_CUDA();
141
142
143 class CV_EXPORTS BroxOpticalFlow : public virtual DenseOpticalFlowExt
144 {
145 public:
147
148 virtual double getAlpha() const = 0;
150 virtual void setAlpha(double val) = 0;
152
153 virtual double getGamma() const = 0;
155 virtual void setGamma(double val) = 0;
157
158 virtual double getScaleFactor() const = 0;
160 virtual void setScaleFactor(double val) = 0;
162
163 virtual int getInnerIterations() const = 0;
165 virtual void setInnerIterations(int val) = 0;
167
168 virtual int getOuterIterations() const = 0;
170 virtual void setOuterIterations(int val) = 0;
172
173 virtual int getSolverIterations() const = 0;
175 virtual void setSolverIterations(int val) = 0;
176 };
177 CV_EXPORTS Ptr<BroxOpticalFlow> createOptFlow_Brox_CUDA();
178
179
181 {
182 public:
184 virtual int getWindowSize() const = 0;
186 virtual void setWindowSize(int val) = 0;
188 virtual int getMaxLevel() const = 0;
190 virtual void setMaxLevel(int val) = 0;
192 virtual int getIterations() const = 0;
194 virtual void setIterations(int val) = 0;
195 };
196 CV_EXPORTS Ptr<PyrLKOpticalFlow> createOptFlow_PyrLK_CUDA();
197
199
200 }
201}
202
203#endif // OPENCV_SUPERRES_OPTICAL_FLOW_HPP
This type is very similar to InputArray except that it is used for input/output and output function p...
Definition: mat.hpp:295
This is a base class for all more or less complex algorithms in OpenCV
Definition: core.hpp:3091
Definition: superres/optical_flow.hpp:144
virtual double getAlpha() const =0
Flow smoothness
virtual double getScaleFactor() const =0
Pyramid scale factor
virtual void setScaleFactor(double val)=0
Pyramid scale factor
virtual void setGamma(double val)=0
Gradient constancy importance
virtual int getSolverIterations() const =0
Number of linear system solver iterations
virtual void setOuterIterations(int val)=0
Number of warping iterations (number of pyramid levels)
virtual int getInnerIterations() const =0
Number of lagged non-linearity iterations (inner loop)
virtual void setAlpha(double val)=0
Flow smoothness
virtual double getGamma() const =0
Gradient constancy importance
virtual int getOuterIterations() const =0
Number of warping iterations (number of pyramid levels)
virtual void setSolverIterations(int val)=0
Number of linear system solver iterations
virtual void setInnerIterations(int val)=0
Number of lagged non-linearity iterations (inner loop)
Definition: superres/optical_flow.hpp:57
Definition: superres/optical_flow.hpp:104
virtual void setIterations(int val)=0
virtual void setWarpingsNumber(int val)=0
virtual double getLambda() const =0
virtual void setScalesNumber(int val)=0
virtual int getWarpingsNumber() const =0
virtual void setTheta(double val)=0
virtual double getTau() const =0
virtual void setLambda(double val)=0
virtual void setTau(double val)=0
virtual void setEpsilon(double val)=0
virtual double getEpsilon() const =0
virtual void setUseInitialFlow(bool val)=0
virtual bool getUseInitialFlow() const =0
virtual int getScalesNumber() const =0
virtual double getTheta() const =0
virtual int getIterations() const =0
Definition: superres/optical_flow.hpp:65
virtual int getIterations() const =0
virtual void setWindowSize(int val)=0
virtual int getFlags() const =0
virtual void setPyrScale(double val)=0
virtual void setPolySigma(double val)=0
virtual void setIterations(int val)=0
virtual void setLevelsNumber(int val)=0
virtual double getPyrScale() const =0
virtual int getLevelsNumber() const =0
virtual int getPolyN() const =0
virtual void setPolyN(int val)=0
virtual void setFlags(int val)=0
virtual int getWindowSize() const =0
virtual double getPolySigma() const =0
Definition: superres/optical_flow.hpp:181
virtual int getWindowSize() const =0
virtual void setIterations(int val)=0
virtual void setMaxLevel(int val)=0
virtual void setWindowSize(int val)=0
virtual int getMaxLevel() const =0
virtual int getIterations() const =0
"black box" representation of the file storage associated with a file on disk.
Definition: aruco.hpp:75
Definition: cvstd_wrapper.hpp:74