hi all
i am trying to write my first opencv in windwos 10 , i’m using cygwin, my code llike below
int main( int argc, char** argv ) {
Mat img = imread( argv[1], 0 );
if( img.empty() ) return -1;
namedWindow( “E2”, cv::WINDOW_AUTOSIZE );
imshow( “E2”, img );
waitKey( 0 );
destroyWindow( “E2” );
}
compile method: compile will be success
g++ example_02-02.cpp -o example_02-02.exe -lopencv_core -lopencv_imgcodecs -lopencv_highgui
so after all when i’m trying to run the program, it couldn’t run and give this error:
Gtk-WARNING **: 23:30:56.598: cannot open display:
i need help to run away from this error