Changed definition location to adhere to compatability promises

This commit is contained in:
Howard Stark
2018-02-19 14:26:53 -08:00
parent 892860e84e
commit d8b59fcafe
2 changed files with 8 additions and 13 deletions

View File

@ -453,7 +453,14 @@ class Tracker_optflow {};
#ifdef OPENCV
cv::Scalar obj_id_to_color(int obj_id);
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;
int const color_scale = 150 + (obj_id * 123457) % 100;
cv::Scalar color(colors[offset][0], colors[offset][1], colors[offset][2]);
color *= color_scale;
return color;
}
class preview_boxes_t {
enum { frames_history = 30 }; // how long to keep the history saved