1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-20 12:55:15 +08:00

tracking: make datasets dependancy optional

added error msg for samples
This commit is contained in:
berak
2016-11-22 11:10:49 +01:00
parent b7dcf14150
commit e2c4574f73
3 changed files with 31 additions and 3 deletions

View File

@@ -39,6 +39,10 @@
//
//M*/
#include "opencv2/opencv_modules.hpp"
#include "opencv2/core.hpp"
#ifdef HAVE_OPENCV_DATASETS
#include "opencv2/datasets/track_vot.hpp"
#include <opencv2/core/utility.hpp>
#include <opencv2/tracking.hpp>
@@ -227,4 +231,11 @@ int main(int argc, char *argv[])
waitKey(0);
return 0;
}
}
#else // ! HAVE_OPENCV_DATASETS
int main() {
CV_Error(cv::Error::StsNotImplemented , "this sample needs to be built with opencv_datasets !");
return -1;
}
#endif // HAVE_OPENCV_DATASETS