zhengthomastang / 2018AICity_TeamUW

The winning method in Track 1 and Track 3 at the 2nd AI City Challenge Workshop in CVPR 2018 - Official Implementation
http://openaccess.thecvf.com/content_cvpr_2018_workshops/w3/html/Tang_Single-Camera_and_Inter-Camera_CVPR_2018_paper.html
550 stars 198 forks source link

draw direction of vehicle with colors #16

Open zongoalbert opened 4 years ago

zongoalbert commented 4 years ago

could you please explain how to add direction of vehicle in this project il this lines: // plot past trajectory nPltTrajLen = std::min(nPltTrajLenMax, (j + 1)); for (int k = j; k > (j - nPltTrajLen + 1); k--) cv::line(oImgFrm, vvoTrkNd[i][k].get2dFtPt(), vvoTrkNd[i][k - 1].get2dFtPt(), voBBoxClr[i % voBBoxClr.size()], 2);

zhengthomastang commented 4 years ago

The past trajectory of a vehicle (vvoTrkNd[i]) is saved as a vector/stack, where the head is the vehicle location at the current frame. Basically, we use OpenCV to plot a colored line between each two vehicle locations at continuous timestamps in the past. nPltTrajLen is the length of a past trajectory to plot. The maximum length of the tail is nPltTrajLenMax.