Using imshow in opencv without running X

左心房为你撑大大i 提交于 2019-12-11 00:59:44

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/38801999/using-imshow-in-opencv-without-running-x

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!