Mercurial Hosting > traffic-intelligence
view python/play-video.py @ 322:28661c5887d3
Corrected a major bug for LCSS
Added functions to test all alignments when computing the LCSS with a finite delta
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 07 May 2013 18:43:40 +0200 |
parents | ca9131968bce |
children |
line wrap: on
line source
#! /usr/bin/env python import sys,getopt import cvutils options, args = getopt.getopt(sys.argv[1:], 'hi:f:',['help', 'fps=']) options = dict(options) print options if '--help' in options.keys() or '-h' in options.keys() or len(sys.argv) == 1: print('Usage: '+sys.argv[0]+' --help|-h -i video-filename [-f first_frame] [--fps frame_rate]') sys.exit() firstFrameNum = 0 if '-f' in options.keys(): firstFrameNum = int(options['-f']) frameRate = -1 if '--fps' in options.keys(): frameRate = int(options['--fps']) cvutils.playVideo(options['-i'], firstFrameNum, frameRate)