comparison python/moving.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 93633ce122c3
comparison
equal deleted inserted replaced
664:455f9b93819c 665:15e244d2a1b5
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, cvutils 4 import utils, cvutils
5 from storage import VideoFilenameAddable 5 from base 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:
13 shapelyAvailable = True 13 shapelyAvailable = True
14 except ImportError: 14 except ImportError:
15 print('Shapely library could not be loaded') 15 print('Shapely library could not be loaded')
16 shapelyAvailable = False 16 shapelyAvailable = False
17 17
18 __metaclass__ = type
19 18
20 class Interval(object): 19 class Interval(object):
21 '''Generic interval: a subset of real numbers (not iterable)''' 20 '''Generic interval: a subset of real numbers (not iterable)'''
22 def __init__(self, first=0, last=-1, revert = False): 21 def __init__(self, first=0, last=-1, revert = False):
23 if revert and last<first: 22 if revert and last<first: