1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-20 04:25:42 +08:00

tracking: improve public API

Use ROI selector in python samples
This commit is contained in:
Vladislav Sovrasov
2017-04-11 14:47:09 +03:00
parent 4317e27d6b
commit 3ac9e24254
27 changed files with 269 additions and 448 deletions

View File

@@ -48,6 +48,7 @@
#include <opencv2/tracking.hpp>
#include <opencv2/videoio.hpp>
#include <opencv2/highgui.hpp>
#include "samples_utility.hpp"
#include <iostream>
using namespace std;
@@ -184,7 +185,7 @@ int main(int argc, char *argv[])
//Initialize the tracker and add targets
for (int i = 0; i < (int)boundingBoxes.size(); i++)
{
if (!mt.addTarget(frame, boundingBoxes[i], tracker_algorithm))
if (!mt.addTarget(frame, boundingBoxes[i], createTrackerByName(tracker_algorithm)))
{
cout << "Trackers Init Error!!!";
return 0;