I would like to capture an IP camera stream with `VideoCapture` in Android. I am using the latest OpenCV v3.1 which reportedly supports mjpg stream capture.
Below is how I am trying to open the stream, which does not work. I have also tried passing the IP address into the `VideoCapture` constructor.
String ipAddress = "http://IP:PORT/axis-cgi/mjpg/video.cgi?resolution=320x240&.mjpg";
VideoCapture capture = new VideoCapture();
capture.open(ipAddress);
if(!capture.isOpened()){
Log.e(TAG, "Not opened");
}
Also, my `AndroidManifest.xml` contains the internet access permission:
Is there anything else I am missing? Should there perhaps be some kind of `sleep()` or some callback to notify once the stream connects and only then capture incoming frames?
Any similar issues seem to be missing the dummy mjpg parameter at the end of the IP adddress which is not the case here.
↧