Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

cv2 opencv-python imshow while loop

import cv2
capture = cv2.VideoCapture(path)
while True:
   ret,frame = capture.read(0)
   region_of_interest = detect(frame)

    if region_of_interest != 0:
        # if you want to show somenthing better put a text
        cv2.putText(frame, data, (cord1, cord2), cv2.FONT_HERSHEY_SIMPLEX,0.5, (0, 255, 0), 2)


    cv2.imshow('Normal Video',frame)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

capture.release()
cv2.destroyAllWindows()
Comment

PREVIOUS NEXT
Code Example
Python :: matplotlib legend get handles 
Python :: loginrequiredmixin django 
Python :: python program to find second largest number in a list 
Python :: merge two columns name in one header pandas 
Python :: selenium save page as image 
Python :: display pandas dataframe with border 
Python :: pandas rolling mean 
Python :: split path in list of directories 
Python :: drop 0 in np array 
Python :: python synonym library 
Python :: tkinter filedialog how to show more than one filetype 
Python :: intersect index in python 
Python :: python dataframe save 
Python :: python sort a 2d array by custom function 
Python :: python read input 
Python :: with open 
Python :: save image to database using pillow django 
Python :: how to append in dictionary in python 
Python :: username python system 
Python :: count number of pages in pdf python pdfminer 
Python :: series to dataframe 
Python :: how to convert float to string in python 
Python :: liste compréhension python 
Python :: python staticmethod property 
Python :: django login required 
Python :: python curl 
Python :: The datetime and django.utils.timezone modules are available, so you can do e.g. timezone.now 
Python :: how to numbered jupyter notebook 
Python :: numpy copy a array vertical 
Python :: wap in python to check a number is odd or even 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =