OpenCV VideoCapture cannot read video in Python but able in VS11 -


as title, not able read video using videocapture in python following code:

v = 'c:\\test.mp4' import cv2 cap = cv2.videocapture(v) if cap.isopened():   print "finally" else:   print "boom" 

boom being printed. sigh

whereas in vs11, following code works:

#include "stdafx.h"  #include <opencv2\highgui\highgui.hpp> #include <iostream>  using namespace cv; using namespace std;  int main(int argc, char* argv[]) {     string v = "c:\\test.mp4";     videocapture cap;     cap.open(v);     if (cap.isopened()) {         cout << "yes!" << endl;     } else {         cout << "boom" << endl;     }      return 0; } 

i realize there's number solution in so, nothing works me. have following dlls in c:\python27 , c:\python27\dlls, in path

  • opencv_ffmpeg.dll
  • opencv_ffmpeg_64.dll
  • opencv_ffmpeg_245_64.dll
  • opencv_ffmpeg_245.dll

i have no more idea have not done.

please me. thank much.

i have solved problem installing binaries download link provided this answer.

it copied opencv dlls c:\python27 (or maybe other files). don't understand why wouldn't work earlier have included dlls path


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -