简体   繁体   English

Emgu CV发生了1秒的视频流延迟

[英]1 second video stream latency occurred with Emgu CV

I have a sight line decoder device connected to my PC via Ethernet. 我有一个视线解码器设备通过以太网连接到我的PC。

I used Emgucv to capture the video stream and view it in an image box. 我使用Emgucv捕获视频流并在图像框中查看它。

Here is part of the code: 这是代码的一部分:

 _capture = new Capture("udp://@169.254.1.144:15004");
 _capture.ImageGrabbed += ProcessFrame;

 Image<Bgr, Byte> frame,frame1;

 private void ProcessFrame(object sender, EventArgs arg)
 {
     frame = _capture.RetrieveBgrFrame();
     pictureBox1.Image = frame.ToBitmap();
 }

The video viewed in the Imagebox , but with 1 sec latency; Imagebox观看的视频,但有1秒的延迟; I counted the frame reached the ProcessFramefunction and its 12fps and its correct; 我计算出帧达到了ProcessFramefunction及其12fps和正确的水平;

Does the ImageGrabbed event cause this latency? ImageGrabbed事件是否导致此延迟?

Why does the latency occur? 为什么会发生延迟?

Note : I used an usb camera instead the sightline and worked fine; 注意:我使用USB摄像头代替了视线,并且效果很好; also the sightline plus which can play the camera via Ethernet works fine too. 另外,可以通过以太网播放摄像机的视线外线也可以正常工作。

This is caused by the length of the default buffer used by the 'Capture' object. 这是由“捕获”对象使用的默认缓冲区的长度引起的。 Raw OpenCV has a 'CV_CAP_PROP_BUFFERSIZE' flag you can set to alter this value using .set() 原始OpenCV具有一个“ CV_CAP_PROP_BUFFERSIZE”标志,您可以使用.set()进行设置以更改此值

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM