Mercurial > hg > nsaunier > traffic-intelligence
comparison scripts/dltrack.py @ 1298:f4d4bb9ec34f
minor bug
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Tue, 25 Mar 2025 11:03:38 -0400 |
| parents | d073524de272 |
| children | 4bc0651d91f9 |
comparison
equal
deleted
inserted
replaced
| 1297:c15b9fcdbcb1 | 1298:f4d4bb9ec34f |
|---|---|
| 234 for f in obj.getFeatures(): | 234 for f in obj.getFeatures(): |
| 235 if f.length() != len(f.tmpPositions): # interpolate | 235 if f.length() != len(f.tmpPositions): # interpolate |
| 236 f.positions = moving.Trajectory.fromPointDict(f.tmpPositions) | 236 f.positions = moving.Trajectory.fromPointDict(f.tmpPositions) |
| 237 else: | 237 else: |
| 238 f.positions = moving.Trajectory.fromPointList(list(f.tmpPositions.values())) | 238 f.positions = moving.Trajectory.fromPointList(list(f.tmpPositions.values())) |
| 239 if not args.notSavingImageCoordinates: | 239 #if not args.notSavingImageCoordinates: storage.saveTrajectoriesToSqlite(utils.removeExtension(databaseFilename)+'-bb.sqlite', list(objects.values()), 'object') # to be changed as bbox will be saved by default |
| 240 storage.saveTrajectoriesToSqlite(utils.removeExtension(databaseFilename)+'-bb.sqlite', list(objects.values()), 'object') | |
| 241 # project and smooth | 240 # project and smooth |
| 242 for num, obj in objects.items(): | 241 for num, obj in objects.items(): |
| 243 features = obj.getFeatures() | 242 features = obj.getFeatures() |
| 244 # possible to save bottom pedestrians? not consistent with other users | 243 # possible to save bottom pedestrians? not consistent with other users |
| 245 # if moving.userTypeNames[obj.getUserType()] == 'pedestrian': | 244 # if moving.userTypeNames[obj.getUserType()] == 'pedestrian': |
