opencv4.5.0+tbb+contribe移植到ARM环境
一、官网下载源码
1.opencv官网源码和contrib源码下载
2.解压源码
unzip xx.zip
二、安装编译环境
1.先安装cmake和cmake-qt-gui
sudo apt-get install cmake
sudo apt-get install cmake-qt-gui
2.创建编译输出文件夹和安装文件夹
3.进入配置gui
cmake-gui
这是我配置后的图片
三、配置编译环境
1.添加资源路径和输出路径
2.选择自定义编译器
3.编译器配置(这里的是ARM32位的编译器)
(1) 如果Operating System 填写的不是Linux,则可能会出现编译出来的库所依赖库的路径为相对路径,使用改库时会报错:
error while loading shared libraries: …/…/lib/libopencv_core.so: cannot open shared object file: No such file or directory
(2)查看库依赖路径:
readelf -d libopencv_core.so
-
错误的路径
Dynamic section at offset 0x317ee4 contains 31 entries:
标记 类型 名称/值
0x00000001 (NEEDED) 共享库:[…/…/libopencv_core.so.4.5]
0x00000001 (NEEDED) 共享库