Remove deprecated methods from cv::Algorithm

This commit is contained in:
Maksim Shabunin
2015-02-05 17:40:15 +03:00
parent fdf31ec14f
commit da383e65e2
37 changed files with 411 additions and 2037 deletions
+17 -21
View File
@@ -460,7 +460,7 @@ namespace
func(_src, _dst, btvKernelSize, btvWeights);
}
class BTVL1_Base
class BTVL1_Base : public cv::superres::SuperResolution
{
public:
BTVL1_Base();
@@ -470,6 +470,17 @@ namespace
void collectGarbage();
CV_IMPL_PROPERTY(int, Scale, scale_)
CV_IMPL_PROPERTY(int, Iterations, iterations_)
CV_IMPL_PROPERTY(double, Tau, tau_)
CV_IMPL_PROPERTY(double, Labmda, lambda_)
CV_IMPL_PROPERTY(double, Alpha, alpha_)
CV_IMPL_PROPERTY(int, KernelSize, btvKernelSize_)
CV_IMPL_PROPERTY(int, BlurKernelSize, blurKernelSize_)
CV_IMPL_PROPERTY(double, BlurSigma, blurSigma_)
CV_IMPL_PROPERTY(int, TemporalAreaRadius, temporalAreaRadius_)
CV_IMPL_PROPERTY_S(Ptr<cv::superres::DenseOpticalFlowExt>, OpticalFlow, opticalFlow_)
protected:
int scale_;
int iterations_;
@@ -479,7 +490,8 @@ namespace
int btvKernelSize_;
int blurKernelSize_;
double blurSigma_;
Ptr<DenseOpticalFlowExt> opticalFlow_;
int temporalAreaRadius_; // not used in some implementations
Ptr<cv::superres::DenseOpticalFlowExt> opticalFlow_;
private:
bool ocl_process(InputArrayOfArrays src, OutputArray dst, InputArrayOfArrays forwardMotions,
@@ -539,6 +551,7 @@ namespace
btvKernelSize_ = 7;
blurKernelSize_ = 5;
blurSigma_ = 0.0;
temporalAreaRadius_ = 0;
opticalFlow_ = createOptFlow_Farneback();
curBlurKernelSize_ = -1;
@@ -781,12 +794,9 @@ namespace
////////////////////////////////////////////////////////////////////
class BTVL1 :
public SuperResolution, private BTVL1_Base
class BTVL1 : public BTVL1_Base
{
public:
AlgorithmInfo* info() const;
BTVL1();
void collectGarbage();
@@ -799,8 +809,6 @@ namespace
bool ocl_processImpl(Ptr<FrameSource>& frameSource, OutputArray output);
private:
int temporalAreaRadius_;
void readNextFrame(Ptr<FrameSource>& frameSource);
bool ocl_readNextFrame(Ptr<FrameSource>& frameSource);
@@ -841,18 +849,6 @@ namespace
#endif
};
CV_INIT_ALGORITHM(BTVL1, "SuperResolution.BTVL1",
obj.info()->addParam(obj, "scale", obj.scale_, false, 0, 0, "Scale factor.");
obj.info()->addParam(obj, "iterations", obj.iterations_, false, 0, 0, "Iteration count.");
obj.info()->addParam(obj, "tau", obj.tau_, false, 0, 0, "Asymptotic value of steepest descent method.");
obj.info()->addParam(obj, "lambda", obj.lambda_, false, 0, 0, "Weight parameter to balance data term and smoothness term.");
obj.info()->addParam(obj, "alpha", obj.alpha_, false, 0, 0, "Parameter of spacial distribution in Bilateral-TV.");
obj.info()->addParam(obj, "btvKernelSize", obj.btvKernelSize_, false, 0, 0, "Kernel size of Bilateral-TV filter.");
obj.info()->addParam(obj, "blurKernelSize", obj.blurKernelSize_, false, 0, 0, "Gaussian blur kernel size.");
obj.info()->addParam(obj, "blurSigma", obj.blurSigma_, false, 0, 0, "Gaussian blur sigma.");
obj.info()->addParam(obj, "temporalAreaRadius", obj.temporalAreaRadius_, false, 0, 0, "Radius of the temporal search area.");
obj.info()->addParam<DenseOpticalFlowExt>(obj, "opticalFlow", obj.opticalFlow_, false, 0, 0, "Dense optical flow algorithm."))
BTVL1::BTVL1()
{
temporalAreaRadius_ = 4;
@@ -1101,7 +1097,7 @@ namespace
}
}
Ptr<SuperResolution> cv::superres::createSuperResolution_BTVL1()
Ptr<cv::superres::SuperResolution> cv::superres::createSuperResolution_BTVL1()
{
return makePtr<BTVL1>();
}