{using namespace std; using namespace cv; VideoCapture vid("http://192.168.1.7:65534/videostream.cgi?user=admin&pwd=123456&resolution=32"); //change this URL according to your camera if (!vid.isOpened()) { cout << "could not capture"; //break; } Mat *frame; // IplImage *frame=0; cvNamedWindow("IPcamera", 1); char key = 'a'; while(true) { vid.grab(); vid.retrieve(frame); imshow("IPcamera", frame); key = waitKey(10); } destroyAllWindows(); break;}
C++ (Qt)Mat *frame;
C++ (Qt)Mat frame;
C++ (Qt)win32: LIBS += -L$$PWD/../opencv/2.4.2/build/x86/vc10/lib/ -lopencv_core242win32: LIBS += -L$$PWD/../opencv/2.4.2/build/x86/vc10/lib/ -lopencv_imgproc242win32: LIBS += -L$$PWD/../opencv/2.4.2/build/x86/vc10/lib/ -lopencv_objdetect242win32: LIBS += -L$$PWD/../opencv/2.4.2/build/x86/vc10/lib/ -lopencv_contrib242win32: LIBS += -L$$PWD/../opencv/2.4.2/build/x86/vc10/lib/ -lopencv_highgui242