From e5850bd286bfbc74cb812ca6284e948faa0093ba Mon Sep 17 00:00:00 2001 From: songbingle <1696321477@qq.com> Date: Thu, 5 Jun 2025 15:57:32 +0800 Subject: [PATCH] =?UTF-8?q?[MF]=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/video.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video.py b/src/video.py index bad3a79..b1b462c 100644 --- a/src/video.py +++ b/src/video.py @@ -7,10 +7,11 @@ if video.isOpened(): else: ret = False timeF = 8 +filepath = 'C:/workspace/le-yolo/data/images/train/t2_' while ret: ret, frame = video.read() if num % timeF == 0: - cv2.imwrite('C:/workspace/le-yolo/data/images/train/t2_' + str(num) + '.jpg', frame) + cv2.imwrite(filepath + str(num) + '.jpg', frame) num = num + 1 cv2.waitKey(1) video.release() \ No newline at end of file