opencv on mbed
main.cpp
- Committer:
- joeverbout
- Date:
- 2016-03-31
- Revision:
- 0:ea44dc9ed014
File content as of revision 0:ea44dc9ed014:
//! [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;
}