2011-12-14 91 views
1

對於this流:是否可以使用opencv讀取視頻流?

是否有一個類可以捕獲操作流?

我發現的所有內容都是關於如何製作客戶端服務器或者從計算機連接的攝像頭讀取的教程。

更新: 它看起來很有前途。 試圖打開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 ==假),太。

有什麼建議嗎?

來源:

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; 
+0

見:HTTPS://www.cs.utexas。 edu /〜teammco/misc/udp_video/ – gbjbaanb 2014-08-13 14:05:20

回答

1

是和不錯的功能是,代碼是完全一樣從相機讀 - 見Reading and Writing Images and Video

+3

更具體地說,把你的源IP地址作爲路徑參數:`cap.open(「http:// ip:port/resource」); – Sam 2011-12-15 07:02:02

相關問題