Created
December 2, 2014 23:00
-
-
Save abhinavjain241/91bbc71dba34e6b86534 to your computer and use it in GitHub Desktop.
Read an Image - 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 <iostream> | |
#include <opencv2/core/core.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
using namespace std; | |
using namespace cv; | |
int main() | |
{ | |
Mat image; | |
string fname; | |
cout << "Enter name of file:"; | |
cin >> fname; | |
image = imread(fname,CV_LOAD_IMAGE_COLOR); | |
namedWindow("Image",WINDOW_AUTOSIZE); | |
imshow("Image",image); | |
waitKey(0); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment