Search
 
SCRIPT & CODE EXAMPLE
 

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
Comment

PREVIOUS NEXT
Code Example
Python :: How do I mock an uploaded file in django? 
Python :: kivy fixed window 
Python :: ckeditor django 
Python :: python merge pdfs 
Python :: set os environment variable python 
Python :: python check ram usage 
Python :: python install package from code 
Python :: python requests.get timeout 
Python :: add x axis label python 
Python :: python pandas apply to one column 
Python :: pandas to list 
Python :: ddos in python 
Python :: python setup.py bdist_wheel did not run successfully 
Python :: python calc days between dates 
Python :: how to find if a value is even or odd in python 
Python :: plt plot circle 
Python :: jupyter notebook show more rows 
Python :: xgboost feature importance 
Python :: django foreign key field on delete do nothing 
Python :: how to sum the revenue from every day in a dataframe python 
Python :: cv2 image object to base64 string 
Python :: required validator python WTForms 
Python :: how to get a list of all values in a column df 
Python :: how to get the angle of mouse from the center formulae 
Python :: list all files of a directory in Python 
Python :: pandas not is na 
Python :: python ceiling 
Python :: how to add input box in tkinter 
Python :: import file to colab 
Python :: how to use python to print multiplication table 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =