Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

Project not responding

$
0
0
Im running this code: #include #include #include #include #include #include #include using namespace cv; using namespace std; int main() { //create matrix for storage Mat feed, feed2; //initialize capture VideoCapture cap, cap2; cap.open("http://192.168.1.128/videostream.asf?user=admin&pwd="); cap2.open("http://192.168.1.110/webcam.mjpeg"); // check if we succeeded if (!cap.isOpened()){ cerr << "Failed to open video capture" << std::endl; cout << "cannot open camera"; return -1; } if (!cap2.isOpened()){ cerr << "Failed to open video capture" << std::endl; cout << "cannot open camera"; return -1; } //create window to show image namedWindow("VIDEO", 1); //loop while (true){ //copy webcam stream to image cap >> feed; cap2 >> feed2; resize(feed, feed, Size(1270, 700), 0, 0, INTER_CUBIC); resize(feed2, feed2, Size(320, 170), 0, 0, INTER_CUBIC); feed2.copyTo(feed(cv::Rect(874,463,feed2.cols, feed2.rows))); //small_image.copyTo(big_image(cv::Rect(x,y,small_image.cols, small_image.rows))); //webcamstream imshow("VIDEO", feed); //exit it key pressed if (waitKey(30) >= 0){ break; } //delay33ms waitKey(10); // }//endloop }//main It runs but after a while it always freezes showind the bellow on the cmd windows: ***** VIDEOINPUT LIBRARY - 0.1995 - TFW07 ***** init done [mjpeg @ 0022ec00] error dc [mjpeg @ 0022ec00] error y=9 x=28 Would anyone know how I can start debbuging this to see where the issues could be? I'm suspecting on of the stream is not stable enough, it might sending frames that are or get corrupted and I suspect this may be causing some short of issue.

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>