IP camera and OPENCV

Good afternoon!

I am using Dev-C ++ as my IDE and OpenCV library. I need to get the video shot by my IP camera and process it using OpenCV. Can anyone teach me how to do this. My OS is Windows 7 64 bit. Thank you very much.

0
source share
1 answer

if this is a recent version of opencv, this might work:

Mat frame; namedWindow("video", 1); VideoCapture cap("http://150.214.93.55/mjpg/video.mjpg"); while ( cap.isOpened() ) { cap >> frame; if(frame.empty()) break; imshow("video", frame); if(waitKey(30) >= 0) break; } 

anyway, opencv seems to insist that the url should end with ".mjpg" (dot mjpg), so if it isn't, add a dummy parameter to it, for example: my/fancy/url?type=.mjpg

0
source

Source: https://habr.com/ru/post/944576/


All Articles