Skip to content

Commit

Permalink
Bugfix/opencv path to str (#136)
Browse files Browse the repository at this point in the history
* CDL: minor doc typo fix

* CDL: quick path-to-string fix for #135

* Undoing some changes that got mixed in
  • Loading branch information
cleong110 authored Dec 19, 2024
1 parent d384d88 commit c520a2b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/python/pose_format/bin/directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ def process_video(keep_video_suffixes: bool, pose_format: str, additional_config
if pose_path.is_file():
print(f"Skipping {vid_path}, corresponding .pose file already created.")
else:
pose_video(vid_path, pose_path, pose_format, additional_config, progress=False)
# pose_video function expects string, and passes it unchanged to cv2.VideoCapture(input_path)
# if you give cv2.VideoCapture(input_path) a Path it crashes on older versions.
# https://github.com/opencv/opencv/issues/15731
pose_video(str(vid_path.resolve()), str(pose_path.resolve()), pose_format, additional_config, progress=False)
return True

except ValueError as e:
Expand Down

0 comments on commit c520a2b

Please sign in to comment.