Mercurial > hg > nsaunier > traffic-intelligence
comparison trafficintelligence/storage.py @ 1177:aa88acf06876
rewrote object concatenation method, cleaner
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Thu, 24 Mar 2022 16:07:51 -0400 |
| parents | 8ac52ebff5f7 |
| children | ee3eaf902b83 |
comparison
equal
deleted
inserted
replaced
| 1176:5874ece33637 | 1177:aa88acf06876 |
|---|---|
| 1477 | 1477 |
| 1478 def processVideoArguments(args): | 1478 def processVideoArguments(args): |
| 1479 '''Loads information from configuration file | 1479 '''Loads information from configuration file |
| 1480 then checks what was passed on the command line | 1480 then checks what was passed on the command line |
| 1481 for override (eg video filename and database filename''' | 1481 for override (eg video filename and database filename''' |
| 1482 parentPath = Path(args.configFilename).parent | |
| 1483 if args.configFilename is not None: # consider there is a configuration file | 1482 if args.configFilename is not None: # consider there is a configuration file |
| 1483 parentPath = Path(args.configFilename).parent | |
| 1484 params = ProcessParameters(args.configFilename) | 1484 params = ProcessParameters(args.configFilename) |
| 1485 videoFilename = params.videoFilename | 1485 videoFilename = params.videoFilename |
| 1486 databaseFilename = params.databaseFilename | 1486 databaseFilename = params.databaseFilename |
| 1487 if params.homography is not None: | 1487 if params.homography is not None: |
| 1488 invHomography = linalg.inv(params.homography) | 1488 invHomography = linalg.inv(params.homography) |
| 1492 distortionCoefficients = array(params.distortionCoefficients) | 1492 distortionCoefficients = array(params.distortionCoefficients) |
| 1493 undistortedImageMultiplication = params.undistortedImageMultiplication | 1493 undistortedImageMultiplication = params.undistortedImageMultiplication |
| 1494 undistort = params.undistort | 1494 undistort = params.undistort |
| 1495 firstFrameNum = params.firstFrameNum | 1495 firstFrameNum = params.firstFrameNum |
| 1496 else: | 1496 else: |
| 1497 params = None | |
| 1497 invHomography = None | 1498 invHomography = None |
| 1498 undistort = False | 1499 undistort = False |
| 1499 intrinsicCameraMatrix = None | 1500 intrinsicCameraMatrix = None |
| 1500 distortionCoefficients = [] | 1501 distortionCoefficients = [] |
| 1501 undistortedImageMultiplication = None | 1502 undistortedImageMultiplication = None |
