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