【问题标题】:is it possible to read video stream with opencv?是否可以使用 opencv 读取视频流?
【发布时间】:2011-12-14 23:39:46
【问题描述】:

对于this 流:

是否有可以捕获流进行操作的类?

我发现的只是有关如何制作客户端服务器或从计算机连接的摄像头读取的教程。

更新: 看起来很有希望。 试图打开 this again 失败,所以我按照 asx 说:

<asx version="3.0">
    <!-- GMEmbed -->
    <title>CastUP: Ayalon</title>
    <entryref href="http://switch3.castup.net/cunet/gm.asp?format=wm&s=4A59334AD43141A7BFD73D7CE6B71560&ci=15369&ak=35143679&ClipMediaID=21329&authi=&autht=&dr=" />
</asx>

所以尝试了this,它也没有打开(在 cap.isOpen == false 上)。

有什么建议吗?

来源:

Mat frame;
VideoCapture Ayalon("http://switch3.castup.net/cunet/gm.asp?format=wm&s=4A59334AD43141A7BFD73D7CE6B71560&ci=15369&ak=35143679&ClipMediaID=21329&authi=&autht=&dr=");
int delay = 1000/Ayalon.get(CV_CAP_PROP_FPS);// (1 second / fps) = delay between frames
bool stop(false);               
if (!Ayalon.isOpened()) 
    return 1;                   
namedWindow("ayalon Stream");
while (!stop) {
    if (!Ayalon.read(frame))
        break;
    imshow("ayalon Stream",frame);
    if (waitKey(delay) >0 )
        stop = true;
}   
Ayalon.release();
waitKey(7000);
return 1;

【问题讨论】:

标签: visual-c++ opencv video-streaming


【解决方案1】:

是的,很好的功能是代码与从相机读取完全相同 - 请参阅Reading and Writing Images and Video

【讨论】:

  • 更具体地说,将您的源IP地址作为路径参数:cap.open("http://ip:port/resource");
猜你喜欢
  • 2013-08-21
  • 1970-01-01
  • 2016-09-30
  • 1970-01-01
  • 2018-07-22
  • 1970-01-01
  • 2014-04-30
  • 2013-11-08
  • 1970-01-01
相关资源
最近更新 更多