Mercurial Hosting > traffic-intelligence
diff python/moving.py @ 933:8ac7f61c6e4f
major rework of homography calibration, no in ideal points if correcting for distortion
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Fri, 14 Jul 2017 02:11:21 -0400 |
parents | be28a3538dc9 |
children | 0e63a918a1ca |
line wrap: on
line diff
--- a/python/moving.py Fri Jul 14 00:12:03 2017 -0400 +++ b/python/moving.py Fri Jul 14 02:11:21 2017 -0400 @@ -742,9 +742,12 @@ plot([positions[0][0]], [positions[1][0]], 'ro', **kwargs) if objNum is not None: text(positions[0][0], positions[1][0], '{}'.format(objNum)) - - def project(self, homography): - return Trajectory(cvutils.projectTrajectory(homography, self.positions).tolist()) + + def homographyProject(self, homography): + return Trajectory(cvutils.homographyProject(array(self.positions), homography).tolist()) + + def newCameraProject(self, newCameraMatrix): + return Trajectory(cvutils.newCameraProject(array(self.positions), newCameraMatrix).tolist()) def plot(self, options = '', withOrigin = False, timeStep = 1, objNum = None, **kwargs): Trajectory._plot(self.positions, options, withOrigin, None, timeStep, objNum, **kwargs)