Mercurial Hosting > traffic-intelligence
diff python/cvutils.py @ 638:852f5de42d01
added functionality to read Aliaksei Tsai camera model data
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Wed, 08 Apr 2015 16:07:15 +0200 |
parents | 3058e00887bc |
children | 4e7925cb4f8f |
line wrap: on
line diff
--- a/python/cvutils.py Thu Apr 02 15:53:59 2015 +0200 +++ b/python/cvutils.py Wed Apr 08 16:07:15 2015 +0200 @@ -277,7 +277,7 @@ else: print 'Cannot load file ' + videoFilename - def computeHomographyFromPDTV(cameraFilename, method=0, ransacReprojThreshold=3.0): + def computeHomographyFromPDTV(cameraFilename): '''Returns the homography matrix at ground level from PDTV format https://bitbucket.org/hakanardo/pdtv''' import pdtv @@ -288,7 +288,7 @@ for srcPoint in srcPoints: projected = camera.image_to_world(tuple(srcPoint)) dstPoints.append([projected[0], projected[1]]) - H, mask = cv2.findHomography(array(srcPoints), array(dstPoints), method, ransacReprojThreshold) + H, mask = cv2.findHomography(array(srcPoints), array(dstPoints), method = 0) # No need for different methods for finding homography return H def undistortedCoordinates(map1, map2, x, y, maxDistance = 1.):