Refactored videostab module and sample
This commit is contained in:
@@ -72,8 +72,6 @@ public:
|
||||
virtual void setBlurrinessRates(const std::vector<float> &val) { blurrinessRates_ = &val; }
|
||||
virtual const std::vector<float>& blurrinessRates() const { return *blurrinessRates_; }
|
||||
|
||||
virtual void update() {}
|
||||
|
||||
virtual void deblur(int idx, Mat &frame) = 0;
|
||||
|
||||
protected:
|
||||
|
@@ -72,6 +72,7 @@ struct CV_EXPORTS RansacParams
|
||||
float eps; // max outliers ratio
|
||||
float prob; // probability of success
|
||||
|
||||
RansacParams() : size(0), thresh(0), eps(0), prob(0) {}
|
||||
RansacParams(int size, float thresh, float eps, float prob)
|
||||
: size(size), thresh(thresh), eps(eps), prob(prob) {}
|
||||
|
||||
|
@@ -78,8 +78,6 @@ public:
|
||||
virtual void setStabilizationMotions(const std::vector<Mat> &val) { stabilizationMotions_ = &val; }
|
||||
virtual const std::vector<Mat>& stabilizationMotions() const { return *stabilizationMotions_; }
|
||||
|
||||
virtual void update() {}
|
||||
|
||||
virtual void inpaint(int idx, Mat &frame, Mat &mask) = 0;
|
||||
|
||||
protected:
|
||||
@@ -108,8 +106,6 @@ public:
|
||||
virtual void setStabilizedFrames(const std::vector<Mat> &val);
|
||||
virtual void setStabilizationMotions(const std::vector<Mat> &val);
|
||||
|
||||
virtual void update();
|
||||
|
||||
virtual void inpaint(int idx, Mat &frame, Mat &mask);
|
||||
|
||||
private:
|
||||
|
@@ -79,6 +79,12 @@ class CV_EXPORTS GaussianMotionFilter : public MotionFilterBase
|
||||
{
|
||||
public:
|
||||
GaussianMotionFilter() : stdev_(-1.f) {}
|
||||
GaussianMotionFilter(int radius, float stdev = -1.f)
|
||||
{
|
||||
setRadius(radius);
|
||||
setStdev(stdev);
|
||||
update();
|
||||
}
|
||||
|
||||
void setStdev(float val) { stdev_ = val; }
|
||||
float stdev() const { return stdev_; }
|
||||
|
@@ -160,7 +160,7 @@ public:
|
||||
void setEstimateTrimRatio(bool val) { mustEstTrimRatio_ = val; }
|
||||
bool mustEstimateTrimaRatio() const { return mustEstTrimRatio_; }
|
||||
|
||||
virtual void reset() { resetImpl(); }
|
||||
virtual void reset();
|
||||
virtual Mat nextFrame();
|
||||
|
||||
// available after pre-pass, before it's empty
|
||||
|
Reference in New Issue
Block a user