Not able to use Axis IP Camera with OpenCV

asked 2017-08-12 02:20:51 -0600

jayaise gravatar image

Hi,

I am using OpenCV 3.2 jar file. Below is my code snippet. I camera IP link wks fine in browser. but VideoCapture does not with IP Camera link. if (capture.isOpened()) always returns false;. Can you guide what i need to do here.

import org.opencv.videoio.VideoCapture; public class Sample { public static void main(String args[]) { VideoCapture capture = new VideoCapture(); capture.open("http://root:[email protected]/axis-cgi/mjpg/video.cgi?x.mjpeg"); if (capture.isOpened()) System.out.println("Video link open."); else System.out.println("Video link not open.");
} }

edit retag flag offensive close merge delete

Comments

if you're on windows, make sure, opencv_ffmpeg.dll can be found.

also, that's some sort of "local" ip address, make sure you can reach it : ping 10.78.170.247

berak gravatar imageberak ( 2017-08-12 03:57:50 -0600 )edit
1

Check if the camera is protected with password :

http://<username>:<password>@<ip_address>/<source_address>
Ziri gravatar imageZiri ( 2017-08-12 23:30:26 -0600 )edit