下载cmake-3.9.0-Linux-x86_64.sh,cmake是帮助生成makefile的辅助工具,源码需要makefile才能编译,所以需要一个cmake程序,和上文中交叉编译工具配置方法一样,先用ssh复制到Ubuntu中,然后在terminal输入chmod 777 cmake-3.9.0-Linux-x86_64.sh获取最好权限,等出来一行do you accept the license后选择yes,接受软件许可。然后输入cd/home/vi/etc/environment更改PATH路径为:opencv交叉编译 讯为itop4412

然后source /etc/environment更改环境变量,cd返回用cmake -version查看版本,如果出来了cmake version3.9.0则cmake安装好了。

下载opencv-2.4.13.5,OpenCV的源码都是免费的,在网上都可以下载的到,因为最新的3.1版本用的人还比较少,所以选择了用的人较多的2.4的版本,用ssh复制到Ubuntu中,先unzip opencv-2.4.13.5 解压OpenCV源码包,解压好的目录下输入指令mkdir build新建一个build文件夹,cd build进入build文件夹,输入cmake-gui打开cmake。在cmake界面上,cmake。where is the source code 选择opencv码元的文件夹,where to build the binaries 选择build文件夹,按configure,选择第二项specify native compilers,在compilers下的C选择上文ARM交叉编译工具“arm-none-linux-gnueabi-gcc”文件夹中bin文件中的arm-none-linux-gnueabi-gcc,然后C++选择arm-none-linux-gnueabi-g++,点击finish。

opencv交叉编译 讯为itop4412

然后在弹出来的菜单中把WITH_OPENEXR的√去掉,点击configure,然后点击generate,在terminal上进入build文件夹输入make -j4,opencv的交叉编译便完成

 

相关文章:

  • 2021-09-26
  • 2021-09-13
  • 2021-08-28
  • 2021-12-01
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
猜你喜欢
  • 2021-07-06
  • 2021-11-27
  • 2021-09-02
  • 2022-12-23
  • 2021-12-10
  • 2022-12-23
  • 2021-08-22
相关资源
相似解决方案