[MF]修改文件

This commit is contained in:
songbingle 2025-06-05 15:57:32 +08:00
parent ce8f840299
commit e5850bd286

View File

@ -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()