changeset 870:1535251a1f40

change consistent with method added to MovingObject
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Fri, 03 Feb 2017 16:15:06 -0500
parents eb2f8ce2b39d
children 6db83beb5350
files scripts/learn-motion-patterns.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/learn-motion-patterns.py	Fri Feb 03 14:16:36 2017 -0500
+++ b/scripts/learn-motion-patterns.py	Fri Feb 03 16:15:06 2017 -0500
@@ -37,8 +37,7 @@
 if args.trajectoryType == 'objectfeatures':
     features = []
     for o in objects:
-        tmp = utils.sortByLength(o.getFeatures(), reverse = True)
-        features += tmp[:min(len(tmp), args.maxNObjectFeatures)]
+        o.getNLongestFeatures(args.maxNObjectFeatures)
     objects = features
 
 trajectories = [o.getPositions().asArray().T for o in objects]