Mercurial Hosting > traffic-intelligence
diff python/moving.py @ 993:e8eabef7857c
update to OpenCV3 for python
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Wed, 16 May 2018 21:06:52 -0400 |
parents | f026ce2af637 |
children | 8118c6b77d7c |
line wrap: on
line diff
--- a/python/moving.py Fri Apr 13 16:48:02 2018 -0400 +++ b/python/moving.py Wed May 16 21:06:52 2018 -0400 @@ -1641,7 +1641,7 @@ croppedImg = cvutils.imageBox(img, self, instant, width, height, px, py, minNPixels) if croppedImg is not None and len(croppedImg) > 0: hog = cvutils.HOG(croppedImg, rescaleSize, orientations, pixelsPerCell, cellsPerBlock, blockNorm) - self.userTypes[instant] = int(self.appearanceClassifier.predict(hog)) + self.userTypes[instant] = self.appearanceClassifier.predict(hog.reshape(1,hog.size)) else: self.userTypes[instant] = userType2Num['unknown']