Created
June 4, 2015 17:46
-
-
Save chakkritte/04dc2485e2cb21995f2e to your computer and use it in GitHub Desktop.
Example OpenCV
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\core\core.hpp> | |
#include<opencv2\highgui\highgui.hpp> | |
#define TEST_IMAGE "D:\\opencv.png" | |
int main(){ | |
// Open the file. | |
cv::Mat img = cv::imread(TEST_IMAGE); | |
// Display the image. | |
cv::namedWindow("Image:", CV_WINDOW_AUTOSIZE); | |
cv::imshow("Image:", img); | |
// Wait for the user to press a key in the GUI window. | |
cv::waitKey(0); | |
// Free the resources. | |
cv::destroyWindow("Image:"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment