Skip to content

Commit

Permalink
annotation bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabh committed Mar 25, 2020
1 parent a20b2ca commit 887a1c3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions common/videoRecorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,19 @@ def __init__(self, filename, fourcc, fps, frameSize=None,limit_fps=False, base_d

if timestamp_filename:
self.filename_pattern = '%s-%s%s'%(self.filename, '{}', self.file_extension)
self.filename_pattern_annotations = '%s-%s%s'%(self.filename, '{}', self.annotations_extension)
if self.annotations:
self.filename_pattern_annotations = '%s-%s%s'%(self.filename, '{}', self.annotations_extension)
self.cleanup_pattern = '.*%s-%s%s'%(self.filename, '.*', self.file_extension)
else:
self.filename_pattern = '%s%s'%(self.filename, self.file_extension)
self.filename_pattern_annotations = '%s-%s'%(self.filename, self.annotations_extension)
if self.annotations:
self.filename_pattern_annotations = '%s-%s'%(self.filename, self.annotations_extension)
self.cleanup_pattern = '.*%s%s'%(self.filename, self.file_extension)

if base_dir:
self.filename_pattern = os.path.join(base_dir, self.filename_pattern)
self.filename_pattern_annotations = os.path.join(base_dir,self.filename_pattern_annotations)
if self.annotations:
self.filename_pattern_annotations = os.path.join(base_dir,self.filename_pattern_annotations)
self.base_dir = base_dir
else:
self.base_dir = os.path.dirname(self.filename)
Expand Down

0 comments on commit 887a1c3

Please sign in to comment.