Mercurial Hosting > traffic-intelligence
comparison trafficintelligence/moving.py @ 1030:aafbc0bab925
moved method around to avoid cross-dependencies
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 19 Jun 2018 10:04:52 -0400 |
parents | c6cf75a2ed08 |
children | 933588568bec |
comparison
equal
deleted
inserted
replaced
1029:c6cf75a2ed08 | 1030:aafbc0bab925 |
---|---|
7 from numpy import median, mean, array, arange, zeros, ones, hypot, NaN, std, floor, float32, argwhere, minimum | 7 from numpy import median, mean, array, arange, zeros, ones, hypot, NaN, std, floor, float32, argwhere, minimum |
8 from matplotlib.pyplot import plot, text | 8 from matplotlib.pyplot import plot, text |
9 from scipy.stats import scoreatpercentile | 9 from scipy.stats import scoreatpercentile |
10 from scipy.spatial.distance import cdist | 10 from scipy.spatial.distance import cdist |
11 from scipy.signal import savgol_filter | 11 from scipy.signal import savgol_filter |
12 | |
13 from trafficintelligence import utils, cvutils | |
14 from trafficintelligence.base import VideoFilenameAddable | |
15 | 12 |
16 try: | 13 try: |
17 from shapely.geometry import Polygon, Point as shapelyPoint | 14 from shapely.geometry import Polygon, Point as shapelyPoint |
18 from shapely.prepared import prep, PreparedGeometry | 15 from shapely.prepared import prep, PreparedGeometry |
19 shapelyAvailable = True | 16 shapelyAvailable = True |
20 except ImportError: | 17 except ImportError: |
21 print('Shapely library could not be loaded') | 18 print('Shapely library could not be loaded') |
22 shapelyAvailable = False | 19 shapelyAvailable = False |
20 | |
21 from trafficintelligence import utils, cvutils | |
22 from trafficintelligence.base import VideoFilenameAddable | |
23 | 23 |
24 | 24 |
25 class Interval(object): | 25 class Interval(object): |
26 '''Generic interval: a subset of real numbers (not iterable)''' | 26 '''Generic interval: a subset of real numbers (not iterable)''' |
27 def __init__(self, first=0, last=-1, revert = False): | 27 def __init__(self, first=0, last=-1, revert = False): |