Skip to content

Instantly share code, notes, and snippets.

@betapcode
Created February 15, 2015 06:13
Show Gist options
  • Save betapcode/12fb912c2f66b3be6337 to your computer and use it in GitHub Desktop.
Save betapcode/12fb912c2f66b3be6337 to your computer and use it in GitHub Desktop.
file test sử dụng opencv sử dụng C++
#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