opencv display image without x server

◇◆丶佛笑我妖孽 提交于 2020-02-24 08:45:56

问题


I need to display an image in Linux from startup without starting an x server

Using opencv

I am using rasbian on Raspberrypi

The error is cannot start GTK code (from cli) Gtk-WARNING **: cannot open display:

basic code could be

#include <cv.h>
#include <cvaux.h>
#include <highgui.h>
using namespace cv;
int main(int argc, char* argv[ ]){
 Mat image = imread(argv[1]);
 namedWindow(“Sample Window”);
 imshow(“Sample Window”,image);
 waitKey(0);
 return 0;
}

Any further questions or answers welcome!!


回答1:


I used the SDL library

Home page SDL



来源:https://stackoverflow.com/questions/24872281/opencv-display-image-without-x-server

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