Mercurial Hosting > traffic-intelligence
comparison scripts/manual-video-analysis.py @ 1118:234e2228fd30
minor
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 25 Jun 2019 17:23:43 -0400 |
parents | 933670761a57 |
children | 79c18dde0864 |
comparison
equal
deleted
inserted
replaced
1117:bb58506c1bfd | 1118:234e2228fd30 |
---|---|
1 #! /usr/bin/env python3 | 1 #! /usr/bin/env python3 |
2 | 2 |
3 import sys, argparse, cv2, numpy as np | 3 import sys, argparse, cv2, numpy as np |
4 | 4 |
5 parser = argparse.ArgumentParser(description=''''The program replays the video and allows to manually id vehicles and mark instants, eg when they cross given areas in the scene. Use this program in combination with a screen marker program (For example, Presentation Assistant) to draw multiple lines on the screen.''', | 5 parser = argparse.ArgumentParser(description='''The program replays the video and allows to manually id vehicles and mark instants, eg when they cross given areas in the scene. Use this program in combination with a screen marker program (For example, Presentation Assistant) to draw multiple lines on the screen.''', |
6 epilog = '''The output should give you a .csv file with the same name as your video file with columns in this format: | 6 epilog = '''The output should give you a .csv file with the same name as your video file with columns in this format: |
7 vehicle number, frame number | 7 vehicle number, frame number |
8 You can easily spot mistakes in the csv file for a line with number, SKIP. If this happens, just delete the previous vehicle observation.''', | 8 You can easily spot mistakes in the csv file for a line with number, SKIP. If this happens, just delete the previous vehicle observation.''', |
9 formatter_class=argparse.RawDescriptionHelpFormatter) | 9 formatter_class=argparse.RawDescriptionHelpFormatter) |
10 parser.add_argument('-i', dest = 'videoFilename', help = 'name of the video file', required = True) | 10 parser.add_argument('-i', dest = 'videoFilename', help = 'name of the video file', required = True) |