Mercurial Hosting > traffic-intelligence
changeset 621:582508610572
merge and updated consistently that imageheight does not seem necessary anymore for plotting on world image
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Wed, 10 Dec 2014 15:29:57 -0500 |
parents | dc2d0a0d7fe1 (current diff) aee4cbac9e0e (diff) |
children | dc8490726d06 |
files | python/moving.py |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/python/moving.py Wed Dec 10 15:27:08 2014 -0500 +++ b/python/moving.py Wed Dec 10 15:29:57 2014 -0500 @@ -684,11 +684,10 @@ def plotAt(self, lastCoordinate, options = '', withOrigin = False, timeStep = 1, **kwargs): Trajectory._plot(self.positions, options, withOrigin, lastCoordinate, timeStep, **kwargs) - def plotOnWorldImage(self, nPixelsPerUnitDistance, imageHeight, options = '', withOrigin = False, timeStep = 1, **kwargs): - from matplotlib.pylab import plot + def plotOnWorldImage(self, nPixelsPerUnitDistance, options = '', withOrigin = False, timeStep = 1, **kwargs): imgPositions = [[x*nPixelsPerUnitDistance for x in self.positions[0]], - [-x*nPixelsPerUnitDistance+imageHeight for x in self.positions[1]]] - Trajectory._plot(imgPositions, options, withOrigin, timeStep, **kwargs) + [x*nPixelsPerUnitDistance for x in self.positions[1]]] + Trajectory._plot(imgPositions, options, withOrigin, None, timeStep, **kwargs) def getXCoordinates(self): return self.positions[0] @@ -1014,8 +1013,8 @@ else: self.positions.plot(options, withOrigin, timeStep, **kwargs) - def plotOnWorldImage(self, nPixelsPerUnitDistance, imageHeight, options = '', withOrigin = False, timeStep = 1, **kwargs): - self.positions.plotOnWorldImage(nPixelsPerUnitDistance, imageHeight, options, withOrigin, timeStep, **kwargs) + def plotOnWorldImage(self, nPixelsPerUnitDistance, options = '', withOrigin = False, timeStep = 1, **kwargs): + self.positions.plotOnWorldImage(nPixelsPerUnitDistance, options, withOrigin, timeStep, **kwargs) def play(self, videoFilename, homography = None): cvutils.displayTrajectories(videoFilename, [self], homography, self.getFirstInstant(), self.getLastInstant())