Skip to content

Instantly share code, notes, and snippets.

@Sinitca-Aleksandr
Last active July 18, 2016 20:00
Show Gist options
  • Save Sinitca-Aleksandr/cb6eb920b805c08789c2 to your computer and use it in GitHub Desktop.
Save Sinitca-Aleksandr/cb6eb920b805c08789c2 to your computer and use it in GitHub Desktop.
#include "opencv2/highgui/highgui.hpp"
#include <iostream>
using namespace cv;
using namespace std;
int main(int argc, const char** argv)
{
Mat img = imread("Lighthouse.jpg", CV_LOAD_IMAGE_UNCHANGED); //Незабудьте указать имя своей картинки и положить ее в папку с проектом (с файлом)
if (img.empty())
{
cout << "Error : Image cannot be loaded....." << endl;
return -1;
}
namedWindow("MYWINDOW",CV_WINDOW_AUTOSIZE);
imshow("MYWINDOW", img);
waitKey(0);
cvvDestroyWindow("MYWINDOW");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment