Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法用 opencv 更快地流式传输视频?
我正在使用
Mat img; VideoCapture cap(.../video.avi); for (;;) { cap >> img; ... here is some calculations }
谢谢
由于帧抓取过程非常简单,您遇到的缓慢可能是由于某些计算消耗了您的 CPU,从而降低了您的应用程序显示的 FPS。
如果不查看执行此操作的代码,很难判断。
但查明问题根源的简单测试是简单地删除一些计算并制作一个简单的应用程序,从视频中读取帧并显示它们。就那么简单!如果此测试完美运行,那么您就知道性能受到正在执行的计算的影响。
祝你好运。