cap.open URL video or image is not working if ...mjpg?resolution
That is working
cv::VideoCapture cap("http://myIP:1102/mjpg/video.mjpg");
cv::Mat img;
cap.open("http://myIP:1102/mjpg/video.mjpg");
if (cap.isOpened())
{
cap.read(img);
}
But not that, why?
cv::VideoCapture cap("http://myIP:1102/mjpg/video.mjpg?resolution=1280x960&compression=0&rotation=270");
cv::Mat img;
cap.open("http://myIP:1102/mjpg/video.mjpg?resolution=1280x960&compression=0&rotation=270");
if (cap.isOpened())
{
cap.read(img);
}
Same with "/axis-cgi/jpg/image.cgi"...
Be happy that streaming works already without the parameters. OpenCV was not optimized for this and it hasn't worked for a long time. As to streaming, I would look into other libraries than OpenCV to grab the images then process them with OpenCV!