Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 }
Generated on Tue Jul 12 2022 16:42:38 by
1.7.2