Improved SORT algorithm and fixed bug when cutting clips

This commit is contained in:
Brenno
2020-07-29 19:56:44 -03:00
parent a8d877cb3b
commit 58d2e8fe07
2 changed files with 67 additions and 59 deletions

View File

@@ -174,6 +174,9 @@ bool ObjectDetection::LoadObjDetectdData(std::string inputFilePath){
classNames.clear();
detectionsData.clear();
// Seed to generate same random numbers
std::srand(1);
// Get all classes names and assign a color to them
for(int i = 0; i < objMessage.classnames_size(); i++){
classNames.push_back(objMessage.classnames(i));
classesColor.push_back(cv::Scalar(std::rand()%205 + 50, std::rand()%205 + 50, std::rand()%205 + 50));