mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-20 04:25:42 +08:00
tracking: make datasets dependancy optional
added error msg for samples
This commit is contained in:
@@ -39,6 +39,14 @@
|
||||
//
|
||||
//M*/
|
||||
|
||||
|
||||
//
|
||||
// !!! this sample requires the opencv_datasets module !!!
|
||||
//
|
||||
|
||||
#include "opencv2/opencv_modules.hpp"
|
||||
#ifdef HAVE_OPENCV_DATASETS
|
||||
|
||||
#include "opencv2/datasets/track_vot.hpp"
|
||||
#include <opencv2/core/utility.hpp>
|
||||
#include <opencv2/tracking.hpp>
|
||||
@@ -221,4 +229,13 @@ 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
|
||||
|
Reference in New Issue
Block a user