Skip to content

Instantly share code, notes, and snippets.

@sjyun
Created November 17, 2017 03:57
Show Gist options
  • Save sjyun/51f803a9068d44bc7d0ea8d13d0f4d22 to your computer and use it in GitHub Desktop.
Save sjyun/51f803a9068d44bc7d0ea8d13d0f4d22 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <opencv2/opencv.hpp>
int main()
{
std::cout << "openCV version" << CV_VERSION << std::endl;
cv::Mat img;
cv::namedWindow("test01", CV_WINDOW_AUTOSIZE);
img = cv::imread("test1.png", CV_LOAD_IMAGE_COLOR);
if (img.empty())
{
std::cout << "[!] image not found" << std::endl;
return -1;
}
cv::imshow("example1", img);
cv::waitKey(0);
cv::destroyWindow("example01");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment