Mercurial Hosting > traffic-intelligence
comparison scripts/display-trajectories.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 | ff4f0ce46ca6 |
children | 95e7622b11be |
comparison
equal
deleted
inserted
replaced
635:6ae68383071e | 636:3058e00887bc |
---|---|
27 | 27 |
28 if args.configFilename: # consider there is a configuration file | 28 if args.configFilename: # consider there is a configuration file |
29 params = storage.ProcessParameters(args.configFilename) | 29 params = storage.ProcessParameters(args.configFilename) |
30 videoFilename = params.videoFilename | 30 videoFilename = params.videoFilename |
31 databaseFilename = params.databaseFilename | 31 databaseFilename = params.databaseFilename |
32 if params.homography != None: | 32 if params.homography is not None: |
33 homography = inv(params.homography) | 33 homography = inv(params.homography) |
34 else: | 34 else: |
35 homography = None | 35 homography = None |
36 intrinsicCameraMatrix = params.intrinsicCameraMatrix | 36 intrinsicCameraMatrix = params.intrinsicCameraMatrix |
37 distortionCoefficients = params.distortionCoefficients | 37 distortionCoefficients = params.distortionCoefficients |
44 intrinsicCameraMatrix = None | 44 intrinsicCameraMatrix = None |
45 distortionCoefficients = [] | 45 distortionCoefficients = [] |
46 undistortedImageMultiplication = None | 46 undistortedImageMultiplication = None |
47 firstFrameNum = 0 | 47 firstFrameNum = 0 |
48 | 48 |
49 if not args.configFilename and args.videoFilename != None: | 49 if not args.configFilename and args.videoFilename is not None: |
50 videoFilename = args.videoFilename | 50 videoFilename = args.videoFilename |
51 if not args.configFilename and args.databaseFilename != None: | 51 if not args.configFilename and args.databaseFilename is not None: |
52 databaseFilename = args.databaseFilename | 52 databaseFilename = args.databaseFilename |
53 if not args.configFilename and args.homographyFilename != None: | 53 if not args.configFilename and args.homographyFilename is not None: |
54 homography = inv(loadtxt(args.homographyFilename)) | 54 homography = inv(loadtxt(args.homographyFilename)) |
55 if not args.configFilename and args.intrinsicCameraMatrixFilename != None: | 55 if not args.configFilename and args.intrinsicCameraMatrixFilename is not None: |
56 intrinsicCameraMatrix = loadtxt(args.intrinsicCameraMatrixFilename) | 56 intrinsicCameraMatrix = loadtxt(args.intrinsicCameraMatrixFilename) |
57 if not args.configFilename and args.distortionCoefficients != None: | 57 if not args.configFilename and args.distortionCoefficients is not None: |
58 distortionCoefficients = args.distortionCoefficients | 58 distortionCoefficients = args.distortionCoefficients |
59 if not args.configFilename and args.undistortedImageMultiplication != None: | 59 if not args.configFilename and args.undistortedImageMultiplication is not None: |
60 undistortedImageMultiplication = args.undistortedImageMultiplication | 60 undistortedImageMultiplication = args.undistortedImageMultiplication |
61 if args.firstFrameNum != None: | 61 if args.firstFrameNum is not None: |
62 firstFrameNum = args.firstFrameNum | 62 firstFrameNum = args.firstFrameNum |
63 | 63 |
64 | 64 |
65 objects = storage.loadTrajectoriesFromSqlite(databaseFilename, args.trajectoryType) | 65 objects = storage.loadTrajectoriesFromSqlite(databaseFilename, args.trajectoryType) |
66 boundingBoxes = storage.loadBoundingBoxTableForDisplay(databaseFilename) | 66 boundingBoxes = storage.loadBoundingBoxTableForDisplay(databaseFilename) |