user1098888
user1098888

Reputation: 13

is it possible to read video stream with opencv?

for this stream:

is there a class that can capture the stream for manipulation?

all i found was tutorials about how to make client server, or read from computer connected cam.

Update: it looks promising. trying to open this again failed , so i followed the asx which said:

<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>

so tried this which also didn't open(on cap.isOpen == false), too.

any suggestions?

the source:

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;

Upvotes: 1

Views: 13733

Answers (1)

Martin Beckett
Martin Beckett

Reputation: 96119

Yes and the nice feature is that the code is exactly the same as reading from a camera - see Reading and Writing Images and Video

Upvotes: 1

Related Questions