Mercurial Hosting > traffic-intelligence
comparison python/moving.py @ 935:0e63a918a1ca
updated classify-objects
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Fri, 14 Jul 2017 16:30:57 -0400 |
parents | 8ac7f61c6e4f |
children | 56cc8a1f7082 |
comparison
equal
deleted
inserted
replaced
934:39691b460fca | 935:0e63a918a1ca |
---|---|
1579 return userType2Num['car'] | 1579 return userType2Num['car'] |
1580 self.appearanceClassifier = CarClassifier() | 1580 self.appearanceClassifier = CarClassifier() |
1581 # project feature positions | 1581 # project feature positions |
1582 if self.hasFeatures(): | 1582 if self.hasFeatures(): |
1583 for f in self.getFeatures(): | 1583 for f in self.getFeatures(): |
1584 pp = cvutils.projectArray(homography, f.getPositions().asArray(), intrinsicCameraMatrix, array(distortionCoefficients)).tolist() | 1584 pp = cvutils.worldToImageProject(f.getPositions().asArray(), intrinsicCameraMatrix, distortionCoefficients, homography).tolist() |
1585 f.positions = Trajectory(pp) | 1585 f.positions = Trajectory(pp) |
1586 self.userTypes = {} | 1586 self.userTypes = {} |
1587 | 1587 |
1588 def classifyUserTypeHoGSVMAtInstant(self, img, instant, width, height, px, py, minNPixels, rescaleSize, orientations, pixelsPerCell, cellsPerBlock, blockNorm): | 1588 def classifyUserTypeHoGSVMAtInstant(self, img, instant, width, height, px, py, minNPixels, rescaleSize, orientations, pixelsPerCell, cellsPerBlock, blockNorm): |
1589 '''Extracts the image box around the object | 1589 '''Extracts the image box around the object |