playing video in Centos using opencv python -


i following tutorial opencv play video on centos .

opencv tutorial

see code below , doesn't throw errors not show videos being played. if use image display program works fine tells me x11 forwarding part working fine .

[root@hadoop1 basic-motion-detection]# more demo1.py import numpy np import cv2  cap = cv2.videocapture('/home/admin/example_02.mp4')  while(cap.isopened()):     ret, frame = cap.read()      gray = cv2.cvtcolor(frame, cv2.color_bgr2gray)     cv2.startwindowthread()     cv2.namedwindow("preview")     cv2.imshow('preview',gray)     if cv2.waitkey(1) & 0xff == ord('q'):         break  cap.release() cv2.destroyallwindows() 


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -