Fix a bug in the draw function of CenterTrack.

Signed-off-by: Davide Sapienza <sapienza.dav@gmail.com>
This commit is contained in:
Davide Sapienza
2021-05-03 18:56:07 +02:00
parent ff6e0e010a
commit d1ae1791d9
+1 -1
View File
@@ -749,7 +749,7 @@ void CenternetDetection3DTrack::draw(std::vector<cv::Mat>& frames) {
int thickness = 2;
for(int bi=0; bi<frames.size(); ++bi) {
// draw dets
for(int i=0; i<tr_res[bi].size(); i++) {
for(int i=0; tr_res.size() != 0 && i<tr_res[bi].size(); i++) {
t = tr_res[bi][i];
id = t.tracking_id;
txt = classesNames[t.det_res.cl-1]+'-'+std::to_string(id); //forse ha bisogno di cl-1