问题
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