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