Skip to content

tracking: moved CSRT to main repository, removed legacy implemetation #3937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 4.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions modules/tracking/doc/tracking.bib
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,6 @@ @inproceedings{MOSSE
year = {2010}
}

@Article{Lukezic_IJCV2018,
author={Luke{\v{z}}i{\v{c}}, Alan and Voj{'i}{\v{r}}, Tom{'a}{\v{s}} and {\v{C}}ehovin Zajc, Luka and Matas, Ji{\v{r}}{'i} and Kristan, Matej},
title={Discriminative Correlation Filter Tracker with Channel and Spatial Reliability},
journal={International Journal of Computer Vision},
year={2018},
}

@article{chaumette:inria-00350283,
title={{Visual servo control, Part I: Basic approaches}},
author={Chaumette, Fran{\c c}ois and Hutchinson, S.},
Expand Down
59 changes: 0 additions & 59 deletions modules/tracking/include/opencv2/tracking.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,65 +27,6 @@ The development in this area is very fragmented and this API is an interface use
*/


/** @brief the CSRT tracker

The implementation is based on @cite Lukezic_IJCV2018 Discriminative Correlation Filter with Channel and Spatial Reliability
*/
class CV_EXPORTS_W TrackerCSRT : public Tracker
{
protected:
TrackerCSRT(); // use ::create()
public:
virtual ~TrackerCSRT() CV_OVERRIDE;

struct CV_EXPORTS_W_SIMPLE Params
{
CV_WRAP Params();

CV_PROP_RW bool use_hog;
CV_PROP_RW bool use_color_names;
CV_PROP_RW bool use_gray;
CV_PROP_RW bool use_rgb;
CV_PROP_RW bool use_channel_weights;
CV_PROP_RW bool use_segmentation;

CV_PROP_RW std::string window_function; //!< Window function: "hann", "cheb", "kaiser"
CV_PROP_RW float kaiser_alpha;
CV_PROP_RW float cheb_attenuation;

CV_PROP_RW float template_size;
CV_PROP_RW float gsl_sigma;
CV_PROP_RW float hog_orientations;
CV_PROP_RW float hog_clip;
CV_PROP_RW float padding;
CV_PROP_RW float filter_lr;
CV_PROP_RW float weights_lr;
CV_PROP_RW int num_hog_channels_used;
CV_PROP_RW int admm_iterations;
CV_PROP_RW int histogram_bins;
CV_PROP_RW float histogram_lr;
CV_PROP_RW int background_ratio;
CV_PROP_RW int number_of_scales;
CV_PROP_RW float scale_sigma_factor;
CV_PROP_RW float scale_model_max_area;
CV_PROP_RW float scale_lr;
CV_PROP_RW float scale_step;

CV_PROP_RW float psr_threshold; //!< we lost the target, if the psr is lower than this.
};

/** @brief Create CSRT tracker instance
@param parameters CSRT parameters TrackerCSRT::Params
*/
static CV_WRAP
Ptr<TrackerCSRT> create(const TrackerCSRT::Params &parameters = TrackerCSRT::Params());

//void init(InputArray image, const Rect& boundingBox) CV_OVERRIDE;
//bool update(InputArray image, CV_OUT Rect& boundingBox) CV_OVERRIDE;

CV_WRAP virtual void setInitialMask(InputArray mask) = 0;
};


/** @brief the KCF (Kernelized Correlation Filter) tracker

Expand Down
34 changes: 0 additions & 34 deletions modules/tracking/include/opencv2/tracking/tracking_legacy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,40 +492,6 @@ class CV_EXPORTS MultiTrackerTLD : public MultiTracker_Alt
bool update_opt(InputArray image);
};

/*********************************** CSRT ************************************/
/** @brief the CSRT tracker

The implementation is based on @cite Lukezic_IJCV2018 Discriminative Correlation Filter with Channel and Spatial Reliability
*/
class CV_EXPORTS_W TrackerCSRT : public cv::legacy::Tracker
{
public:
struct CV_EXPORTS Params : cv::tracking::TrackerCSRT::Params
{
/**
* \brief Read parameters from a file
*/
void read(const FileNode& /*fn*/);

/**
* \brief Write parameters to a file
*/
void write(cv::FileStorage& fs) const;
};

/** @brief Constructor
@param parameters CSRT parameters TrackerCSRT::Params
*/
static Ptr<legacy::TrackerCSRT> create(const TrackerCSRT::Params &parameters);

CV_WRAP static Ptr<legacy::TrackerCSRT> create();

CV_WRAP virtual void setInitialMask(InputArray mask) = 0;

virtual ~TrackerCSRT() CV_OVERRIDE {}
};


CV_EXPORTS_W Ptr<cv::Tracker> upgradeTrackingAPI(const Ptr<legacy::Tracker>& legacy_tracker);

//! @}
Expand Down
1 change: 0 additions & 1 deletion modules/tracking/misc/python/pyopencv_tracking.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#ifdef HAVE_OPENCV_TRACKING
typedef TrackerCSRT::Params TrackerCSRT_Params;
typedef TrackerKCF::Params TrackerKCF_Params;
#endif
1 change: 0 additions & 1 deletion modules/tracking/misc/python/test/test_tracking_contrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def test_createLegacyTracker(self):
t = cv.legacy.TrackerMedianFlow_create()
#t = cv.legacy.TrackerGOTURN_create()
t = cv.legacy.TrackerMOSSE_create()
t = cv.legacy.TrackerCSRT_create()


if __name__ == '__main__':
Expand Down
2 changes: 0 additions & 2 deletions modules/tracking/samples/samples_utility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ inline cv::Ptr<cv::legacy::Tracker> createTrackerByName_legacy(const std::string
CV_Error(cv::Error::StsNotImplemented, "FIXIT: migration on new API is required");
else if (name == "MOSSE")
tracker = legacy::TrackerMOSSE::create();
else if (name == "CSRT")
tracker = legacy::TrackerCSRT::create();
else
CV_Error(cv::Error::StsBadArg, "Invalid tracking algorithm name\n");

Expand Down
Loading
Loading