IP Camera access using OpenCV

前端 未结 3 1612
失恋的感觉
失恋的感觉 2020-12-14 12:54

The code given below is for accessing an Axis IP camera using OpenCV. On running the program it first displays \"Error in opening cap_ffmpeg_impl...\" and then it displays <

3条回答
  •  温柔的废话
    2020-12-14 13:18

    The following works for an Axis M1004-W connected to my computer via ethernet cable:

    1. In the browser of your choice (I'm using Chrome), navigate to the camera's IP address. Provide credentials as necessary.
    2. You should be looking at a live stream from your camera. Right-click on the video stream and select "Inspect Element" (or its equivalent in non-Chrome browsers).
    3. You should see a variable called src - this is what you can use within OpenCV to access the camera directly. Mine is /mjpg/video.mjpg, and I bet yours will be similar.

    The address you give to OpenCV should look like this:

    http://:@/
    

    This is what mine looks like:

    http://uname:login@192.168.0.0/mjpg/video.mjpg
    

    I entered my address into your code and can see the video stream from an OpenCV window.

提交回复
热议问题