【问题标题】:opencv display image without x serveropencv显示图像没有x服务器
【发布时间】:2014-07-21 18:35:34
【问题描述】:

我需要在不启动 x 服务器的情况下从启动时在 Linux 中显示图像

使用 opencv

我在 Raspberrypi 上使用 rasbian

错误是无法启动 GTK 代码(来自 cli) Gtk-WARNING **:无法打开显示:

基本代码可以是

#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;
}

欢迎任何进一步的问题或答案!

【问题讨论】:

    标签: image opencv raspberry-pi command-line-interface


    【解决方案1】:

    我使用了 SDL 库

    Home page SDL

    【讨论】:

      猜你喜欢
      • 2021-02-01
      • 2018-12-08
      • 1970-01-01
      • 1970-01-01
      • 2014-01-16
      • 2019-05-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多