diff --git a/modules/tracking/include/opencv2/tracking/tracker.hpp b/modules/tracking/include/opencv2/tracking/tracker.hpp index 3b880d9d6..aefc5da78 100644 --- a/modules/tracking/include/opencv2/tracking/tracker.hpp +++ b/modules/tracking/include/opencv2/tracking/tracker.hpp @@ -1165,6 +1165,13 @@ class CV_EXPORTS_W TrackerMedianFlow : public Tracker CV_WRAP static Ptr create(); + CV_WRAP virtual void setPointsInGrid(int pointsInGrid)=0; + CV_WRAP virtual void setWinSize(Size winSize)=0; + CV_WRAP virtual void setMaxLevel(int maxLevel)=0; + CV_WRAP virtual void setTermCriteria(TermCriteria termCriteria)=0; + CV_WRAP virtual void setWinSizeNCC(Size winSizeNCC)=0; + CV_WRAP virtual void setMaxMedianLengthOfDisplacementDifference(double maxMedianLengthOfDisplacementDifference)=0; + virtual ~TrackerMedianFlow() CV_OVERRIDE {} }; diff --git a/modules/tracking/src/trackerMedianFlow.cpp b/modules/tracking/src/trackerMedianFlow.cpp index 6f41c3ebe..0782b859e 100644 --- a/modules/tracking/src/trackerMedianFlow.cpp +++ b/modules/tracking/src/trackerMedianFlow.cpp @@ -77,6 +77,12 @@ public: TrackerMedianFlowImpl(TrackerMedianFlow::Params paramsIn = TrackerMedianFlow::Params()) {params=paramsIn;isInit=false;} void read( const FileNode& fn ) CV_OVERRIDE; void write( FileStorage& fs ) const CV_OVERRIDE; + void setPointsInGrid(int pointsInGrid) CV_OVERRIDE {params.pointsInGrid = pointsInGrid;} + void setWinSize(Size winSize) CV_OVERRIDE {params.winSize = winSize;} + void setMaxLevel(int maxLevel) CV_OVERRIDE {params.maxLevel = maxLevel;} + void setTermCriteria(TermCriteria termCriteria) CV_OVERRIDE {params.termCriteria = termCriteria;} + void setWinSizeNCC(Size winSizeNCC) CV_OVERRIDE {params.winSizeNCC = winSizeNCC;} + void setMaxMedianLengthOfDisplacementDifference(double maxMedianLengthOfDisplacementDifference) CV_OVERRIDE {params.maxMedianLengthOfDisplacementDifference = maxMedianLengthOfDisplacementDifference;} private: bool initImpl( const Mat& image, const Rect2d& boundingBox ) CV_OVERRIDE; bool updateImpl( const Mat& image, Rect2d& boundingBox ) CV_OVERRIDE;