mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-13 11:24:00 +08:00
Solve the bug for camera calibration
This commit is contained in:
1 parent
e504c1f2f8
commit
08aaf0cb80
3 files changed
+37
-27
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user