Created
February 15, 2015 06:13
-
-
Save betapcode/12fb912c2f66b3be6337 to your computer and use it in GitHub Desktop.
file test sử dụng opencv sử dụng C++
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 <stdio.h> | |
#include <opencv2/opencv.hpp> | |
using namespace cv; | |
int main(int argc, char** argv ) | |
{ | |
if ( argc != 2 ) | |
{ | |
printf("usage: DisplayImage.out <Image_Path>\n"); | |
return -1; | |
} | |
Mat image; | |
image = imread( argv[1], 1 ); | |
if ( !image.data ) | |
{ | |
printf("No image data \n"); | |
return -1; | |
} | |
namedWindow("Display Image", WINDOW_AUTOSIZE ); | |
imshow("Display Image", image); | |
waitKey(0); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment