OpenCV: OpenCv移植到ARM-Linux

安装opencv2.0

解压OpenCV-2.0.0.tar.bz2
tar xvf OpenCV-2.0.0.tar.bz2

配置
./configure --host=arm-linux \
--without-carbon \
--without-quicktime \
--without-1394libs \
--without-ffmpeg \
--without-python \
--without-swig \
--without-gtk \
--enable-static \
--enable-shared \
--disable-apps \
--without-gtk \
--prefix=$PWD/output/A31 \
--libdir=$PWD/output/A31/lib \
--includedir=$PWD/output/A31/include


error: 'ptrdiff_t' does not name a type 解决方法:
Jose Luis Blanco  —  2011年5月9日 上午2:13:03
I confirm this bug and that it's serious since it prevents other
packages to build in SID with the newest g++ 4.6.

However, it can be very easily fixed by patching one single line, as
shown in the attached patch (also copied below):

=============================
diff -w -rupN OpenCV-2.1.0//include/opencv/cxcore.hpp
opencv-2.1.0//include/opencv/cxcore.hpp
--- OpenCV-2.1.0//include/opencv/cxcore.hpp	2010-04-06 03:24:40.000000000 +0200
+++ opencv-2.1.0//include/opencv/cxcore.hpp	2011-05-08 19:56:53.759113108 +0200
@@ -66,6 +66,7 @@ namespace cv {

 using std::vector;
 using std::string;
+using std::ptrdiff_t;

 template<typename _Tp> class CV_EXPORTS Size_;
 template<typename _Tp> class CV_EXPORTS Point_;
============================

Please, could a maintainer patch this package and issue a new rebuild??

BTW: After fixing this bug OpenCV seems not to completely build due to
a similar bug in the headers of libavcodec, but perhaps they've
already patched it too in SID.

Cheers,
Jose Luis

--Show footer

error: highgui/loadsave.cpp:333:28: error: ‘unlink’ was not declared in this scope   解决方法:
vi src/highgui/loadsave.cpp
加入: 
#include<unistd.h> 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
OpenCV 训练出来的算法移植ARM 平台上,需要考虑以下几个步骤: 1. 确认可用的 ARM 平台:首先,确定你要将算法移植到的 ARM 平台的类型和版本。因为 ARM 平台有各种不同的架构和技术,例如 ARM Cortex-A 系列和 Cortex-M 系列。根据具体的平台,选择合适的工具和库进行移植工作。 2. 配置开发环境:安装和配置适用于 ARM 平台的交叉编译工具链。ARM 平台上的编译需要使用能够生成适用于该平台指令集的编译器。同时,安装 OpenCV 库并配置编译参数,以便在 ARM 平台上进行编译。 3. 修改代码:修改 OpenCV 训练出来的算法的代码,使其适应 ARM 平台上的指令集和硬件架构。这可能包括针对 ARM 平台的优化、修改或移植特定的库或模块,以及确保代码在 ARM 平台上正常运行。 4. 编译和构建:使用配置好的交叉编译工具链,将修改后的代码编译为 ARM 平台可执行的二进制文件。确保编译和构建过程中不出现错误或警告。 5. 测试和调试:将生成的二进制文件上传到 ARM 平台上,并运行测试数据集。通过检查输出结果和性能指标,确保算法在 ARM 平台上的正确性和效率。 6. 优化和部署:根据需要进一步优化算法,使其在 ARM 平台上的性能达到最佳状态。最后,将编译好的二进制文件部署到目标 ARM 平台上,确保算法可以在实际应用中正常运行。 通过以上步骤,你可以将 OpenCV 训练出来的算法成功地移植ARM 平台上,实现在嵌入式系统或移动设备上进行图像处理和计算。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值