Joe Verbout
/
main
opencv on mbed
Diff: main.cpp
- Revision:
- 0:ea44dc9ed014
diff -r 000000000000 -r ea44dc9ed014 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Mar 31 21:16:38 2016 +0000 @@ -0,0 +1,37 @@ +//! [includes] +#include "opencv2/core/core.hpp" +#include "opencv2/imgcodecs.hpp" +#include "opencv2/highgui/highgui.hpp" + +#include "mbed.h" + +#include <iostream> +#include <string> +//! [includes] + +//! [namespace] +using namespace cv; +//! [namespace] + +using namespace std; + +int main(int argc, char** argv) +{ + + + //! [mat] + Mat image; + //! [mat] + + //! [imread] + image = imread(imageName.c_str(), 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; + } + + return 0; +}