This commit is contained in:
hzwer
2020-11-18 11:17:00 +08:00
parent adcf82d4c2
commit 308c047f2f
2 changed files with 3 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ model.device()
videoCapture = cv2.VideoCapture(args.video)
fps = np.round(videoCapture.get(cv2.CAP_PROP_FPS))
if args.fps is None:
fps = args.fps * args.times
args.fps = fps * args.times
success, frame = videoCapture.read()
h, w, _ = frame.shape
fourcc = cv2.VideoWriter_fourcc('m', 'p', '4', 'v')

View File

@@ -34,7 +34,7 @@ fps = np.round(videoCapture.get(cv2.CAP_PROP_FPS))
success, frame = videoCapture.read()
h, w, _ = frame.shape
if args.fps is None:
fps = args.fps * args.times
args.fps = fps * args.times
fourcc = cv2.VideoWriter_fourcc('m', 'p', '4', 'v')
if args.png:
if not os.path.exists('output'):
@@ -110,7 +110,7 @@ while success:
else:
mid0, mid2 = None, None
writeframe(I0, mid0, mid1, mid2, I1, p.mean(3).mean(2).mean(1))
pbar.update(args.times)
pbar.update(4)
img_list = img_list[-1:]
pbar.close()
output.release()