Skip to content

Commit c520a2b

Browse files
authored
Bugfix/opencv path to str (#136)
* CDL: minor doc typo fix * CDL: quick path-to-string fix for #135 * Undoing some changes that got mixed in
1 parent d384d88 commit c520a2b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/python/pose_format/bin/directory.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ def process_video(keep_video_suffixes: bool, pose_format: str, additional_config
9191
if pose_path.is_file():
9292
print(f"Skipping {vid_path}, corresponding .pose file already created.")
9393
else:
94-
pose_video(vid_path, pose_path, pose_format, additional_config, progress=False)
94+
# pose_video function expects string, and passes it unchanged to cv2.VideoCapture(input_path)
95+
# if you give cv2.VideoCapture(input_path) a Path it crashes on older versions.
96+
# https://github.com/opencv/opencv/issues/15731
97+
pose_video(str(vid_path.resolve()), str(pose_path.resolve()), pose_format, additional_config, progress=False)
9598
return True
9699

97100
except ValueError as e:

0 commit comments

Comments
 (0)