initial commit
This commit is contained in:
20
HelloCV/main.cpp
Normal file
20
HelloCV/main.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include <iostream>
|
||||
#include "opencv2/opencv.hpp"
|
||||
|
||||
int main(int argv, char* argc[]) {
|
||||
std::cout << "Hello, OpenCV " << CV_VERSION << std::endl;
|
||||
|
||||
cv::Mat img;
|
||||
img = cv::imread("c:\\coding\\images\\lenna.bmp");
|
||||
|
||||
if (img.empty()) {
|
||||
std::cerr << "Image load failed!" << std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
cv::namedWindow("image");
|
||||
cv::imshow("image", img);
|
||||
|
||||
cv::waitKey();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user