opencv on mbed

Dependencies:   mbed

Committer:
joeverbout
Date:
Thu Mar 31 21:16:38 2016 +0000
Revision:
0:ea44dc9ed014
OpenCV on mbed attempt

Who changed what in which revision?

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