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