如何在opencv 2.1中使用basler ip摄像头抓取视频序列?
我无法通过网络摄像机进行流式传输,因为它说它返回 null。 它警告说:
Error opening file c:\user\vp\ocv\opencv\src\highgui\cvcap_ffmpeg.cpp:452
希望有人能帮助我。
I could not stream over the ip camera because it say it return null.
It stated warning:
Error opening file c:\user\vp\ocv\opencv\src\highgui\cvcap_ffmpeg.cpp:452
hope someone can help me with it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法直接从 IP 摄像机检索 OpenCV 的图像数据。您需要通过 Pylon API 访问原始数据(
get char* data
),然后复制到iplimage
->imageData
。然后你可以用 OpenCV 抓取每一帧,但不要使用
ffmpeg
,尝试 VideoForWindows (vfw
),它更容易使用,并且 OpenCV 出现的问题也更少。您收到的错误是由于 ffmpeg 尝试查找您选择的编解码器或配置不正确造成的一些问题。
You cannot retrieve image data from OpenCV directly from IP cameras. You need to acces raw data through the Pylon API (
get char* data
), and then copy toiplimage
->imageData
.Then you could grab every frame with OpenCV, but don't use
ffmpeg
, try VideoForWindows (vfw
), it's easier to use and give less problems with OpenCV.The error you're getting is due to some problems ffmpeg trying to find the codec you selected, or an incorrect configuration.