Mercurial Hosting > traffic-intelligence
changeset 699:8dd738fc7375
improvement by Adrien Lessard to choose output homography filename
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Fri, 17 Jul 2015 14:28:59 -0400 |
parents | 576d9ea4b41a |
children | 0f1b6907643a 7efa36b9bcfd |
files | scripts/compute-homography.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/compute-homography.py Thu Jun 04 16:04:58 2015 +0200 +++ b/scripts/compute-homography.py Fri Jul 17 14:28:59 2015 -0400 @@ -26,6 +26,7 @@ parser.add_argument('-w', dest = 'worldFilename', help = 'filename of the aerial photo/ground map') parser.add_argument('-n', dest = 'nPoints', help = 'number of corresponding points to input', default = 4, type = int) parser.add_argument('-u', dest = 'unitsPerPixel', help = 'number of units per pixel', default = 1., type = float) +parser.add_argument('-o', dest = 'homographyFilename', help = 'filename of the homography matrix', default = 'homography.txt') parser.add_argument('--display', dest = 'displayPoints', help = 'display original and projected points on both images', action = 'store_true') parser.add_argument('--intrinsic', dest = 'intrinsicCameraMatrixFilename', help = 'name of the intrinsic camera file') parser.add_argument('--distortion-coefficients', dest = 'distortionCoefficients', help = 'distortion coefficients', nargs = '*', type = float) @@ -113,7 +114,7 @@ f.close() if homography.size>0: - np.savetxt('homography.txt',homography) + np.savetxt(args.homographyFilename,homography) if args.displayPoints and args.videoFrameFilename is not None and args.worldFilename is not None and homography.size>0 and args.tsaiCameraFilename is None: worldImg = cv2.imread(args.worldFilename)