Mercurial Hosting > traffic-intelligence
diff python/cvutils.py @ 491:343cfd185ca6
minor changes and reaarrangements
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Wed, 16 Apr 2014 17:43:53 -0400 |
parents | f6415f012640 |
children | c81cbd6953fb 935430b1d408 |
line wrap: on
line diff
--- a/python/cvutils.py Fri Apr 11 17:47:55 2014 -0400 +++ b/python/cvutils.py Wed Apr 16 17:43:53 2014 -0400 @@ -377,6 +377,10 @@ undistortedTrajectory[1].append(y) return undistortedTrajectory +def projectGInputPoints(homography, points): + from numpy import array + return projectTrajectory(homography, array(points+[points[0]]).T) + if opencvAvailable: def computeTranslation(img1, img2, img1Points, maxTranslation2, minNMatches, windowSize = (5,5), level = 5, criteria = (cv2.TERM_CRITERIA_EPS, 0, 0.01)): '''Computes the translation of img2 with respect to img1