• This project
    • Loading...
  • Sign in

2020-1-capstone-design1 / Define_Project1

%ea%b7%b8%eb%a6%bc1
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • Define_Project1
  • code
  • deep_sort_yolov4
  • tools
  • video2frame.py
  • Hong's avatar
    addyolo · 99979bf1
    99979bf1
    Hong authored 2020-06-17 08:16:26 +0900
video2frame.py 311 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
import cv2

image_folder = './mask_face'
video_name = './cut_test.m4v'

vc = cv2.VideoCapture(video_name)
c = 1
if vc.isOpened():
    rval,frame=vc.read()
else:
    rval=False
while rval:
    rval,frame=vc.read()
    cv2.imwrite('./mask_face/IMG_'+str(c)+'.jpg',frame)
    c=c+1
    cv2.waitKey(1)
vc.release()