Mercurial Hosting > traffic-intelligence
comparison python/cvutils.py @ 673:5505f9dbb28e
corrected import bug
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 26 May 2015 15:02:47 +0200 |
parents | 5473b7460375 |
children | da1352b89d02 |
comparison
equal
deleted
inserted
replaced
672:5473b7460375 | 673:5505f9dbb28e |
---|---|
481 return projectArray(homography, array(trajectory)) | 481 return projectArray(homography, array(trajectory)) |
482 | 482 |
483 def invertHomography(homography): | 483 def invertHomography(homography): |
484 '''Returns an inverted homography | 484 '''Returns an inverted homography |
485 Unnecessary for reprojection over camera image''' | 485 Unnecessary for reprojection over camera image''' |
486 from numpy import inv | 486 from numpy.linalg import inv |
487 invH = inv(homography) | 487 invH = inv(homography) |
488 invH /= invH[2,2] | 488 invH /= invH[2,2] |
489 return invH | 489 return invH |
490 | 490 |
491 def undistortTrajectory(invMap1, invMap2, positions): | 491 def undistortTrajectory(invMap1, invMap2, positions): |