| | |
| | | #endif |
| | | |
| | | // To use tracking - uncomment the following line. Tracking is supported only by OpenCV 3.x |
| | | #define TRACK_OPTFLOW |
| | | //#define TRACK_OPTFLOW |
| | | |
| | | #include "yolo_v2_class.hpp" // imported functions from DLL |
| | | |
| | |
| | | }; |
| | | |
| | | |
| | | #ifdef OPENCV |
| | | #ifdef TRACK_OPTFLOW |
| | | |
| | | #if defined(TRACK_OPTFLOW) && defined(OPENCV) |
| | | |
| | | #include <opencv2/cudaoptflow.hpp> |
| | | #include <opencv2/cudaimgproc.hpp> |
| | |
| | | |
| | | class Tracker_optflow {}; |
| | | |
| | | #endif // TRACK_OPTFLOW |
| | | #endif // defined(TRACK_OPTFLOW) && defined(OPENCV) |
| | | |
| | | |
| | | #ifdef OPENCV |
| | | |
| | | cv::Scalar obj_id_to_color(int obj_id) { |
| | | int const colors[6][3] = { { 1,0,1 },{ 0,0,1 },{ 0,1,1 },{ 0,1,0 },{ 1,1,0 },{ 1,0,0 } }; |
| | | int const offset = obj_id * 123457 % 6; |
| | |
| | | } |
| | | }; |
| | | #endif // OPENCV |
| | | |