Mercurial > hg > nsaunier > traffic-intelligence
comparison scripts/undistort-video.py @ 636:3058e00887bc
removed all issues because of tests with None, using is instead of == or !=
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Tue, 24 Mar 2015 18:11:28 +0100 |
| parents | 9c429c7efe89 |
| children | d72e4bcc1e36 |
comparison
equal
deleted
inserted
replaced
| 635:6ae68383071e | 636:3058e00887bc |
|---|---|
| 31 [map1, map2] = cvutils.computeUndistortMaps(width, height, args.undistortedImageMultiplication, intrinsicCameraMatrix, args.distortionCoefficients) | 31 [map1, map2] = cvutils.computeUndistortMaps(width, height, args.undistortedImageMultiplication, intrinsicCameraMatrix, args.distortionCoefficients) |
| 32 if capture.isOpened(): | 32 if capture.isOpened(): |
| 33 ret = True | 33 ret = True |
| 34 frameNum = args.firstFrameNum | 34 frameNum = args.firstFrameNum |
| 35 capture.set(cv2.cv.CV_CAP_PROP_POS_FRAMES, args.firstFrameNum) | 35 capture.set(cv2.cv.CV_CAP_PROP_POS_FRAMES, args.firstFrameNum) |
| 36 if args.lastFrameNum == None: | 36 if args.lastFrameNum is None: |
| 37 from sys import maxint | 37 from sys import maxint |
| 38 lastFrameNum = maxint | 38 lastFrameNum = maxint |
| 39 else: | 39 else: |
| 40 lastFrameNum = args.lastFrameNum | 40 lastFrameNum = args.lastFrameNum |
| 41 nZerosFilename = int(ceil(log10(lastFrameNum))) | 41 nZerosFilename = int(ceil(log10(lastFrameNum))) |
