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 11.3 platform.
Download (HTTP): https://github.com/opencv/opencv/archive/4.7.0/opencv-4.7.0.tar.gz
Download MD5 sum: 13e13244cb0cc6ec4f01eacd38d05d17
Download size: 87 MB
Estimated disk space required: 675 MB
Estimated build time: 3.3 SBU (using parallelism=4)
Optional additional modules: https://github.com/opencv/opencv_contrib/archive/4.7.0/opencv_contrib-4.7.0.tar.gz
One additional file that starts with "ippicv" (integrated performance primitives) will be automatically downloaded during the cmake portion of the build procedure. This download is specific to the system architecture.
FFmpeg-5.1.2, gst-plugins-base-1.22.0, GTK+-3.24.36, JasPer-4.0.0, libexif-0.6.24, libjpeg-turbo-2.1.5.1, libpng-1.6.39, libtiff-4.5.0, libwebp-1.3.0, v4l-utils-1.22.1, and xine-lib-1.2.13
apache-ant-1.10.13, Doxygen-1.9.6, Java-19.0.2, Python-2.7.18, blas, Cuda, Eigen, OpenEXR, GDAL, lapack, libdc1394, NumPy, Threading Building Blocks (TBB), and VTK - The Visualization Toolkit,
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/opencv
If you downloaded the optional modules, unpack them now:
tar -xf ../opencv_contrib-4.7.0.tar.gz
Install opencv by running the following commands:
mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release \ -DENABLE_CXX11=ON \ -DBUILD_PERF_TESTS=OFF \ -DWITH_XINE=ON \ -DBUILD_TESTS=OFF \ -DENABLE_PRECOMPILED_HEADERS=OFF \ -DCMAKE_SKIP_RPATH=ON \ -DBUILD_WITH_DEBUG_INFO=OFF \ -Wno-dev .. && make
The package does not come with a test suite.
Now, as the root
user:
make install
-DWITH_XINE=ON
: This option
instructs the make procedure to use xine-lib-1.2.13.
-DENABLE_PRECOMPILED_HEADERS=OFF
:
This option is needed for compatibility with gcc-6.1 and later.
-DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-4.7.0/modules
:
instructs the build system to build additional modules.