无法使用openCv从D-Link DCS 932L获取视频Feed [英] Unable to get Video feed from D-Link DCS 932L using openCv

查看:688
本文介绍了无法使用openCv从D-Link DCS 932L获取视频Feed的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试显示来自IP-Camera(D-Link DCS 932L)的视频源。我已经经历了相同的主题,并尝试从不同的帖子的代码,但无法从相机获取视频饲料。
这是我尝试的代码。

I am trying to display video feed from IP- Camera(D-Link DCS 932L). I Have gone through topics for the same and tried the code from different posts, but am unable to get the video feed from the camera. Here's the code which i tried.

#include <opencv/cv.h>
#include <opencv/highgui.h>
using namespace cv;

int main(int argc, char *argv[])
{
Mat frame;
namedWindow("video", 1);
String url = "http://admin:admin@172.32.20.55:80/image/jpeg.cgi";
VideoCapture cap(url);
/*   VideoCapture cap(0);*/
while ( cap.isOpened() )
{
    cap >> frame;
    if(frame.empty()) break;

    imshow("video", frame);
    if(waitKey(30) >= 0) break;
}

return 0;

}

的网址,但我无法显示任何视频饲料。我认为这可能是代码问题,所以我甚至尝试显示USB网络摄像头,它的工作。所以现在我得出结论,问题似乎是与URL通过。除了我试过的网址列表。我从iSpy获得了这个URL选项。这些URL是

I tried many different kind of url's but i was unable to display any video feed. I thought it might be code problem so I even tried displaying the USB Webcam and it worked. So now i come to conclusion that the problem seems to be with URL which am passing. Heres the list of urls which I tried. I got this Url options from iSpy.Here are those URL's

(JPEG)http://admin:admin@172.32.20.55:80?IMAGE.JPG
(JPEG)http://admin:admin@172.32.20.55:80/image/jpeg.cgi
(MPEG)http://admin:admin172.32.20.55:80/video.cgi?resolution=VGA
(MPEG)http://admin:admin172.32.20.55:80/video/mjpg.cgi
(MPEG)http://admin:admin172.32.20.55:80/mjpeg.cgi?        user=admin&password=admin&channel=0
(MPEG)http://admin:pnqadmin172.32.20.55:80/VIDEO.CGI

请让我知道显示视频Feed的可能的问题。
它们的作用与OpenCv的设置或别的东西。请注意,我使用VS2010和C ++需要帮助的所有专家出来他们的。
提前感谢。

Please let me know what can be probable problem for displaying the video feed. Is their something to do with the setting of the OpenCv or something else.Please note that am using VS2010 and C++ Need help of all the Expert out their. Thanks in advance.

推荐答案

我解决了我的问题。问题是与URL。我改变了URL,它工作顺利..!
我使用的URL如下。

I solved my problem. The problem was with URL. I changed the URL and it worked smooth..! The URL i used was as follows.

"http://USER:PWD@IPADDRESS:8088/mjpeg.cgi?user=USERNAME&password=PWD&channel=0&.mjpg";

这篇关于无法使用openCv从D-Link DCS 932L获取视频Feed的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆