Mercurial > hg > nsaunier > traffic-intelligence
comparison scripts/compute-homography.py @ 934:39691b460fca
bug correction
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Fri, 14 Jul 2017 15:36:59 -0400 |
| parents | 8ac7f61c6e4f |
| children | 0c1d1eeef544 |
comparison
equal
deleted
inserted
replaced
| 933:8ac7f61c6e4f | 934:39691b460fca |
|---|---|
| 55 plt.figure() | 55 plt.figure() |
| 56 plt.imshow(videoImg) | 56 plt.imshow(videoImg) |
| 57 plt.tight_layout() | 57 plt.tight_layout() |
| 58 videoPts = np.array(plt.ginput(args.nPoints, timeout=3000)) | 58 videoPts = np.array(plt.ginput(args.nPoints, timeout=3000)) |
| 59 if args.undistort: | 59 if args.undistort: |
| 60 videoPts = cvutils.newCameraProject(videoPts, np.linalg.inv(newCameraMatrix)) | 60 videoPts = cvutils.newCameraProject(videoPts.T, np.linalg.inv(newCameraMatrix)).T |
| 61 print('Click on {} points in the world image'.format(args.nPoints)) | 61 print('Click on {} points in the world image'.format(args.nPoints)) |
| 62 plt.figure() | 62 plt.figure() |
| 63 plt.imshow(worldImg) | 63 plt.imshow(worldImg) |
| 64 plt.tight_layout() | 64 plt.tight_layout() |
| 65 worldPts = args.unitsPerPixel*np.array(plt.ginput(args.nPoints, timeout=3000)) | 65 worldPts = args.unitsPerPixel*np.array(plt.ginput(args.nPoints, timeout=3000)) |
