Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9874 Discussions

How to Capture Video Stream from Edi-Cam Server using C++ in openCV?

YYeon1
Novice
1,077 Views

Hi everyone,

I am trying to do some processing on video being streamed from an Edi-Cam server (https://github.com/drejkim/edi-cam GitHub - drejkim/edi-cam: Video streaming on Intel Edison ) which is written in nodejs.

Is it possible for me to capture video stream from Edi-Cam Server using C++ in openCV?

The C++ coding that i wrote as follow:

# include

# include

# include

# include

# include

using namespace std;

using namespace cv;

int main()

{

Mat frame;

namedWindow("video", 1);

VideoCapture cap(" http://192.168.8.102:8080/video.mjpg");

if(!cap.isOpened())

{

cout<<"Camera not found"<<endl;

getchar();

return -1;

}

while ( cap.isOpened() )

{

cap >> frame;

if(frame.empty()) break;

imshow("video", frame);

if(waitKey(30) >= 0) break;

}

return 0;

}

When running the C++, it does not show me the video and show me "Camera not found".

However, in Intel Edison terminal, it shows:

 

"GET /video.mjpg 206 87.816 ms - 1248"

Thank you.

0 Kudos
1 Solution
idata
Community Manager
150 Views

Hi Yeong,

 

 

We realized that this case is a duplicate of this other thread https://communities.intel.com/thread/106958 https://communities.intel.com/thread/106958. We are going to close this case and help you in the other thread.

 

 

Have a nice day!

 

 

Regards,

 

-Leonardo

View solution in original post

2 Replies
idata
Community Manager
150 Views

Hello Yeong,

 

 

I'm moving this thread from Wireless to the Edison support community.

 

 

Kind regards,

 

Carlos A.
idata
Community Manager
151 Views

Hi Yeong,

 

 

We realized that this case is a duplicate of this other thread https://communities.intel.com/thread/106958 https://communities.intel.com/thread/106958. We are going to close this case and help you in the other thread.

 

 

Have a nice day!

 

 

Regards,

 

-Leonardo
Reply