alanlukezic / csr-dcf

Discriminative Correlation Filter with Channel and Spatial Reliability
228 stars 73 forks source link

Get psr_threshold without modifying the source code #14

Open pol29 opened 5 years ago

pol29 commented 5 years ago

Hello, is there a way to set the value of psr_threshold at the initialization of the CSRT Tracker ? I checked the public function TrackerCSRT::create(const TrackerCSRT::Params & parameters) and TrackerCSRT::Params::read(const FileNode &) but I wasn't able to set this parameter using a FileStorage. Any help/example would be appreciated. Moreover, is there a public method to get the max_val from CSRTImpl::estimate_new_position in order to determine if the target is visible, partially lost or completely lost ? PS : I don't want to modify the source code because I'm only using the module from openCV as it is.

pol29 commented 5 years ago

Edit : For the first question here is the following code

TrackerCSRT::Params params = TrackerCSRT::Params();
params.psr_threshold = 0.1; // the value you want
Ptr<Tracker>tracker;
tracker = TrackerCSRT::create(params);
alanlukezic commented 5 years ago

Hi, without modifying the source code I don't think this is possible.