Mercurial > hg > nsaunier > traffic-intelligence
comparison scripts/display-synced-trajectories.py @ 868:1fdafa9f6bf4
added colors more friendly for color blind people (thanks Ryan Louie!)
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Wed, 01 Feb 2017 11:58:04 -0500 |
| parents | 75530d8c0090 |
| children | 56cc8a1f7082 |
comparison
equal
deleted
inserted
replaced
| 867:003445db1e30 | 868:1fdafa9f6bf4 |
|---|---|
| 99 if i not in obj.projectedPositions: | 99 if i not in obj.projectedPositions: |
| 100 if homographies[i] is not None: | 100 if homographies[i] is not None: |
| 101 obj.projectedPositions[i] = obj.positions.project(homographies[i]) | 101 obj.projectedPositions[i] = obj.positions.project(homographies[i]) |
| 102 else: | 102 else: |
| 103 obj.projectedPositions[i] = obj.positions | 103 obj.projectedPositions[i] = obj.positions |
| 104 cvutils.cvPlot(images[i], obj.projectedPositions[i], cvutils.cvColors[obj.getNum()], int(mergedFirstFrameNum+nFramesShown)-obj.getFirstInstant()) | 104 cvutils.cvPlot(images[i], obj.projectedPositions[i], cvutils.cvColors['default'][obj.getNum()], int(mergedFirstFrameNum+nFramesShown)-obj.getFirstInstant()) |
| 105 | 105 |
| 106 #if text is not None: | 106 #if text is not None: |
| 107 # cv2.putText(images[i], text, (10,50), cv2.FONT_HERSHEY_PLAIN, 1, cvRed) | 107 # cv2.putText(images[i], text, (10,50), cv2.FONT_HERSHEY_PLAIN, 1, cvRed['default']) |
| 108 cvutils.cvImshow(windowNames[i], images[i], rescale) # cv2.imshow('frame', img) | 108 cvutils.cvImshow(windowNames[i], images[i], rescale) # cv2.imshow('frame', img) |
| 109 key = cv2.waitKey(wait) | 109 key = cv2.waitKey(wait) |
| 110 #if cvutils.saveKey(key): | 110 #if cvutils.saveKey(key): |
| 111 # cv2.imwrite('image-{}.png'.format(frameNum), img) | 111 # cv2.imwrite('image-{}.png'.format(frameNum), img) |
| 112 nFramesShown += args.step | 112 nFramesShown += args.step |
