Step 1: install the following package: apt-getinstallbuild-essentialapt-getinstallcmakeapt-getinstallpkg-configapt-getinstalllibpng12-0libpng12-devlibpng-devlibpng3apt-getinstalllibpnglite-devlibpngwriter0-devlibpngwriter0c2apt-get
Step 1: install the following package: apt-get install build-essential apt-get install cmake apt-get install pkg-config apt-get install libpng12-0 libpng12-dev libpng-dev libpngng3 apt-get install libpnglite-dev libpngwriter0-dev libpngwriter0c2 apt- get
Step 1: install the following package:
apt- get install build-essential
apt- get install cmake
apt- get install pkg-config
apt- get install libpng12-0 libpng12-dev libpng++-dev libpng3
apt- get install libpnglite-dev libpngwriter0-dev libpngwriter0c2
apt- get install zlib1g-dbg zlib1g zlib1g-dev
apt- get install libjasper-dev libjasper-runtime libjasper1
apt- get install pngtools libtiff4-dev libtiff4 libtiffxx0c2 libtiff-tools
apt- get install libjpeg8 libjpeg8-dev libjpeg8-dbg libjpeg-prog
apt- get install ffmpeg libavcodec-dev libavcodec52 libavformat52 libavformat-dev
apt- get install libgstreamer0.10-0-dbg libgstreamer0.10-0 libgstreamer0.10-dev
apt- get install libxine1-ffmpeg libxine-dev libxine1-bin
apt- get install libunicap2 libunicap2-dev
apt- get install libdc1394-22-dev libdc1394-22 libdc1394-utils
apt- get install swig
apt- get install libv4l-0 libv4l-dev
apt- get install python-numpy
apt- get install libpython2.6 python-dev python2.6-dev #You must install this for python support
|
It is best to install the SDK using the following method:
Enter gedit topack in the terminal. A text edit box is displayed. In the first line of the text box, enter :#! /Bin/sh, paste the above package and save it. Return to the terminal and enter sudo chmod + x topack, and then run the script sudo./topack .. Wait until the installation is complete.
Step 2: Download opencv-2.2.0.tar.bz2 and decompress it to the corresponding folder.
Step 3: Install cmake. First, create a folder OpenCV-build in the directory at the same level as the source code package, and then install cmake. Sudo apt-get install cmake under the terminal, and then sudo apt-get install cmake-qt-gui. After the installation is successful, enter cmake-gui on the terminal to open an interface: click "Browse Source" to select the extracted Source code folder, click "Browse Build" to select the OpenCV-build folder you just created, and click "configure". Then, you can click "Generate, however, the Generate button is still gray. Click the configure button again. You can click Generate to see the success prompt below.
Step 4: Open the OpenCV-build folder, which contains the Makefile file. Open the terminal, go to OpenCV-build, and enter make. This series of sharp installation processes should appear...
Step 5: Finally, enter sudo make install to complete the installation.
Step 6: terminal to the unzipped OpenCV-2.2.0 \ samples \ c folder, there is a build_all.sh script, execute it: bash. /build_all.sh. After successful execution, the ls command is used to view and generate a facedetect execution file ,. /execute facedetect! If a face capture window pops up, congratulations, you have succeeded.
Note: If the last execution of facedetect reports an error:./facedetect: error while loading shared libraries: libopencv_core.so.2.2: cannot open shared object file: No such file or directory.
Run the following command on the terminal: export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/usr/local/lib.
Run:./facedetect.
Note: 'pkg-config opencv -- libs -- cflags opencv 'should be added for compilation.
Installation is complete. OVER