Commit 94447d51 authored by Vladimir's avatar Vladimir

Restored *protected:*' in tracker.hpp

parent f16586f8
...@@ -565,7 +565,12 @@ class CV_EXPORTS_W Tracker : public virtual Algorithm ...@@ -565,7 +565,12 @@ class CV_EXPORTS_W Tracker : public virtual Algorithm
virtual void read( const FileNode& fn )=0; virtual void read( const FileNode& fn )=0;
virtual void write( FileStorage& fs ) const=0; virtual void write( FileStorage& fs ) const=0;
public: Ptr<TrackerModel> getModel()
{
return model;
}
protected:
virtual bool initImpl( const Mat& image, const Rect2d& boundingBox ) = 0; virtual bool initImpl( const Mat& image, const Rect2d& boundingBox ) = 0;
virtual bool updateImpl( const Mat& image, Rect2d& boundingBox ) = 0; virtual bool updateImpl( const Mat& image, Rect2d& boundingBox ) = 0;
......
...@@ -91,7 +91,7 @@ namespace cv ...@@ -91,7 +91,7 @@ namespace cv
Tracker* trackerPtr = trackers[0]; Tracker* trackerPtr = trackers[0];
tld::TrackerTLDImpl* tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr); tld::TrackerTLDImpl* tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr);
//TLD Model Extraction //TLD Model Extraction
tld::TrackerTLDModel* tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->model)); tld::TrackerTLDModel* tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->getModel()));
Ptr<tld::Data> data = tracker->data; Ptr<tld::Data> data = tracker->data;
double scale = data->getScale(); double scale = data->getScale();
...@@ -130,7 +130,7 @@ namespace cv ...@@ -130,7 +130,7 @@ namespace cv
trackerPtr = trackers[k]; trackerPtr = trackers[k];
tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr); tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr);
//TLD Model Extraction //TLD Model Extraction
tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->model)); tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->getModel()));
data = tracker->data; data = tracker->data;
data->frameNum++; data->frameNum++;
...@@ -247,7 +247,7 @@ namespace cv ...@@ -247,7 +247,7 @@ namespace cv
Tracker* trackerPtr = trackers[0]; Tracker* trackerPtr = trackers[0];
cv::tld::TrackerTLDImpl* tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr); cv::tld::TrackerTLDImpl* tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr);
//TLD Model Extraction //TLD Model Extraction
tld::TrackerTLDModel* tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->model)); tld::TrackerTLDModel* tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->getModel()));
Size initSize = tldModel->getMinSize(); Size initSize = tldModel->getMinSize();
for (int k = 0; k < (int)trackers.size(); k++) for (int k = 0; k < (int)trackers.size(); k++)
...@@ -311,7 +311,7 @@ namespace cv ...@@ -311,7 +311,7 @@ namespace cv
trackerPtr = trackers[k]; trackerPtr = trackers[k];
tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr); tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr);
//TLD Model Extraction //TLD Model Extraction
tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->model)); tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->getModel()));
//Optimized variance calculation //Optimized variance calculation
bool varPass = (windowVar > tld::VARIANCE_THRESHOLD * *tldModel->detector->originalVariancePtr); bool varPass = (windowVar > tld::VARIANCE_THRESHOLD * *tldModel->detector->originalVariancePtr);
...@@ -340,7 +340,7 @@ namespace cv ...@@ -340,7 +340,7 @@ namespace cv
trackerPtr = trackers[k]; trackerPtr = trackers[k];
tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr); tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr);
//TLD Model Extraction //TLD Model Extraction
tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->model)); tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->getModel()));
for (int i = 0; i < (int)varBuffer[k].size(); i++) for (int i = 0; i < (int)varBuffer[k].size(); i++)
...@@ -382,7 +382,7 @@ namespace cv ...@@ -382,7 +382,7 @@ namespace cv
trackerPtr = trackers[k]; trackerPtr = trackers[k];
tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr); tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr);
//TLD Model Extraction //TLD Model Extraction
tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->model)); tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->getModel()));
npos = 0; npos = 0;
nneg = 0; nneg = 0;
...@@ -441,7 +441,7 @@ namespace cv ...@@ -441,7 +441,7 @@ namespace cv
Tracker* trackerPtr = trackers[0]; Tracker* trackerPtr = trackers[0];
cv::tld::TrackerTLDImpl* tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr); cv::tld::TrackerTLDImpl* tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr);
//TLD Model Extraction //TLD Model Extraction
tld::TrackerTLDModel* tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->model)); tld::TrackerTLDModel* tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->getModel()));
Size initSize = tldModel->getMinSize(); Size initSize = tldModel->getMinSize();
for (int k = 0; k < (int)trackers.size(); k++) for (int k = 0; k < (int)trackers.size(); k++)
...@@ -505,7 +505,7 @@ namespace cv ...@@ -505,7 +505,7 @@ namespace cv
trackerPtr = trackers[k]; trackerPtr = trackers[k];
tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr); tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr);
//TLD Model Extraction //TLD Model Extraction
tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->model)); tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->getModel()));
//Optimized variance calculation //Optimized variance calculation
bool varPass = (windowVar > tld::VARIANCE_THRESHOLD * *tldModel->detector->originalVariancePtr); bool varPass = (windowVar > tld::VARIANCE_THRESHOLD * *tldModel->detector->originalVariancePtr);
...@@ -534,7 +534,7 @@ namespace cv ...@@ -534,7 +534,7 @@ namespace cv
trackerPtr = trackers[k]; trackerPtr = trackers[k];
tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr); tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr);
//TLD Model Extraction //TLD Model Extraction
tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->model)); tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->getModel()));
for (int i = 0; i < (int)varBuffer[k].size(); i++) for (int i = 0; i < (int)varBuffer[k].size(); i++)
...@@ -576,7 +576,7 @@ namespace cv ...@@ -576,7 +576,7 @@ namespace cv
trackerPtr = trackers[k]; trackerPtr = trackers[k];
tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr); tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr);
//TLD Model Extraction //TLD Model Extraction
tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->model)); tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->getModel()));
npos = 0; npos = 0;
nneg = 0; nneg = 0;
maxSc = -5.0; maxSc = -5.0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment