# HG changeset patch # User Nicolas Saunier # Date 1403149247 14400 # Node ID ce4eaabacc2690d88fb49b175568cbd88f841be7 # Parent ce40a89bd6ae62879777cf9763541015b966933b modified internal implementation of user type for classifyUserTypeArea diff -r ce40a89bd6ae -r ce4eaabacc26 python/moving.py --- a/python/moving.py Wed Jun 18 23:36:56 2014 -0400 +++ b/python/moving.py Wed Jun 18 23:40:47 2014 -0400 @@ -918,13 +918,11 @@ self.projectedPositions = obj.positions.project(homography) else: self.projectedPositions = obj.positions - possibleUserTypes = {} - for userTypename in userTypenames: - possibleUserTypes[userTypename] = 0 + possibleUserTypes = {userType: 0 for userType in range(len(userTypenames))} for p in self.projectedPositions: for userTypename in areas: if areas[userTypename][p.x, p.y] != 0: - possibleUserTypes[userTypename] += 1 + possibleUserTypes[userType2Enum[userTypename]] += 1 # what to do: threshold for most common type? self.setUserType() return possibleUserTypes