display a video code error
HI
I have just started to learn opencv c++
I have written this code to play a video file but the following message is displayed in VC12
can anyone help me please
Regards
HI
I have just started to learn opencv c++
I have written this code to play a video file but the following message is displayed in VC12
can anyone help me please
Regards
#include <iostream> // for standard I/O
#include <string> // for strings
#include <opencv2/core.hpp> // Basic OpenCV structures (cv::Mat)
#include <opencv2/highgui.hpp> // Video write
using namespace std;
using namespace cv;
int main(int argc, char *argv[])
{
const string source = argv[1]; // the source file name
VideoCapture inputVideo(source); // Open input
if (!inputVideo.isOpened())
{
cout << "Could not open the input video: " << source << endl;
return -1;
}
Mat src;
for(;;) //Show the image in the window and repeat
{
inputVideo >> src; // read
if (src.empty()) break; // check if at end
imshow( source,src );
if( (waitKey(29) & 255) == 27 ) break; // stop by pressing ESC
}
return 0;
}
Asked: 2015-06-08 09:43:53 -0600
Seen: 232 times
Last updated: Jun 30 '15
OpenCV DescriptorMatcher matches
Conversion between IplImage and MxArray
Video On Label OpenCV Qt :: hide cvNamedWindows
Problems using the math.h class with OpenCV (c++, VS2012)
How to reduce false positives for face detection
Area of a single pixel object in OpenCV
build problems for android_binary_package - Eclipse Indigo, Ubuntu 12.04
Can't compile .cu file when including opencv.hpp
Using OpenCV's stitching module, strange error when compositing images
AAAAA that is C!!! try to use C++ api ;)