Mercurial > hg > nsaunier > traffic-intelligence
comparison scripts/classify-objects.py @ 905:0e017178f7ab
correct bug in classify-objects script when correcting for distrotion
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Thu, 22 Jun 2017 23:40:16 -0400 |
| parents | 8f60ecfc2f06 |
| children | 3dd5acfa1899 |
comparison
equal
deleted
inserted
replaced
| 904:8f60ecfc2f06 | 905:0e017178f7ab |
|---|---|
| 71 width = int(capture.get(cv2.cv.CV_CAP_PROP_FRAME_WIDTH)) | 71 width = int(capture.get(cv2.cv.CV_CAP_PROP_FRAME_WIDTH)) |
| 72 height = int(capture.get(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT)) | 72 height = int(capture.get(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT)) |
| 73 | 73 |
| 74 if undistort: # setup undistortion | 74 if undistort: # setup undistortion |
| 75 [map1, map2] = cvutils.computeUndistortMaps(width, height, undistortedImageMultiplication, intrinsicCameraMatrix, distortionCoefficients) | 75 [map1, map2] = cvutils.computeUndistortMaps(width, height, undistortedImageMultiplication, intrinsicCameraMatrix, distortionCoefficients) |
| 76 height, width = map1.shape | |
| 76 | 77 |
| 77 pastObjects = [] | 78 pastObjects = [] |
| 78 currentObjects = [] | 79 currentObjects = [] |
| 79 if capture.isOpened(): | 80 if capture.isOpened(): |
| 80 ret = True | 81 ret = True |
