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

Update for multiTracker_test.cpp->multiTracker_dataset.cpp

Sample has been renamed: tld_test.cpp->tracker_dataset.cpp
Updated to read parameters from cmd:
-Algorithm name
-Root dataset path
-Dataset ID
-Number of targets to track
This commit is contained in:
Vladimir
2015-08-22 01:41:44 +09:00
parent 37fc046c82
commit 1e7d9e0548
3 changed files with 233 additions and 18 deletions

View File

@@ -152,22 +152,8 @@ int main(int argc, char *argv[])
//Read first frame
dataset->getNextFrame(frame);
frame.copyTo(image);
// Setup output video
#ifdef RECORD_VIDEO_FLG
String outputFilename = "test.avi";
VideoWriter outputVideo;
outputVideo.open(outputFilename, -1, 15, Size(image.cols, image.rows));
if (!outputVideo.isOpened())
{
std::cout << "!!! Output video could not be opened" << std::endl;
getchar();
return 0;
}
#endif
rectangle(image, boundingBox, Scalar(255, 0, 0), 2, 1);
for (int i = 0; i < (int)boundingBoxes.size(); i++)
rectangle(image, boundingBoxes[i], Scalar(255, 0, 0), 2, 1);
imshow("Tracking API", image);
bool initialized = false;
@@ -220,7 +206,6 @@ int main(int argc, char *argv[])
int64 e2 = getTickCount();
double t1 = (e2 - e1) / getTickFrequency();
cout << frameCounter << "\tframe : " << t1 * 1000.0 << "ms" << endl;
//waitKey(0);
}
char c = (char)waitKey(2);