Mercurial Hosting > traffic-intelligence
diff scripts/compute-homography.py @ 773:bf4a1790cfac dev
minor bug and improvements
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Mon, 01 Feb 2016 16:10:26 -0500 |
parents | 0421a5a0072c |
children | 1fdafa9f6bf4 |
line wrap: on
line diff
--- a/scripts/compute-homography.py Fri Jan 29 17:43:57 2016 -0500 +++ b/scripts/compute-homography.py Mon Feb 01 16:10:26 2016 -0500 @@ -100,10 +100,12 @@ print('Click on {0} points in the video frame'.format(args.nPoints)) plt.figure() plt.imshow(videoImg) + plt.tight_layout() videoPts = np.array(plt.ginput(args.nPoints, timeout=3000)) print('Click on {0} points in the world image'.format(args.nPoints)) plt.figure() plt.imshow(worldImg) + plt.tight_layout() worldPts = args.unitsPerPixel*np.array(plt.ginput(args.nPoints, timeout=3000)) plt.close('all') homography, mask = cv2.findHomography(videoPts, worldPts)