Install OpenCV3.0 on Ubuntu(linaro)12.04 in ARM

2024-05-05 13:58

本文主要是介绍Install OpenCV3.0 on Ubuntu(linaro)12.04 in ARM,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

      今天尝试用英语写篇技术文档,介绍在ARM板上安装OpenCV3.0。在ARM板上安装软件与我们在Windows下安装

软件有很大的不同,究其原因还是ARM架构下的软件不多,许多软件所需要的依赖库无法在ARM板上使用,又或者是

在ARM 板上无法安装。做嵌入式开发其实就是经验的积累,一些bug只有你遇到过才知道怎么解决,否则只有

自己google查资料解决,这也决定了做嵌入式开发不是一件容易的事。这个时候我们需要有耐心,遇到问题不害怕,

迎难而上,解决问题。在解决问题的过程中积累经验,不断提高自己的能力。

    好了,废话少说,上正文!





How to install opencv3.0 on linaro(12.04) in I.MX6Q?



First,we need to install the necessary dependencies because some program just need some necessaries like they will die without them. So we need to enter the following command on the terminal:

sudo apt-get install build-essential checkinstall cmake pkg-config yasm libtiff4-dev libjpeg-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev  python-dev python-numpy libqt4-dev libgtk2.0-dev ffmpeg


At this point, you will get a message about a conflict with the mesa drivers. Fix it by removing libqt4-opengl-dev, which was automatically installed above (you don't need it)
sudo apt-get remove libqt4-opengl-dev


Then you should download the OpenCV  version that you are interested in before.


After you abtained the OpenCV source code.Note that you are better to make sure the downloading version is suitable for your OS(WinX or linux or MAC). Do the following steps.


$ cd ~

$ unzip opencv-3.0.0-beta.zip

$ cd opencv-3.0.0-beta

$ mkdir build

$ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local-D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D WITH_V4L=ON..

$ ccmake .

If you have not installed ccmake,the terminal may suggest you install it.

After that,you are advised to be care to configure the makefile. You may change some variable values. Just turn on or turn off. In our case,we need to witch off the follows items by press [enter]

WITH_CUDA OFF

WITH_CUFFT OFF

WITH_OPENCLAMDBLAS OFF

WITH_OPENCLAMDFFT OFF

WITH_OPENGL OFF

WITH_OPENCL OFF


Finish the configuration and then type


[c]to config


it will then prompt the error on QT5 ... just press [e] to ignore, and then type

[g]to generate the makefile and it is ready to build


It is ready to build and install

$make

$sudo make install

It may take a while.In our case,it do take about 2 hours.So be patient!Patient is good,what do you see?

To get OpenCV work properly, we need to tell linaro:


$sudo /bin/bash -c 'echo "/usr/local/lib">/etc/ld.so.conf.d/opencv.conf'
$ sudo ldconfig

After all is done I recommend rebooting your system.Done!

Congratulations!You have succeeded in installing OpenCV3.0.


Finally,we advised you to make a test with some samples.And OpenCV just have gived us some.So careful it is! Then,do the following step:

$ cd opencv/opencv-3.0.0-beta/samples

$ sudo cmake .

$ sudo make

Now,you can run a sample.I think the drawing example is just so beautiful and inspiring.so I run it like this:

$ cd opencv/opencv-3.0.0-beta/samples/cpp

$ ./cpp-example-starters_video 0

If everything is Ok,you will see an amazing image. Good luck!


这篇关于Install OpenCV3.0 on Ubuntu(linaro)12.04 in ARM的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/961895

相关文章

idea npm install很慢问题及解决(nodejs)

《ideanpminstall很慢问题及解决(nodejs)》npm安装速度慢可通过配置国内镜像源(如淘宝)、清理缓存及切换工具解决,建议设置全局镜像(npmconfigsetregistryht... 目录idea npm install很慢(nodejs)配置国内镜像源清理缓存总结idea npm in

在Ubuntu上打不开GitHub的完整解决方法

《在Ubuntu上打不开GitHub的完整解决方法》当你满心欢喜打开Ubuntu准备推送代码时,突然发现终端里的gitpush卡成狗,浏览器里的GitHub页面直接变成Whoathere!警告页面... 目录一、那些年我们遇到的"红色惊叹号"二、三大症状快速诊断症状1:浏览器直接无法访问症状2:终端操作异常

Ubuntu向多台主机批量传输文件的流程步骤

《Ubuntu向多台主机批量传输文件的流程步骤》:本文主要介绍在Ubuntu中批量传输文件到多台主机的方法,需确保主机互通、用户名密码统一及端口开放,通过安装sshpass工具,准备包含目标主机信... 目录Ubuntu 向多台主机批量传输文件1.安装 sshpass2.准备主机列表文件3.创建一个批处理脚

Ubuntu如何升级Python版本

《Ubuntu如何升级Python版本》Ubuntu22.04Docker中,安装Python3.11后,使用update-alternatives设置为默认版本,最后用python3-V验证... 目China编程录问题描述前提环境解决方法总结问题描述Ubuntu22.04系统自带python3.10,想升级

Ubuntu 24.04启用root图形登录的操作流程

《Ubuntu24.04启用root图形登录的操作流程》Ubuntu默认禁用root账户的图形与SSH登录,这是为了安全,但在某些场景你可能需要直接用root登录GNOME桌面,本文以Ubuntu2... 目录一、前言二、准备工作三、设置 root 密码四、启用图形界面 root 登录1. 修改 GDM 配

如何在Ubuntu 24.04上部署Zabbix 7.0对服务器进行监控

《如何在Ubuntu24.04上部署Zabbix7.0对服务器进行监控》在Ubuntu24.04上部署Zabbix7.0监控阿里云ECS服务器,需配置MariaDB数据库、开放10050/1005... 目录软硬件信息部署步骤步骤 1:安装并配置mariadb步骤 2:安装Zabbix 7.0 Server

Ubuntu如何分配​​未使用的空间

《Ubuntu如何分配​​未使用的空间》Ubuntu磁盘空间不足,实际未分配空间8.2G因LVM卷组名称格式差异(双破折号误写)导致无法扩展,确认正确卷组名后,使用lvextend和resize2fs... 目录1:原因2:操作3:报错5:解决问题:确认卷组名称​6:再次操作7:验证扩展是否成功8:问题已解

k8s上运行的mysql、mariadb数据库的备份记录(支持x86和arm两种架构)

《k8s上运行的mysql、mariadb数据库的备份记录(支持x86和arm两种架构)》本文记录在K8s上运行的MySQL/MariaDB备份方案,通过工具容器执行mysqldump,结合定时任务实... 目录前言一、获取需要备份的数据库的信息二、备份步骤1.准备工作(X86)1.准备工作(arm)2.手

Ubuntu设置程序开机自启动的操作步骤

《Ubuntu设置程序开机自启动的操作步骤》在部署程序到边缘端时,我们总希望可以通电即启动我们写好的程序,本篇博客用以记录如何在ubuntu开机执行某条命令或者某个可执行程序,需要的朋友可以参考下... 目录1、概述2、图形界面设置3、设置为Systemd服务1、概述测试环境:Ubuntu22.04 带图

Ubuntu上手动安装Go环境并解决“可执行文件格式错误”问题

《Ubuntu上手动安装Go环境并解决“可执行文件格式错误”问题》:本文主要介绍Ubuntu上手动安装Go环境并解决“可执行文件格式错误”问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未... 目录一、前言二、系统架构检测三、卸载旧版 Go四、下载并安装正确版本五、配置环境变量六、验证安装七、常见