def framing(self,path):
cap = cv2.VideoCapture(path)
success,frame=cap.read(cv.CV_IMWRITE_JPEG_QUALITY) #handle of the Video Capture is required for obtaining frame.
count = 1
while success:
cv2.imwrite("Frames/%d.jpg" % count, frame) # save frame as JPEG file
count += 1
success,frame = cap.read(cv.CV_IMWRITE_JPEG_QUALITY) # to read the last frame
cap.release()
# select transformation
评论列表
文章目录