Mercurial Hosting > traffic-intelligence
comparison python/moving.py @ 662:72174e66aba5
corrected bug that increased TTC by 1 frame and structure to store collision points and crossing zones
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Mon, 18 May 2015 17:17:06 +0200 |
parents | dc70d9e711f5 |
children | 65a867942eee |
comparison
equal
deleted
inserted
replaced
661:dc70d9e711f5 | 662:72174e66aba5 |
---|---|
986 self.velocities = velocities | 986 self.velocities = velocities |
987 self.geometry = geometry | 987 self.geometry = geometry |
988 self.userType = userType | 988 self.userType = userType |
989 self.features = None | 989 self.features = None |
990 # compute bounding polygon from trajectory | 990 # compute bounding polygon from trajectory |
991 | 991 |
992 @staticmethod | 992 @staticmethod |
993 def generate(p, v, timeInterval): | 993 def generate(p, v, timeInterval): |
994 positions, velocities = Trajectory.generate(p, v, int(timeInterval.length())) | 994 positions, velocities = Trajectory.generate(p, v, int(timeInterval.length())) |
995 return MovingObject(timeInterval = timeInterval, positions = positions, velocities = velocities) | 995 return MovingObject(timeInterval = timeInterval, positions = positions, velocities = velocities) |
996 | 996 |