我想从emgu中的IP摄像头获取视频,我可以在“http://169.254.255.253”IP的浏览器中显示视频,但是我怎么能从emgu显示这个?如何从IP摄像头使用emgucv获取视频
请,这对我很重要。
我想从emgu中的IP摄像头获取视频,我可以在“http://169.254.255.253”IP的浏览器中显示视频,但是我怎么能从emgu显示这个?如何从IP摄像头使用emgucv获取视频
请,这对我很重要。
Capture _Capture = new Emgu.CV.CvInvoke.cvCreateFileCapture("http://username:[email protected]_address/axis-cgi/mjpg/video.cgi?resolution=640x480&req_fps=30&.mjpg");
我没有测试,但可能是这段代码片段或方法可以帮助你。对于OpenCV的例子,你可以检查此页:OpenCV with Network Cameras
您可以检查此方法的wiki页面:http://www.emgu.com/wiki/files/2.3.0/document/html/a26a5e9d-53d7-633a-5d50-508aa22dd1fd.htm
谢谢,但是你的代码无法正常工作,cvCreateFileCapture返回IntPtr。所以我用这样的:IntPtr i = Emgu.CV.CvInvoke.cvCreateFileCapture(“http://192.168.1.253/nphMotionJpeg?Resolution=320x240&Quality=Standard”);但我不知道如何从url获取视频?! – mostafa8026 2012-04-14 06:37:44
OK,通常捕捉对象可以得到int参数。 Int参数意味着您的系统上的相机索引。例如,如果您使用像这样的“Capture _Capture = New Capture(0);”你定义你的系统摄像机的索引号是零。有关更多详细信息,请参见此页面:http://www.emgu.com/wiki/files/2.3.0/document/html/0f3099f2-d381-4319-6b31-6c289fb1e744.htm – Kerberos 2012-04-14 08:38:00
如果您正在使用Emgu 3.1那就试试这个:
Capture cameraCapture
cameraCapture = new Capture("http://user:[email protected]://169.254.255.253");
Mat frame = cameraCapture.QueryFrame();
imageBox1.Image = frame;
这里是捕获类参考:
http://www.emgu.com/wiki/files/3.1.0/document/html/5edc4ff8-cec3-c5ee-8e62-629cf4c7940a.htm
希望它能帮助。
我只知道使用httpWebRequest是从我的panasonic ccty摄像头获取jpeg流图像的好方法,但是在motionJpegStream中,我如何获取视频,因为运动jpeg的内容类型是multiPart! – mostafa8026 2012-04-13 20:36:04
什么是您的操作系统?您是否在操作系统的设备管理器中看到此相机?我的意思是,你可以直接从操作系统访问吗? – Kerberos 2012-04-13 21:31:13
我使用Windows 7,是的,我在我的操作系统上看到它使用此链接:http://192.168.1.253/nphMotionJpeg?Resolution=320x240&Quality=Standard – mostafa8026 2012-04-14 05:42:15