# HG changeset patch # User Nicolas Saunier # Date 1418243397 18000 # Node ID 582508610572eb7f8d2ea5073948efa9e2b7f266 # Parent dc2d0a0d7fe113816a8ff932ff734a317480dc04# Parent aee4cbac9e0ee57648a2389de150ed039c5e026f merge and updated consistently that imageheight does not seem necessary anymore for plotting on world image diff -r dc2d0a0d7fe1 -r 582508610572 python/moving.py --- 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())