2017-07-29 00:42:40 -0600 | received badge | ● Scholar (source) |
2017-07-28 18:33:46 -0600 | commented answer | Can't play avi video (Anaconda 2) I installed OpenCV thorugh the terminal conda install -c menpo opencv. Maybe this is the cause? |
2017-07-28 15:03:41 -0600 | commented answer | Can't play avi video (Anaconda 2) I added the folder to the global path environment. I couldn't play the video. |
2017-07-28 13:30:28 -0600 | commented answer | Can't play avi video (Anaconda 2) My anaconda root folder is in C:\Users\David\Anaconda2. Sorry about the typo. |
2017-07-27 22:41:56 -0600 | received badge | ● Editor (source) |
2017-07-27 20:27:31 -0600 | asked a question | Can't play avi video (Anaconda 2) The code was able to execute. However, it wouldn't play the video. I copied opencv_ffmpeg.dll to C:\Anaconda2\ and saved it as opencv_ffmpeg2411_64.dll. It didn't resolve my problem. The code below returns True. import cv2 cap = cv2.VideoCapture(0) print(cap.isOpened()) However, when I changed to a file name from 0. It will return False. import cv2 cap = cv2.VideoCapture('walking.avi') print(cap.isOpened()) Here is the code that will play 'walking.avi'. import cv2 import numpy as np body_classifier = cv2.CascadeClassifier('haarcascade_fullbody.xml') cap = cv2.VideoCapture('walking.avi') while cap.isOpened(): cap.release() cv2.destroyAllWindows() |