C
colin1501
Guest
Normally, I can get the window on Linux by using Putty & Xming through SSH. Now I'm trying to finish an OpenCV application in Linux by using VS2017, how can I get the window from the Linux system when I'm debugging the application.
for example:
#include <cstdio>
#include <opencv2/opencv.hpp>
using namespace std;
using namespace cv;
int main()
{
VideoCapture camera;
Mat frame;
camera.open(0);
if (!camera.isOpened())
cout << "failed to open camera!" << endl;
else
cout << "successed to open camera!" << endl;
camera.read(frame);
imshow("test", frame);
camera.release();
waitKey();
destroyAllWindows();
printf("hello from camera!\n");
return 0;
}
when I debug the code, the output is
"Unable to init server: 无法连接:拒绝连接
(test:28058): Gtk-[1;33mWARNING[0m **: cannot open display: "
(which means can not get connection: refuse to connect )
so what should I do?
Continue reading...
for example:
#include <cstdio>
#include <opencv2/opencv.hpp>
using namespace std;
using namespace cv;
int main()
{
VideoCapture camera;
Mat frame;
camera.open(0);
if (!camera.isOpened())
cout << "failed to open camera!" << endl;
else
cout << "successed to open camera!" << endl;
camera.read(frame);
imshow("test", frame);
camera.release();
waitKey();
destroyAllWindows();
printf("hello from camera!\n");
return 0;
}
when I debug the code, the output is
"Unable to init server: 无法连接:拒绝连接
(test:28058): Gtk-[1;33mWARNING[0m **: cannot open display: "
(which means can not get connection: refuse to connect )
so what should I do?
Continue reading...