在opencv中使用imshow而不运行X [英] Using imshow in opencv without running X

查看:986
本文介绍了在opencv中使用imshow而不运行X的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序与Raspberry Pi运行Debian,这是非常好的性能要求,我试图避免启动X,当引导和直接跳转到程序。这样做很好,但是如果我想在OpenCV中使用'imshow'功能,它不能正常工作,而是说'GTK-Warning:无法打开显示器'并退出程序。



使用imshow或没有X的任何其他功能,使用opencv显示全屏图像/视频捕获是否可行,还是完全依赖于X?



谢谢,






为了澄清,有一个显示器,它只显示终端提示而不是桌面。所以,覆盆子pi以正确的分辨率得到一个屏幕的图像,我想我不明白X11对于opencv如何处理窗口/图像?我想象很多不容易复制的。



但是,如果没有其他选项,可能会有一个轻量级的X11替代方案,谢谢你的提示。

解决方案

显然,视频输出必须去某个地方...你可以尝试Xvfb作为一个完整的X11实例的替代品。


I've got an application with a Raspberry Pi running Debian that is pretty performance demanding and I am trying to avoid starting X when booting and jumping directly into the program. This works fine, but if I would like to use the 'imshow' function in OpenCV, it does not work correctly, instead it says 'GTK-Warning: cannot open display" and exits the program.

Is it feasible to display a fullscreen image/video capture with opencv using imshow or any other function without X, or is it entirely dependent on the X?

Thanks,


For clarification, there is a monitor, it just shows the terminal prompt instead of a desktop. So the raspberry pi is getting an image to a screen at the correct resolution, I guess what I don't understand is what X11 does for opencv as far as handling of the window/image? I imagine a lot that cant be easily replicated.

But maybe a lightweight X11 alternative would be the best way to go if there's not another option, thanks for the tip.

解决方案

Well, obviously the video output has to go somewhere... You could try Xvfb as a leight-weight alternative to a full X11 instance.

这篇关于在opencv中使用imshow而不运行X的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆