Yes! Finally! I got the code working on linux!
Had to configure Code::Blocks. There were minor hiccups in configuring Code::Blocks, name ly the include libraries. How I managed to get the code running was by
- Creating a new console project in Code::Blocks
- Going to Project -> Build options, and in Linker Settings, added the whole gamut of library files (in the ‘Other Linker options’). For the sake of completeness, they were
-lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann
- In the Search Settings, added
/usr/local/include/opencv/for the compiler tab, and
/usr/local/lib/for the linker tab
- The next step involved copying all my source files and headers in the project directory, and including them in the project. And that’s it!
- EDIT: That, apparently, is not it. To locate the shared libraries the LD_LIBRARY_PATH environment variable needs to be set to the path of the opencv lib directory –
So, with that done finally, we can move on with
- Porting this code to the BeagleBoard/SBC
- Further development work, most notably getting the letter and shape recognition neural networks working. That shouldn’t take too much effort – the new interfaces can be explored.
- Updating the code to C++ according to the new framework. Now that would involve considerable (re-)learning.
And, here is an output of the code on the Raven logo! (Yes, loads of work is unfinished. But things are looking good! )