Created
June 29, 2012 13:48
-
-
Save outsmartin/3018038 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 <opencv.hpp> | |
int main () | |
{ | |
// Open the file. | |
cv::Mat image; | |
image = cv::imread("Img01.jpg"); | |
if (!image.data) | |
{ | |
printf("Error: Couldn't open the image file.\n"); | |
return 1; | |
} | |
// Display the image. | |
cv::namedWindow("Image:"); | |
cv::imshow("Image:", image); | |
// 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