Created
July 11, 2014 15:16
-
-
Save pocket7878/ab0d3ca442fc434da93d 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 <iostream> | |
#include <string> | |
#include <opencv2/opencv.hpp> | |
#include <opencv2/nonfree/nonfree.hpp> | |
using namespace std; | |
using namespace cv; | |
int main(int argc, char* argv[]) { | |
// load color image | |
const char* imagename = argv[1] ; | |
Mat colorImage = imread(imagename, 1); | |
if (colorImage.empty()) { | |
cout << "file not found" << endl; | |
return -1; | |
} | |
namedWindow("img", CV_WINDOW_AUTOSIZE); | |
imshow("img", colorImage); | |
waitKey(0); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment