The opencv package contains graphics libraries mainly aimed at real-time computer vision.
This package is known to build and work properly using an LFS-8.0 platform.
Download (HTTP): http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/3.2.0/opencv-3.2.0.zip
Download MD5 sum: bfc6a261eb069b709bcfe7e363ef5899
Download size: 78 MB
Estimated disk space required: 556 MB
Estimated build time: 8.1 SBU
Optional file (will be downloaded when running cmake if not present): https://raw.githubusercontent.com/opencv/opencv_3rdparty/81a676001ca8075ada498583e4166079e5744668/ippicv/ippicv_linux_20151201.tgz
Optional additional modules: https://github.com/opencv/opencv_contrib/archive/3.2.0.tar.gz
Download the additional modules via wget as:
wget https://github.com/opencv/opencv_contrib/archive/3.2.0.tar.gz \ -O opencv_contrib-3.2.0.tar.gz
CMake-3.7.2 and UnZip-6.0
FFmpeg-3.2.4, gst-plugins-base-1.10.3, GTK+-3.22.8, JasPer-2.0.10, libjpeg-turbo-1.5.1, libpng-1.6.28, LibTIFF-4.0.7, libwebp-0.6.0, Python-2.7.13, v4l-utils-1.12.3, and xine-lib-1.2.6
apache-ant-1.10.1, Doxygen-1.8.13, Java-1.8.0.121, Python-3.6.0, Cuda, Eigen, OpenEXR, GCD, GDAL, GigEVisionSDK, JACK, libdc1394, libgphoto2, NumPy, OpenNI, PlanetUML, PvAPI, Threading Building Blocks (TBB), UniCap, VTK - The Visualization Toolkit, and XIMEA
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/opencv
If the optional Integrated Performance Primitives (IPP) package has been downloaded, put it in place so the cmake script does not try to download it again:
ipp_file=../ippicv_linux_20151201.tgz && ipp_hash=$(md5sum $ipp_file | cut -d" " -f1) && ipp_dir=3rdparty/ippicv/downloads/linux-$ipp_hash && mkdir -p $ipp_dir && cp $ipp_file $ipp_dir
If needed, unpack the additional modules package:
tar xf ../opencv_contrib-3.2.0.tar.gz
Install opencv by running the following commands:
mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/usr \ -DWITH_XINE=ON \ -DBUILD_TESTS=OFF \ -DENABLE_PRECOMPILED_HEADERS=OFF \ -Wno-dev .. && make
The package does not come with an operable test suite.
Now, as the root
user:
make install && case $(uname -m) in x86_64) ARCH=intel64 ;; *) ARCH=ia32 ;; esac && cp -v 3rdparty/ippicv/ippicv_lnx/lib/$ARCH/libippicv.a /usr/lib && unset ARCH
-DWITH_XINE=ON
: This option
instructs the make procedure to use xine-lib-1.2.6.
-DENABLE_PRECOMPILED_HEADERS=OFF
:
This option is needed for compatibiiity with gcc-6.1 and later.
-DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-3.2.0/modules
:
instructs the build system to build the additional modules.
cp -v 3rdparty/.../libippicv.a /usr/lib: This command installs a 3rdparty library.
Last updated on 2017-02-19 17:09:49 -0800