Locations

Vision System for Industrial Robots

 
4. OpenCV cross compilation results
Update #10169  |  18 Jan 2015
 

OpenCV test application result


In this update, I want to show application written in Qt which uses compiled OpenCV library and show how I made this step by step. Application take image from camera connected to Iris board, process canny edge detection and convert it to QImage for screen display.

OpenCV cross compilation


In order to get OpenCV running on Colibri T20 platform I decided to build OpenCV 2.4.9 from source code using CMake tool. I follow up [1] "Cross compilation for ARM based Linux systems" documentation with few changes, I created my own toolchain.cmake file where I specify CXX compiler, C compiler with previously builded toolchain for hard float calling convention "arm-linux-gnueabihf". Also I specify target root path and other basic things like system processor and name.

 

File toolchain.cmake used to cross compile OpenCV.

 

After successful cross compilation I moved compiled files to target platform and then I went for setting up OpenCV on my developer computer. I used [2] "Installation in Linux" tutorial from OpenCV website in order to get it done.

 

OpenCV test application code


When I had OpenCV builded for Colibri T20 and developer computer, I created simple application to test OpenCV libraries on target board. Application has been created using Qt Creator which I configured in last update.

It was important to pass information to linker where he should look for OpenCV libs and include files for our target. I would like to present here code of test application:

 

OpenCV test application project file

 

OpenCV test application header file

 

OpenCV test application source file

 

References


 

Comments