Joe Verbout / Mbed 2 deprecated main

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 //! [includes]
00002 #include "opencv2/core/core.hpp"
00003 #include "opencv2/imgcodecs.hpp"
00004 #include "opencv2/highgui/highgui.hpp"
00005 
00006 #include "mbed.h"
00007 
00008 #include <iostream>
00009 #include <string>
00010 //! [includes]
00011 
00012 //! [namespace]
00013 using namespace cv;
00014 //! [namespace]
00015 
00016 using namespace std;
00017 
00018 int main(int argc, char** argv)
00019 {
00020 
00021 
00022     //! [mat]
00023     Mat image;
00024     //! [mat]
00025 
00026     //! [imread]
00027     image = imread(imageName.c_str(), IMREAD_COLOR); // Read the file
00028                                                      //! [imread]
00029 
00030     if (image.empty())                      // Check for invalid input
00031     {
00032         cout << "Could not open or find the image" << std::endl;
00033         return -1;
00034     }
00035 
00036     return 0;
00037 }