I have a Mobotix camera. This is an IP camera. In the API, they offer us the ability to receive feed through
http: // [ user ]: [ password ] @ [ ip_adress ]: [ port ] /cgi-bin/faststream.jpg? [ options ]
I tried to open it like a regular webcam channel:
cv::VideoCapture capture("http://..."); cv::Mat frame; if (capture.isOpened())
FYI: Mobotix Developer API Documents
EDIT: now thanks to berak I just need to add & data = v.mjpg to the parameters:
?stream=full&fps=5.0&noaudio&data=v.mjpg
Please note that in v.mjpg only the point [dot] mjpg is important, you can also put myfile.mjpg.
Now the problem is the feed update speed. I got a delay of 2 seconds, plus the feed is very slow. And when I change the stream parameter for MxJPG or mxg, I get a damaged image in which the bytes are not sorted properly.
EDIT: I tried to change the camera settings directly using the mobotix control center, but only the resolution affected my OpenCV program, without changing the speed with which I access images.
source share