annotate scripts/display-synced-trajectories.py @ 1231:6487ef10c0e0

work in progress
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Thu, 24 Aug 2023 17:06:16 -0400
parents cc5cb04b04b0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
998
933670761a57 updated code to python 3 (tests pass and scripts run, but non-executed parts of code are probably still not correct)
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 985
diff changeset
1 #! /usr/bin/env python3
832
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
2
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
3 import sys, argparse, os.path
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
4 from datetime import datetime, timedelta
1028
cc5cb04b04b0 major update using the trafficintelligence package name and install through pip
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 998
diff changeset
5
837
e01cabca4c55 minor modifications to merge-features
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 836
diff changeset
6 import numpy as np
832
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
7 import cv2
1028
cc5cb04b04b0 major update using the trafficintelligence package name and install through pip
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 998
diff changeset
8
cc5cb04b04b0 major update using the trafficintelligence package name and install through pip
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 998
diff changeset
9 from trafficintelligence import cvutils, utils, storage
cc5cb04b04b0 major update using the trafficintelligence package name and install through pip
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 998
diff changeset
10 from trafficintelligence.metadata import connectDatabase, Site, CameraView, VideoSequence
832
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
11
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
12 parser = argparse.ArgumentParser(description='The program displays several views of the same site synchronously.')
983
7463c9bc846b work in progress on script to manage large dataset with multiple sites
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 936
diff changeset
13 parser.add_argument('--db', dest = 'metadataFilename', help = 'name of the metadata file', required = True)
832
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
14 #parser.add_argument('-n', dest = 'siteId', help = 'site id or site name', required = True)
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
15 parser.add_argument('-d', dest = 'databaseFilename', help = 'name of the Sqlite database file', required = True)
842
75530d8c0090 corrected help printing issue
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 839
diff changeset
16 parser.add_argument('-f', dest = 'startTime', help = 'time to start playing (format %%Y-%%m-%%d %%H:%%M:%%S, eg 2011-06-22 10:00:39)', required = True)
832
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
17 parser.add_argument('-t', dest = 'trajectoryType', help = 'type of trajectories to display', choices = ['feature', 'object'], default = 'object')
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
18 parser.add_argument('-r', dest = 'rescale', help = 'rescaling factor for the displayed image', default = 1., type = float)
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
19 parser.add_argument('-s', dest = 'step', help = 'display every s image', default = 1, type = int)
838
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
20 parser.add_argument('-u', dest = 'undistort', help = 'undistort the video (because features have been extracted that way)', action = 'store_true')
832
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
21
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
22 args = parser.parse_args()
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
23
985
668a85c963c3 work on processing and managing large video datasets
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 983
diff changeset
24 session = connectDatabase(args.metadataFilename)
832
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
25
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
26 mergedSequence = session.query(VideoSequence).filter(VideoSequence.databaseFilename == args.databaseFilename).first()
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
27 if mergedSequence is None:
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
28 print('Video sequence {} was not found in {}. Exiting'.format(args.databaseFilename, args.metadataFilename))
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
29 sys.exit()
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
30
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
31 dirname = os.path.split(args.metadataFilename)[0]
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
32
838
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
33 frameRate = mergedSequence.cameraView.cameraType.frameRate
832
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
34 startTime = datetime.strptime(args.startTime, utils.datetimeFormat)
838
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
35 mergedFirstFrameNum = utils.deltaFrames(mergedSequence.startTime, startTime, frameRate)
832
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
36
837
e01cabca4c55 minor modifications to merge-features
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 836
diff changeset
37 cameraViews = session.query(CameraView).filter(CameraView.site == mergedSequence.cameraView.site).filter(CameraView.virtual == False).all()
838
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
38 videoSequences = session.query(VideoSequence).filter(VideoSequence.virtual == False).all()
836
7058a40a4bbc updated metadata and code to merge features from different cameras
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 832
diff changeset
39 #videoSequences.remove(mergedSequence)
838
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
40 videoSequences = [v for v in videoSequences if v.cameraView in cameraViews and (v.containsInstant(startTime) or v.startTime > startTime)]
832
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
41 filenames = [dirname+os.path.sep+v.getVideoSequenceFilename() for v in videoSequences]
838
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
42 firstFrameNums = [utils.deltaFrames(v.startTime, startTime, frameRate) for v in videoSequences] # use pos/neg first frame nums
832
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
43 windowNames = [v.cameraView.description for v in videoSequences]
838
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
44
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
45 # homography and undistort
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
46 homographies = [np.linalg.inv(np.loadtxt(dirname+os.path.sep+v.cameraView.getHomographyFilename())) for v in videoSequences]
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
47 if args.undistort:
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
48 cameraTypes = set([cv.cameraType for cv in cameraViews])
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
49 for cameraType in cameraTypes:
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
50 cameraType.computeUndistortMaps()
832
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
51
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
52 objects = storage.loadTrajectoriesFromSqlite(dirname+os.path.sep+mergedSequence.getDatabaseFilename(), args.trajectoryType)
838
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
53 for obj in objects:
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
54 obj.projectedPositions = {}
832
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
55
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
56 #def playVideo(filenames, windowNames = None, firstFrameNums = None, frameRate = -1, interactive = False, printFrames = True, text = None, rescale = 1., step = 1):
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
57 if len(filenames) == 0:
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
58 print('Empty filename list')
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
59 sys.exit()
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
60
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
61 if windowNames is None:
998
933670761a57 updated code to python 3 (tests pass and scripts run, but non-executed parts of code are probably still not correct)
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 985
diff changeset
62 windowNames = ['frame{}'.format(i) for i in range(len(filenames))]
832
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
63 #wait = 5
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
64 #if rescale == 1.:
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
65 for windowName in windowNames:
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
66 cv2.namedWindow(windowName, cv2.WINDOW_NORMAL)
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
67 #if frameRate > 0:
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
68 # wait = int(round(1000./frameRate))
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
69 #if interactive:
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
70 wait = 0
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
71 rescale = 1.
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
72 captures = [cv2.VideoCapture(fn) for fn in filenames]
837
e01cabca4c55 minor modifications to merge-features
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 836
diff changeset
73 if np.array([cap.isOpened() for cap in captures]).all():
832
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
74 key = -1
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
75 ret = True
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
76 nFramesShown = 0
998
933670761a57 updated code to python 3 (tests pass and scripts run, but non-executed parts of code are probably still not correct)
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 985
diff changeset
77 for i in range(len(captures)):
838
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
78 if firstFrameNums[i] > 0:
832
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
79 captures[i].set(cv2.cv.CV_CAP_PROP_POS_FRAMES, firstFrameNums[i])
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
80 while ret and not cvutils.quitKey(key):
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
81 rets = []
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
82 images = []
998
933670761a57 updated code to python 3 (tests pass and scripts run, but non-executed parts of code are probably still not correct)
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 985
diff changeset
83 for i in range(len(captures)):
838
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
84 if firstFrameNums[i]+nFramesShown>=0:
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
85 ret, img = captures[i].read()
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
86 if ret and args.undistort:
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
87 img = cv2.remap(img, videoSequences[i].cameraView.cameraType.map1, videoSequences[i].cameraView.cameraType.map2, interpolation=cv2.INTER_LINEAR)
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
88 rets.append(ret)
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
89 images.append(img)
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
90 else:
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
91 rets.append(False)
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
92 images.append(None)
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
93 if np.array(rets).any():
832
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
94 #if printFrames:
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
95 print('frame shown {0}'.format(nFramesShown))
998
933670761a57 updated code to python 3 (tests pass and scripts run, but non-executed parts of code are probably still not correct)
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 985
diff changeset
96 for i in range(len(filenames)):
838
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
97 if rets[i]:#firstFrameNums[i]+nFramesShown>=0:
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
98 for obj in objects:
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
99 if obj.existsAtInstant(mergedFirstFrameNum+nFramesShown):
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
100 #print obj.num, obj.timeInterval, mergedFirstFrameNum, nFramesShown
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
101 if i not in obj.projectedPositions:
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
102 if homographies[i] is not None:
936
56cc8a1f7082 removed all old versions of projection methods
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 868
diff changeset
103 obj.projectedPositions[i] = obj.positions.homographyProject(homographies[i])
838
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
104 else:
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
105 obj.projectedPositions[i] = obj.positions
868
1fdafa9f6bf4 added colors more friendly for color blind people (thanks Ryan Louie!)
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 842
diff changeset
106 cvutils.cvPlot(images[i], obj.projectedPositions[i], cvutils.cvColors['default'][obj.getNum()], int(mergedFirstFrameNum+nFramesShown)-obj.getFirstInstant())
838
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
107
837
e01cabca4c55 minor modifications to merge-features
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 836
diff changeset
108 #if text is not None:
868
1fdafa9f6bf4 added colors more friendly for color blind people (thanks Ryan Louie!)
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 842
diff changeset
109 # cv2.putText(images[i], text, (10,50), cv2.FONT_HERSHEY_PLAIN, 1, cvRed['default'])
838
2918de3d40fc first working version of display of merged tracking
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 837
diff changeset
110 cvutils.cvImshow(windowNames[i], images[i], rescale) # cv2.imshow('frame', img)
832
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
111 key = cv2.waitKey(wait)
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
112 #if cvutils.saveKey(key):
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
113 # cv2.imwrite('image-{}.png'.format(frameNum), img)
839
2c7b4e6a32dd steps working now
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 838
diff changeset
114 nFramesShown += args.step
2c7b4e6a32dd steps working now
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 838
diff changeset
115 if args.step > 1:
998
933670761a57 updated code to python 3 (tests pass and scripts run, but non-executed parts of code are probably still not correct)
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 985
diff changeset
116 for i in range(len(captures)):
839
2c7b4e6a32dd steps working now
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 838
diff changeset
117 if firstFrameNums[i]+nFramesShown >= 0:
2c7b4e6a32dd steps working now
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents: 838
diff changeset
118 captures[i].set(cv2.cv.CV_CAP_PROP_POS_FRAMES, firstFrameNums[i]+nFramesShown)
832
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
119 cv2.destroyAllWindows()
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
120 else:
02f2809c2f66 work in progress on synced trajectory display
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
121 print('Video captures for {} failed'.format(filenames))