Mercurial Hosting > traffic-intelligence
comparison python/moving.py @ 996:add667153087
updated feature tracker to opencv 3
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Fri, 25 May 2018 14:23:56 -0400 |
parents | 349cd5e73f79 |
children | 4f3387a242a1 c90c4682c67e |
comparison
equal
deleted
inserted
replaced
995:349cd5e73f79 | 996:add667153087 |
---|---|
3 | 3 |
4 import utils, cvutils | 4 import utils, cvutils |
5 from base import VideoFilenameAddable | 5 from base import VideoFilenameAddable |
6 | 6 |
7 from math import sqrt, atan2, cos, sin | 7 from math import sqrt, atan2, cos, sin |
8 from numpy import median, array, arange, zeros, ones, hypot, NaN, std, floor, float32, argwhere, minimum | 8 from numpy import median, mean, array, arange, zeros, ones, hypot, NaN, std, floor, float32, argwhere, minimum |
9 from matplotlib.pyplot import plot, text | 9 from matplotlib.pyplot import plot, text |
10 from scipy.stats import scoreatpercentile | 10 from scipy.stats import scoreatpercentile |
11 from scipy.spatial.distance import cdist | 11 from scipy.spatial.distance import cdist |
12 from scipy.signal import savgol_filter | 12 from scipy.signal import savgol_filter |
13 | 13 |
1131 self.userType = userType | 1131 self.userType = userType |
1132 self.features = None | 1132 self.features = None |
1133 # compute bounding polygon from trajectory | 1133 # compute bounding polygon from trajectory |
1134 | 1134 |
1135 @staticmethod | 1135 @staticmethod |
1136 def aggregateTrajectory(features, aggFunc = np.mean): | 1136 def aggregateTrajectory(features, aggFunc = mean): |
1137 'Computes the aggregate trajectory from list of MovingObject features' | 1137 'Computes the aggregate trajectory from list of MovingObject features' |
1138 return None | 1138 return None |
1139 | 1139 |
1140 @staticmethod | 1140 @staticmethod |
1141 def generate(num, p, v, timeInterval): | 1141 def generate(num, p, v, timeInterval): |