Last active
July 18, 2016 20:00
-
-
Save Sinitca-Aleksandr/cb6eb920b805c08789c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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