OpenCV migration under Ubuntu and Linux systems

Source: Internet
Author: User

1 Installing Cmake-qt-gui:sodo apt-get install Cmake-qt-gui

2. Configure CMake:

Go to the folder where opencv2.4.10 is stored and enter Cmake-gui. Go to the following screen, click Configure, select the last one, next



After finish, tick the following two:




Get rid of the following two:



Click Configure again, and then generate

Go to the/arm-opencv/folder and run the following command

Make

Run after success

Make install

3. Configure the OPENCV environment:

Open the installation directory: /arm-opencv/cmakecache.txt. Modify the following



Copy all files under Arm-opencv/lib to Usr/local/lib, arm-opencv/include all files under Usr/local/include. If you do not have permissions, perform Sudochown–r niostar/usr/local

Note the/usr/local/lib/pkgconfig folder. Create a new file inside the ARM-OPENCV.PC

Content is consistent with arm-opencv/unix-install/opencv.pc. But note that after copying, change to arm-opencv.pc the name.


4. Changing variables

the file /etc/ld.so.conf add a line of code /usr/local/lib


sudo gedit/etc/bash.bashrc last line Add

Pkg_config_path= $PKG _config_path:/usr/local/lib/pkgconfig

Export Pkg_config_path

5. Compile.

test programs, such as folders Test.cpp

The compile command is as follows


arm-linux-g++ ' pkg-config--cflags arm-opencv ' pkg-config--libs arm-opencv ' TEST2.CPP-LPTHREAD-LRT-LDL

6.ARM Board test run

will be arm-opencv/ the entire folder is copied to Arm the file system of the board, but requires ARM The path under the board is the same as the virtual machine path.

Run the test program and you can successfully

#include <cv.h>  #include <cxcore.h>  #include 





OpenCV migration under Ubuntu and Linux systems

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.