2
#include <opencv2/core/core.hpp>
3
#include <opencv2/imgcodecs.hpp>
4
#include <opencv2/highgui/highgui.hpp>
16
int main( int argc, char** argv )
19
string imageName("../data/HappyFish.jpg"); // by default
31
image = imread(imageName.c_str(), IMREAD_COLOR); // Read the file
34
if( image.empty() ) // Check for invalid input
36
cout << "Could not open or find the image" << std::endl ;
41
namedWindow( "Display window", WINDOW_AUTOSIZE ); // Create a window for display.
45
imshow( "Display window", image ); // Show our image inside it.
49
waitKey(0); // Wait for a keystroke in the window