comparison python/moving.py @ 664:455f9b93819c

added capability to set a videofilename to movingobject and interaction, renames interactiontype to collision in interaction
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 20 May 2015 12:04:22 +0200
parents 65a867942eee
children 15e244d2a1b5
comparison
equal deleted inserted replaced
663:65a867942eee 664:455f9b93819c
1 #! /usr/bin/env python 1 #! /usr/bin/env python
2 '''Libraries for moving objects, trajectories...''' 2 '''Libraries for moving objects, trajectories...'''
3 3
4 import utils 4 import utils, cvutils
5 import cvutils 5 from storage import VideoFilenameAddable
6 6
7 from math import sqrt 7 from math import sqrt
8 from numpy import median 8 from numpy import median
9 9
10 try: 10 try:
972 'bus', 972 'bus',
973 'truck'] 973 'truck']
974 974
975 userType2Num = utils.inverseEnumeration(userTypeNames) 975 userType2Num = utils.inverseEnumeration(userTypeNames)
976 976
977 class MovingObject(STObject): 977 class MovingObject(STObject, VideoFilenameAddable):
978 '''Class for moving objects: a spatio-temporal object 978 '''Class for moving objects: a spatio-temporal object
979 with a trajectory and a geometry (constant volume over time) 979 with a trajectory and a geometry (constant volume over time)
980 and a usertype (e.g. road user) coded as a number (see userTypeNames) 980 and a usertype (e.g. road user) coded as a number (see userTypeNames)
981 ''' 981 '''
982 982