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-getinstall build-essential
apt-getinstall cmake
apt-getinstall pkg-config
apt-getinstall libpng12-0 libpng12-dev libpng++-dev libpng3
apt-getinstall libpnglite-dev libpngwriter0-dev libpngwriter0c2
apt-getinstall zlib1g-dbg zlib1g zlib1g-dev
apt-getinstall libjasper-dev libjasper-runtime libjasper1
apt-getinstall pngtools libtiff4-dev libtiff4 libtiffxx0c2 libtiff-tools
apt-getinstall libjpeg8 libjpeg8-dev libjpeg8-dbg libjpeg-prog
apt-getinstall ffmpeg libavcodec-dev libavcodec52 libavformat52 libavformat-dev
apt-getinstall libgstreamer0.10-0-dbg libgstreamer0.10-0 libgstreamer0.10-dev
apt-getinstall libxine1-ffmpeg libxine-dev libxine1-bin
apt-getinstall libunicap2 libunicap2-dev
apt-getinstall libdc1394-22-dev libdc1394-22 libdc1394-utils
apt-getinstall swig
apt-getinstall libv4l-0 libv4l-dev
apt-getinstall python-numpy
apt-getinstall libpython2.6 python-dev python2.6-dev #You must installthis forpython 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