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

相关文章

pico2 开发环境搭建-基于ubuntu

pico2 开发环境搭建-基于ubuntu 安装编译工具链下载sdk 和example编译example 安装编译工具链 sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib 注意cmake的版本,需要在3.17 以上 下载sdk 和ex

在Ubuntu 20.04上安装Nginx的方法

前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家。点击跳转到网站。 简介 Nginx 是世界上最流行的 Web 服务器之一,负责托管互联网上一些最大和流量最高的网站。它是一个轻量级选择,可以用作 Web 服务器或反向代理。 在本指南中,我们将讨论如何在 Ubuntu 20.04 服务器上安装 Nginx,调整防火墙,管理 Nginx 进程,并设置服务器块以从单

虚拟机ubuntu配置opencv和opencv_contrib

前期准备  1.下载opencv和opencv_contrib源码 opencv-4.6.0:https://opencv.org/releases/ opencv_contrib-4.6.0:https://github.com/opencv/opencv_contrib 在ubuntu直接下载或者在window上下好传到虚拟机里都可以 自己找个地方把他们解压,个人习惯在home下新建一

bash: arm-linux-gcc: No such file or directory

ubuntu出故障重装了系统,一直用着的gcc使用不了,提示bash: arm-linux-gcc: No such file or directorywhich找到的命令所在的目录 在google上翻了一阵发现此类问题的帖子不多,后来在Freescale的的LTIB环境配置文档中发现有这么一段:     # Packages required for 64-bit Ubuntu

编译linux内核出现 arm-eabi-gcc: error: : No such file or directory

external/e2fsprogs/lib/ext2fs/tdb.c:673:29: warning: comparison between : In function 'max2165_set_params': -。。。。。。。。。。。。。。。。。。 。。。。。。。。。。。。。 。。。。。。。。 host asm: libdvm <= dalvik/vm/mterp/out/Inte

解决ubuntu系统无法与FinalShell无法连接问题

问题 解决方案 先下载ubuntu网络工具 sudo apt install net-tools 输入密码 下载完成后进入管理员模式查看密码 sudo -i hostname -I 查看IP 得到ip地址后再继续安装 openssh-server 插件 sudo apt-get install openssh-server 问题解决 尝试连接Fina

收藏:解决 pip install 出现 error: subprocess-exited-with-error 错误的方法

在使用 pip 安装 Python 包时,有时候会遇到 error: subprocess-exited-with-error 错误。这种错误通常是由于 setuptools 版本问题引起的。本文将介绍如何解决这一问题 当你使用 pip install 安装某个 Python 包时,如果 setuptools 版本过高或过低,可能会导致安装过程出错,并出现类似以下错误信息:error: subpr

hector_quadrotor编译总结 | ubuntu 16.04 ros-kinetic版本

hector_quadrotor编译总结 | ubuntu 16.04 ros-kinetic版本 基于Ubuntu 16.04 LTS系统所用ROS版本为 Kinetic hector_quadrotor ROS包主要用于四旋翼无人机的建模、控制和仿真。 1.安装依赖库 所需系统及依赖库 Ubuntu 16.04|ros-kinetic|Gazebo|gazebo_ros_pkgs|ge

hector_quadrotor编译总结 | ubuntu 14.04 ros-indigo版本

hector_quadrotor编译总结 | ubuntu 14.04 ros-indigo版本 基于Ubuntu 14.04 LTS系统所用ROS版本为 Indigo hector_quadrotor ROS包主要用于四旋翼无人机的建模、控制和仿真。 备注:两种安装方式可选:install the binary packages | install the source files

[轻笔记]ubuntu shell脚本切换conda环境

source /home/yourhostname/anaconda3/etc/profile.d/conda.sh # 关键!!!conda activate env_name