Mercurial Hosting > traffic-intelligence
diff scripts/init_tracking.py @ 858:2faabcbde2c4
minor improvements
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 11 Oct 2016 17:57:50 -0400 |
parents | d45ab817ee11 |
children |
line wrap: on
line diff
--- a/scripts/init_tracking.py Thu Oct 06 17:16:31 2016 -0400 +++ b/scripts/init_tracking.py Tue Oct 11 17:57:50 2016 -0400 @@ -1,6 +1,7 @@ #! /usr/bin/env python import sys, argparse, os.path, storage, utils +from shutil import copy from cvutils import getImagesFromVideo from matplotlib.pyplot import imsave @@ -39,7 +40,10 @@ f.close() out.close() print('Configuration file tracking.cfg successfully copied to the current directory with video and database filename adapted') - + if os.path.exists(directoryName+'/../classifier.cfg') and not os.path.exists('./classifier.cfg'): + copy(directoryName+'/../classifier.cfg', 'classifier.cfg') + print('Configuration file classifier.cfg successfully copied to the current directory') + # extract image from video image = getImagesFromVideo(args.videoFilename, saveImage = True, outputPrefix = 'frame') print('first video frame successfully copied to the current directory')