Skip to content

Commit

Permalink
fix video extension issue for calibration videos
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdaloop committed Aug 3, 2019
1 parent 7cf6fe9 commit a46684c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions anipose/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def process_points_for_calibration(all_points, all_scores):
def process_session(config, session_path):
pipeline_calibration_videos = config['pipeline']['calibration_videos']
pipeline_calibration_results = config['pipeline']['calibration_results']
video_ext = config['video_extension']

calibration_path = find_calibration_folder(config, session_path)

Expand All @@ -110,9 +111,13 @@ def process_session(config, session_path):

videos = glob(os.path.join(calibration_path,
pipeline_calibration_videos,
'*.avi'))
'*.'+video_ext))
videos = sorted(videos)

if len(videos) == 0:
print('no videos found, continuing...')
return

cam_videos = defaultdict(list)
cam_names = set()
for vid in videos:
Expand Down Expand Up @@ -153,7 +158,7 @@ def process_session(config, session_path):

board = get_calibration_board(config)


if not skip_calib:
rows_fname = os.path.join(outdir, 'detections.pickle')
if os.path.exists(rows_fname):
Expand Down

0 comments on commit a46684c

Please sign in to comment.