2017-07-29 04:14:53 -0600 | commented answer | Mac with anaconda installed can't play videos The value of ret is False. How should I change my code? |
2017-07-29 02:12:46 -0600 | asked a question | Mac with anaconda installed can't play videos I installed openCV 3.1.0 and anaconda 3. I was able to open images. However, when I tried to play this avi file, an error was displayed on the console. error: /Users/travis/miniconda3/conda-bld/opencv_1489542914304/work/opencv-3.1.0/modules/imgproc/src/imgwarp.cpp:3229: error: (-215) ssize.area() > 0 in function resize. Moreover, cap.isOpen() returned True. import cv2 import numpy as np body_classifier = cv2.CascadeClassifier('haarcascade_fullbody.xml') cap = cv2.VideoCapture('walking.avi') while cap.isOpened(): cap.release() File "<ipython-input-1-f44aabb31ae2>", line 18, in <module> frame = cv2.resize(frame, None,fx=0.5, fy=0.5, interpolation = cv2.INTER_LINEAR) |