Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

save images cv2

cap = cv2.VideoCapture("horse.mp4")
img_num = 1
while True:
    ret, frame = cap.read()
    if ret == False:
    	break
        
    # Save frames using cv2.imwrite
	cv2.imwrite("image_{}.jpg".format(img_num), frame)  # Save image localy 
    img_num+=1
 
PREVIOUS NEXT
Tagged: #save #images
ADD COMMENT
Topic
Name
9+3 =