Mercurial Hosting > traffic-intelligence
diff python/cvutils.py @ 204:966c2cd2bd9f
added code to load object trajectories (average of features)
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 06 Mar 2012 18:44:03 -0500 |
parents | e2f31813ade6 |
children | 51acf43e421a |
line wrap: on
line diff
--- a/python/cvutils.py Tue Mar 06 18:10:19 2012 -0500 +++ b/python/cvutils.py Tue Mar 06 18:44:03 2012 -0500 @@ -133,6 +133,7 @@ if homography != None and obj.getFirstInstant() == frameNum: obj.projectedPositions = obj.positions.project(homography) draw(img, obj.projectedPositions, cvRed, frameNum-obj.getFirstInstant()) + cv2.putText(img, '{0}'.format(obj.num), obj.projectedPositions[frameNum-obj.getFirstInstant()].astuple(), cv2.FONT_HERSHEY_PLAIN, 1, cvRed) cv2.imshow('frame', img) key = cv2.waitKey(50) frameNum += 1