I am using Visual Studio 2010 with OpenCV 2.3.1 Libraries. I just wanted to stream video from an IP camera and make some processing in it. While trying so, it worked properly when I ran the project in VS2010. But it is not working when I tried running it as an EXE file. But the same program is working for Non-IP cameras like USB Web cams (Both as project file and as an .EXE file)
I dropped the DLL files which are all needed to the folder where my .EXE file is located (The DLL files are opencv_calib3d231d.dll,opencv_core231d.dll, opencv_features2d231d.dll, opencv_flann231d.dll, opencv_highgui231d.dll, opencv_imgproc231d.dll, opencv_objdetect231d.dll, opencv_video231d.dll, tbb_debug.dll)
I am having an error saying "Bad Flag (parameter or structure field) (Unrecognized or unsupported array type) in unknown function, file C:\slave\WinInstallerMegaPack\src\opencv\modules\core\src\array.cpp, line 2482"
My code is
#include "stdafx.h"
#include<iostream>
#include"opencv2\opencv.hpp"
#include"opencv2\highgui\highgui.hpp"
#include"opencv\cv.h"
using namespace std;
using namespace cv;
int _tmain(int argc, _TCHAR* argv[])
{
Mat f;
const string s="http://<username:password>@<IP address:portno>/axis- cgi/mjpg/video.cgi?.mjpg";
VideoCapture cap;
cap.open(s);
if(!cap.isOpened())
cout<<"Cannot be accessed";
while(8)
{
cap>>f;
imshow("Live stream",f);
if(waitKey(30)==27)
break;
}
return 0;
}
Somebody Please help me get rid of this... Thanks in Advance...