[英]stream video in OpenCV
I am running a simple OpenCV program on the beaglebone, for debugging purposes i would like to see a stream of the output. 我正在beaglebone上运行一个简单的OpenCV程序,出于调试目的,我希望看到输出流。 i have tried to do this in the command line
我试图在命令行中做到这一点
./myprog | avconv -f rawvideo -pix_fmt bgr24 -s 160x90 -r 30 -i - -an -f mpegts udp://192.168.7.1:1234
I am using VLC to play the udp stream on my laptop, but this does not seem to work,I am wondering what other ways i can achieve this, any help would be apreciated. 我正在使用VLC在笔记本电脑上播放udp流,但这似乎不起作用,我想知道还有什么其他方法可以实现这一点,对您的帮助将不甚感激。
and my program is simply, 我的程序很简单
int main()
{
VideoCapture capture(0);
if(!capture.isOpened()){
cout << "Failed to connect to the camera." << endl;
}
for(;;)
{
Mat frame;
capture >> frame;
if(frame.empty()){
cout << "Failed to capture an image" << endl;
return -1;
}
cout << frame.data;
return 0;
}
您没有关闭for
循环的括号。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.