initial commit

This commit is contained in:
Joachim
2020-03-23 11:48:41 +01:00
commit fce6dc35b4
6434 changed files with 2823345 additions and 0 deletions

View File

@ -0,0 +1,51 @@
//! [includes]
#include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
#include <iostream>
//! [includes]
//! [namespace]
using namespace cv;
using namespace std;
//! [namespace]
int main( int argc, char** argv )
{
//! [load]
String imageName( "HappyFish.jpg" ); // by default
if( argc > 1)
{
imageName = argv[1];
}
//! [load]
//! [mat]
Mat image;
//! [mat]
//! [imread]
image = imread( samples::findFile( imageName ), IMREAD_COLOR ); // Read the file
//! [imread]
if( image.empty() ) // Check for invalid input
{
cout << "Could not open or find the image" << std::endl ;
return -1;
}
//! [window]
namedWindow( "Display window", WINDOW_AUTOSIZE ); // Create a window for display.
//! [window]
//! [imshow]
imshow( "Display window", image ); // Show our image inside it.
//! [imshow]
//! [wait]
waitKey(0); // Wait for a keystroke in the window
//! [wait]
return 0;
}

View File

@ -0,0 +1,14 @@
#include <iostream>
/**
* @function main
* @brief Main function
*/
int main( void )
{
//! [hello_world]
std::cout << "Hello World!";
//! [hello_world]
return 0;
}

View File

@ -0,0 +1,31 @@
#include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main( int argc, char** argv )
{
if( argc != 2)
{
cout <<" Usage: " << argv[0] << " ImageToLoadAndDisplay" << endl;
return -1;
}
Mat image;
image = imread(argv[1], IMREAD_COLOR); // Read the file
if( image.empty() ) // Check for invalid input
{
cout << "Could not open or find the image" << std::endl ;
return -1;
}
namedWindow( "Display window", WINDOW_AUTOSIZE ); // Create a window for display.
imshow( "Display window", image ); // Show our image inside it.
waitKey(0); // Wait for a keystroke in the window
return 0;
}