From 57c32f265a900d537e4a7299c86b096ea764bdff Mon Sep 17 00:00:00 2001 From: hzwer <598460606@163.com> Date: Tue, 17 Nov 2020 12:39:07 +0800 Subject: [PATCH] Padding zero to png name --- inference_mp4_2x.py | 2 +- inference_mp4_4x.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inference_mp4_2x.py b/inference_mp4_2x.py index c5f4983..18c0b57 100644 --- a/inference_mp4_2x.py +++ b/inference_mp4_2x.py @@ -45,7 +45,7 @@ cnt = 0 def writeframe(frame): global cnt if args.png: - cv2.imwrite('output/{}.png'.format(cnt), frame) + cv2.imwrite('output/{:0>8d}.png'.format(cnt), frame) cnt += 1 else: output.write(frame) diff --git a/inference_mp4_4x.py b/inference_mp4_4x.py index a0f4ba2..8362e5a 100644 --- a/inference_mp4_4x.py +++ b/inference_mp4_4x.py @@ -45,7 +45,7 @@ cnt = 0 def writeframe(frame): global cnt if args.png: - cv2.imwrite('output/{}.png'.format(cnt), frame) + cv2.imwrite('output/{:0>8d}.png'.format(cnt), frame) cnt += 1 else: output.write(frame)