Replaced CV_PURE_PROPERTY macros with corresponding code

This commit is contained in:
Maksim Shabunin
2015-03-18 17:23:42 +03:00
parent e12a04ac7e
commit 7335a40a61
6 changed files with 365 additions and 109 deletions

View File

@@ -105,34 +105,64 @@ namespace cv
virtual void collectGarbage();
//! @brief Scale factor
CV_PURE_PROPERTY(int, Scale)
/** @see setScale */
virtual int getScale() const = 0;
/** @copybrief getScale @see getScale */
virtual void setScale(int val) = 0;
//! @brief Iterations count
CV_PURE_PROPERTY(int, Iterations)
/** @see setIterations */
virtual int getIterations() const = 0;
/** @copybrief getIterations @see getIterations */
virtual void setIterations(int val) = 0;
//! @brief Asymptotic value of steepest descent method
CV_PURE_PROPERTY(double, Tau)
/** @see setTau */
virtual double getTau() const = 0;
/** @copybrief getTau @see getTau */
virtual void setTau(double val) = 0;
//! @brief Weight parameter to balance data term and smoothness term
CV_PURE_PROPERTY(double, Labmda)
/** @see setLabmda */
virtual double getLabmda() const = 0;
/** @copybrief getLabmda @see getLabmda */
virtual void setLabmda(double val) = 0;
//! @brief Parameter of spacial distribution in Bilateral-TV
CV_PURE_PROPERTY(double, Alpha)
/** @see setAlpha */
virtual double getAlpha() const = 0;
/** @copybrief getAlpha @see getAlpha */
virtual void setAlpha(double val) = 0;
//! @brief Kernel size of Bilateral-TV filter
CV_PURE_PROPERTY(int, KernelSize)
/** @see setKernelSize */
virtual int getKernelSize() const = 0;
/** @copybrief getKernelSize @see getKernelSize */
virtual void setKernelSize(int val) = 0;
//! @brief Gaussian blur kernel size
CV_PURE_PROPERTY(int, BlurKernelSize)
/** @see setBlurKernelSize */
virtual int getBlurKernelSize() const = 0;
/** @copybrief getBlurKernelSize @see getBlurKernelSize */
virtual void setBlurKernelSize(int val) = 0;
//! @brief Gaussian blur sigma
CV_PURE_PROPERTY(double, BlurSigma)
/** @see setBlurSigma */
virtual double getBlurSigma() const = 0;
/** @copybrief getBlurSigma @see getBlurSigma */
virtual void setBlurSigma(double val) = 0;
//! @brief Radius of the temporal search area
CV_PURE_PROPERTY(int, TemporalAreaRadius)
/** @see setTemporalAreaRadius */
virtual int getTemporalAreaRadius() const = 0;
/** @copybrief getTemporalAreaRadius @see getTemporalAreaRadius */
virtual void setTemporalAreaRadius(int val) = 0;
//! @brief Dense optical flow algorithm
CV_PURE_PROPERTY_S(Ptr<cv::superres::DenseOpticalFlowExt>, OpticalFlow)
/** @see setOpticalFlow */
virtual Ptr<cv::superres::DenseOpticalFlowExt> getOpticalFlow() const = 0;
/** @copybrief getOpticalFlow @see getOpticalFlow */
virtual void setOpticalFlow(const Ptr<cv::superres::DenseOpticalFlowExt> &val) = 0;
protected:
SuperResolution();

View File

@@ -64,13 +64,34 @@ namespace cv
class CV_EXPORTS FarnebackOpticalFlow : public virtual DenseOpticalFlowExt
{
public:
CV_PURE_PROPERTY(double, PyrScale)
CV_PURE_PROPERTY(int, LevelsNumber)
CV_PURE_PROPERTY(int, WindowSize)
CV_PURE_PROPERTY(int, Iterations)
CV_PURE_PROPERTY(int, PolyN)
CV_PURE_PROPERTY(double, PolySigma)
CV_PURE_PROPERTY(int, Flags)
/** @see setPyrScale */
virtual double getPyrScale() const = 0;
/** @copybrief getPyrScale @see getPyrScale */
virtual void setPyrScale(double val) = 0;
/** @see setLevelsNumber */
virtual int getLevelsNumber() const = 0;
/** @copybrief getLevelsNumber @see getLevelsNumber */
virtual void setLevelsNumber(int val) = 0;
/** @see setWindowSize */
virtual int getWindowSize() const = 0;
/** @copybrief getWindowSize @see getWindowSize */
virtual void setWindowSize(int val) = 0;
/** @see setIterations */
virtual int getIterations() const = 0;
/** @copybrief getIterations @see getIterations */
virtual void setIterations(int val) = 0;
/** @see setPolyN */
virtual int getPolyN() const = 0;
/** @copybrief getPolyN @see getPolyN */
virtual void setPolyN(int val) = 0;
/** @see setPolySigma */
virtual double getPolySigma() const = 0;
/** @copybrief getPolySigma @see getPolySigma */
virtual void setPolySigma(double val) = 0;
/** @see setFlags */
virtual int getFlags() const = 0;
/** @copybrief getFlags @see getFlags */
virtual void setFlags(int val) = 0;
};
CV_EXPORTS Ptr<FarnebackOpticalFlow> createOptFlow_Farneback();
CV_EXPORTS Ptr<FarnebackOpticalFlow> createOptFlow_Farneback_CUDA();
@@ -82,14 +103,38 @@ namespace cv
class CV_EXPORTS DualTVL1OpticalFlow : public virtual DenseOpticalFlowExt
{
public:
CV_PURE_PROPERTY(double, Tau)
CV_PURE_PROPERTY(double, Lambda)
CV_PURE_PROPERTY(double, Theta)
CV_PURE_PROPERTY(int, ScalesNumber)
CV_PURE_PROPERTY(int, WarpingsNumber)
CV_PURE_PROPERTY(double, Epsilon)
CV_PURE_PROPERTY(int, Iterations)
CV_PURE_PROPERTY(bool, UseInitialFlow)
/** @see setTau */
virtual double getTau() const = 0;
/** @copybrief getTau @see getTau */
virtual void setTau(double val) = 0;
/** @see setLambda */
virtual double getLambda() const = 0;
/** @copybrief getLambda @see getLambda */
virtual void setLambda(double val) = 0;
/** @see setTheta */
virtual double getTheta() const = 0;
/** @copybrief getTheta @see getTheta */
virtual void setTheta(double val) = 0;
/** @see setScalesNumber */
virtual int getScalesNumber() const = 0;
/** @copybrief getScalesNumber @see getScalesNumber */
virtual void setScalesNumber(int val) = 0;
/** @see setWarpingsNumber */
virtual int getWarpingsNumber() const = 0;
/** @copybrief getWarpingsNumber @see getWarpingsNumber */
virtual void setWarpingsNumber(int val) = 0;
/** @see setEpsilon */
virtual double getEpsilon() const = 0;
/** @copybrief getEpsilon @see getEpsilon */
virtual void setEpsilon(double val) = 0;
/** @see setIterations */
virtual int getIterations() const = 0;
/** @copybrief getIterations @see getIterations */
virtual void setIterations(int val) = 0;
/** @see setUseInitialFlow */
virtual bool getUseInitialFlow() const = 0;
/** @copybrief getUseInitialFlow @see getUseInitialFlow */
virtual void setUseInitialFlow(bool val) = 0;
};
CV_EXPORTS Ptr<DualTVL1OpticalFlow> createOptFlow_DualTVL1();
CV_EXPORTS Ptr<DualTVL1OpticalFlow> createOptFlow_DualTVL1_CUDA();
@@ -99,17 +144,35 @@ namespace cv
{
public:
//! @brief Flow smoothness
CV_PURE_PROPERTY(double, Alpha)
/** @see setAlpha */
virtual double getAlpha() const = 0;
/** @copybrief getAlpha @see getAlpha */
virtual void setAlpha(double val) = 0;
//! @brief Gradient constancy importance
CV_PURE_PROPERTY(double, Gamma)
/** @see setGamma */
virtual double getGamma() const = 0;
/** @copybrief getGamma @see getGamma */
virtual void setGamma(double val) = 0;
//! @brief Pyramid scale factor
CV_PURE_PROPERTY(double, ScaleFactor)
/** @see setScaleFactor */
virtual double getScaleFactor() const = 0;
/** @copybrief getScaleFactor @see getScaleFactor */
virtual void setScaleFactor(double val) = 0;
//! @brief Number of lagged non-linearity iterations (inner loop)
CV_PURE_PROPERTY(int, InnerIterations)
/** @see setInnerIterations */
virtual int getInnerIterations() const = 0;
/** @copybrief getInnerIterations @see getInnerIterations */
virtual void setInnerIterations(int val) = 0;
//! @brief Number of warping iterations (number of pyramid levels)
CV_PURE_PROPERTY(int, OuterIterations)
/** @see setOuterIterations */
virtual int getOuterIterations() const = 0;
/** @copybrief getOuterIterations @see getOuterIterations */
virtual void setOuterIterations(int val) = 0;
//! @brief Number of linear system solver iterations
CV_PURE_PROPERTY(int, SolverIterations)
/** @see setSolverIterations */
virtual int getSolverIterations() const = 0;
/** @copybrief getSolverIterations @see getSolverIterations */
virtual void setSolverIterations(int val) = 0;
};
CV_EXPORTS Ptr<BroxOpticalFlow> createOptFlow_Brox_CUDA();
@@ -117,9 +180,18 @@ namespace cv
class PyrLKOpticalFlow : public virtual DenseOpticalFlowExt
{
public:
CV_PURE_PROPERTY(int, WindowSize)
CV_PURE_PROPERTY(int, MaxLevel)
CV_PURE_PROPERTY(int, Iterations)
/** @see setWindowSize */
virtual int getWindowSize() const = 0;
/** @copybrief getWindowSize @see getWindowSize */
virtual void setWindowSize(int val) = 0;
/** @see setMaxLevel */
virtual int getMaxLevel() const = 0;
/** @copybrief getMaxLevel @see getMaxLevel */
virtual void setMaxLevel(int val) = 0;
/** @see setIterations */
virtual int getIterations() const = 0;
/** @copybrief getIterations @see getIterations */
virtual void setIterations(int val) = 0;
};
CV_EXPORTS Ptr<PyrLKOpticalFlow> createOptFlow_PyrLK_CUDA();