1 | initial version |
Use c++ interface and
#include <iostream>
#include "opencv2/opencv.hpp"
2 | No.2 Revision |
Use c++ interface and
#include <iostream>
#include "opencv2/opencv.hpp"
using namespace cv;
using namespace std;
int main( int argc, char** argv ){
Mat image; image = imread( argv[1] );
if( argc != 2 || !image.data )
{
cout << "No image data \n" <<endl;
return="" -1;=""
}
namedWindow( "Display Image", CV_WINDOW_AUTOSIZE );
imshow( "Display Image", image );
waitKey(0);
return 0;
}
3 | No.3 Revision |
Use c++ interface and
#include <iostream>
#include "opencv2/opencv.hpp"
using namespace cv;
using namespace std;
int main( int argc, char** argv ){
Mat image; image = imread( argv[1] );
if( argc != 2 || !image.data )
{
cout << "No image data \n" <<endl;
return="" -1;=""
-1;
}
namedWindow( "Display Image", CV_WINDOW_AUTOSIZE );
imshow( "Display Image", image );
waitKey(0);
return 0;
}
4 | No.4 Revision |
Use c++ interface and
#include <iostream>
#include "opencv2/opencv.hpp"
using namespace cv;
using namespace std;
int main( int argc, char** argv ){
Mat image; image = imread( argv[1] );
if( argc != 2 || !image.data )
{
cout << "No image data \n" <<endl;
return="" -1;
return=-1;
}
namedWindow( "Display Image", CV_WINDOW_AUTOSIZE );
imshow( "Display Image", image );
waitKey(0);
return 0;
}