Mercurial > hg > nsaunier > traffic-intelligence
comparison python/events.py @ 665:15e244d2a1b5
corrected bug with circular import for VideoFilenameAddable, moved to base module
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Wed, 20 May 2015 13:57:47 +0200 |
| parents | 455f9b93819c |
| children | fa9aa5f08210 |
comparison
equal
deleted
inserted
replaced
| 664:455f9b93819c | 665:15e244d2a1b5 |
|---|---|
| 1 #! /usr/bin/env python | 1 #! /usr/bin/env python |
| 2 '''Libraries for events | 2 '''Libraries for events |
| 3 Interactions, pedestrian crossing...''' | 3 Interactions, pedestrian crossing...''' |
| 4 | 4 |
| 5 import moving, prediction, indicators, utils, cvutils | |
| 6 from base import VideoFilenameAddable | |
| 7 | |
| 5 import numpy as np | 8 import numpy as np |
| 6 from numpy import arccos | 9 from numpy import arccos |
| 7 | 10 |
| 8 import multiprocessing | 11 import multiprocessing |
| 9 import itertools | 12 import itertools |
| 10 | 13 |
| 11 import moving, prediction, indicators, utils, cvutils | |
| 12 from storage import VideoFilenameAddable | |
| 13 __metaclass__ = type | |
| 14 | 14 |
| 15 def findRoute(prototypes,objects,i,j,noiseEntryNums,noiseExitNums,minSimilarity= 0.3, spatialThreshold=1.0, delta=180): | 15 def findRoute(prototypes,objects,i,j,noiseEntryNums,noiseExitNums,minSimilarity= 0.3, spatialThreshold=1.0, delta=180): |
| 16 if i[0] not in noiseEntryNums: | 16 if i[0] not in noiseEntryNums: |
| 17 prototypesRoutes= [ x for x in sorted(prototypes.keys()) if i[0]==x[0]] | 17 prototypesRoutes= [ x for x in sorted(prototypes.keys()) if i[0]==x[0]] |
| 18 elif i[1] not in noiseExitNums: | 18 elif i[1] not in noiseExitNums: |
