This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/share/CodeBlocks/templates/wizard/opencv/files/main.cpp

19 lines
418 B
C++
Raw Normal View History

#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace cv;
int main(int argc, char *argv[])
{
Mat img = imread("arnold_schwarzenegger.jpg", CV_LOAD_IMAGE_COLOR);
if(img.empty())
return -1;
namedWindow("arnold_schwarzenegger", CV_WINDOW_AUTOSIZE );
imshow("arnold_schwarzenegger", img);
waitKey(0);
return 0;
}