Mercurial Hosting > traffic-intelligence
comparison scripts/display-trajectories.py @ 1278:8e61ff3cd503
correct bug to take into account first frame num in config, and other related bugs in dltrack.py
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 27 Jun 2024 15:31:36 -0400 |
parents | 2397de73770d |
children |
comparison
equal
deleted
inserted
replaced
1277:7493751bfe19 | 1278:8e61ff3cd503 |
---|---|
17 parser.add_argument('--intrinsic', dest = 'intrinsicCameraMatrixFilename', help = 'name of the intrinsic camera file') | 17 parser.add_argument('--intrinsic', dest = 'intrinsicCameraMatrixFilename', help = 'name of the intrinsic camera file') |
18 parser.add_argument('--distortion-coefficients', dest = 'distortionCoefficients', help = 'distortion coefficients', nargs = '*', type = float) | 18 parser.add_argument('--distortion-coefficients', dest = 'distortionCoefficients', help = 'distortion coefficients', nargs = '*', type = float) |
19 parser.add_argument('--undistorted-multiplication', dest = 'undistortedImageMultiplication', help = 'undistorted image multiplication', type = float) | 19 parser.add_argument('--undistorted-multiplication', dest = 'undistortedImageMultiplication', help = 'undistorted image multiplication', type = float) |
20 parser.add_argument('-u', dest = 'undistort', help = 'undistort the video (because features have been extracted that way)', action = 'store_true') | 20 parser.add_argument('-u', dest = 'undistort', help = 'undistort the video (because features have been extracted that way)', action = 'store_true') |
21 parser.add_argument('-f', dest = 'firstFrameNum', help = 'number of first frame number to display', type = int) | 21 parser.add_argument('-f', dest = 'firstFrameNum', help = 'number of first frame number to display', type = int) |
22 parser.add_argument('-l', dest = 'lastFrameNum', help = 'number of last frame number to save (for image saving, no display is made)', type = int, default = inf) | 22 parser.add_argument('-l', dest = 'lastFrameNum', help = 'number of last frame number to save (for image saving, no display is made)', type = int) |
23 parser.add_argument('-r', dest = 'rescale', help = 'rescaling factor for the displayed image', default = 1., type = float) | 23 parser.add_argument('-r', dest = 'rescale', help = 'rescaling factor for the displayed image', default = 1., type = float) |
24 parser.add_argument('-s', dest = 'nFramesStep', help = 'number of frames between each display', default = 1, type = int) | 24 parser.add_argument('-s', dest = 'nFramesStep', help = 'number of frames between each display', default = 1, type = int) |
25 parser.add_argument('-n', dest = 'nObjects', help = 'number of objects to display', type = int) | 25 parser.add_argument('-n', dest = 'nObjects', help = 'number of objects to display', type = int) |
26 parser.add_argument('--save-images', dest = 'saveAllImages', help = 'save all images', action = 'store_true') | 26 parser.add_argument('--save-images', dest = 'saveAllImages', help = 'save all images', action = 'store_true') |
27 parser.add_argument('--nzeros', dest = 'nZerosFilenameArg', help = 'number of digits in filenames', type = int) | 27 parser.add_argument('--nzeros', dest = 'nZerosFilenameArg', help = 'number of digits in filenames', type = int) |
39 undistortedImageMultiplication = args.undistortedImageMultiplication | 39 undistortedImageMultiplication = args.undistortedImageMultiplication |
40 if args.firstFrameNum is not None: | 40 if args.firstFrameNum is not None: |
41 firstFrameNum = args.firstFrameNum | 41 firstFrameNum = args.firstFrameNum |
42 if args.lastFrameNum is not None: | 42 if args.lastFrameNum is not None: |
43 lastFrameNum = args.lastFrameNum | 43 lastFrameNum = args.lastFrameNum |
44 else: | |
45 lastFrameNum = inf | |
44 if args.nObjects is not None: | 46 if args.nObjects is not None: |
45 nObjects = args.nObjects | 47 nObjects = args.nObjects |
46 else: | 48 else: |
47 nObjects = None | 49 nObjects = None |
48 | 50 |