Solve the bug for camera calibration

This commit is contained in:
MrKarimiD committed 2024-04-22 09:56:47 -04:00
1 parent e504c1f2f8
commit 08aaf0cb80
3 files changed
+37 -27

No files matched your search

+14 -6
View File
@@ -25,12 +25,20 @@ if __name__ == '__main__':
os.makedirs(output_folder, exist_ok=True)
# Run FFmpeg command to convert video to PNG frames
command = [
"ffmpeg",
"-i", video,
"-vf", "fps=29.97",
f"{output_folder}/output_%04d.png"
]
if video_name == 'left_sfm' or video_name == 'right_sfm':
command = [
"ffmpeg",
"-i", video,
"-vf", "fps=4.0",
f"{output_folder}/output_%04d.png"
]
else:
command = [
"ffmpeg",
"-i", video,
"-vf", "fps=15.0",
f"{output_folder}/output_%04d.png"
]
subprocess.run(command, check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
# only keep frames where mod 10 = 0