简体   繁体   English

OpenCV小屏幕显示延迟?

[英]OpenCV small screen showing delay?

I am using OpenCV to write an app (in C++ on Windows 7) that uses the cv.camshift() function to track an object on the screen. 我正在使用OpenCV编写一个应用程序(在Windows 7上为C ++),该应用程序使用cv.camshift()函数跟踪屏幕上的对象。 I noticed that the my camera window (my application window showing what the camera sees) has a little delay with respect to very rapid motions. 我注意到我的相机窗口(我的应用程序窗口显示了相机看到的内容)相对于非常快的动作有一点延迟。 The delay seems to be about 0.1 seconds - very small, but noticable. 延迟似乎约为0.1秒-非常小,但值得注意。 I am developing an application that is very sensitive to these delays. 我正在开发对这些延迟非常敏感的应用程序。 In order to rule out my coding error, I tried to use one of the OpenCV sample video apps that shows what the camera sees on the screen and it also had this tiny delay. 为了排除编码错误,我尝试使用其中一个OpenCV示例视频应用程序,该应用程序显示了相机在屏幕上看到的内容,并且它也有微小的延迟。 Interestingly, when I look at what my camera sees through Skype, there seems to be virtually no delay at all. 有趣的是,当我查看摄像机通过Skype看到的内容时,似乎几乎没有延迟。 Is there anything I can do to make OpenCV operate faster to get rid of this tiny delay? 我有什么办法可以使OpenCV更快地运行,从而摆脱这种微小的延迟?

CamShift detects motion using meanShift - the mean motion of the object center. CamShift使用meanShift-对象中心的平均运动来检测运动。 This has to be calculated over more than one frame. 必须在一个以上的帧上进行计算。 For a frame rate of 30 Hz, a depth of 3 frames would be 0.1 seconds. 对于30 Hz的帧速率,3帧的深度将为0.1秒。

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

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