Ask Your Question

Revision history [back]

Cross compilation of opencv_contrib modules

Dear OpenCV users,

I am using Opencv3.1.0 and I need to cross compile it on a linux platform. According to the documentation ( I configured Cmake: cmake -DCMAKE_TOOLCHAIN_FILE=/home/myuser/projects/EXT-OPENCV/opencv-3.1.0/platforms/linux/arm-gnueabi.toolchain.cmake /home/myuser/projects/EXT-OPENCV/opencv-3.1.0/ This worked. I could also using opencv without problems in my Eclipse project

Now I need to use opencv_contrib modules, in particular ARUCO. I therefore reconfigured using: cmake -DOPENCV_EXTRA_MODULES_PATH=/home/myuser/projects/EXT-OPENCV/opencv_contrib-master/modules -DBUILD_opencv_aruco=ON -DCMAKE_TOOLCHAIN_FILE=/home/myuser/projects/EXT-OPENCV/opencv-3.1.0/platforms/linux/arm-gnueabi.toolchain.cmake /home/myuser/projects/EXT-OPENCV/opencv-3.1.0/

Unfortunately after installing and trying to use ARUCO in my Eclipse project I get the following errors: skipping incompatible /usr/local/lib/ when searching for -lopencv_aruco make: * [deviceinfo] Error 1 cannot find -lopencv_aruco and are present under /usr/local/lib together with all the other opencv lib. I assume that the toolchain was not used for the opencv_contrib modules. Is there a way to obtain to get the opencv_contrib modules also to be cross compiled?

Thanks in advance for any help!