Mercurial > hg > nsaunier > traffic-intelligence
comparison python/moving.py @ 318:82a8fba99bec
minor
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Sun, 21 Apr 2013 22:38:16 -0400 |
| parents | d280b881e860 |
| children | 42f2b46ec210 |
comparison
equal
deleted
inserted
replaced
| 317:d280b881e860 | 318:82a8fba99bec |
|---|---|
| 398 plot(positions[0][:lastCoordinate:timeStep], positions[1][:lastCoordinate:timeStep], options, **kwargs) | 398 plot(positions[0][:lastCoordinate:timeStep], positions[1][:lastCoordinate:timeStep], options, **kwargs) |
| 399 if withOrigin: | 399 if withOrigin: |
| 400 plot([positions[0][0]], [positions[1][0]], 'ro', **kwargs) | 400 plot([positions[0][0]], [positions[1][0]], 'ro', **kwargs) |
| 401 | 401 |
| 402 def project(self, homography): | 402 def project(self, homography): |
| 403 from numpy.core.multiarray import array | 403 return Trajectory(cvutils.projectTrajectory(homography, self.positions)) |
| 404 projected = cvutils.projectArray(homography, array(self.positions)) | |
| 405 return Trajectory(projected) | |
| 406 | 404 |
| 407 def draw(self, options = '', withOrigin = False, timeStep = 1, **kwargs): | 405 def draw(self, options = '', withOrigin = False, timeStep = 1, **kwargs): |
| 408 Trajectory._draw(self.positions, options, withOrigin, None, timeStep, **kwargs) | 406 Trajectory._draw(self.positions, options, withOrigin, None, timeStep, **kwargs) |
| 409 | 407 |
| 410 def drawAt(self, lastCoordinate, options = '', withOrigin = False, timeStep = 1, **kwargs): | 408 def drawAt(self, lastCoordinate, options = '', withOrigin = False, timeStep = 1, **kwargs): |
