opencv-4.1.1

#### Beyond Linux® From Scratch (systemd Edition) - Version 9.0

### Chapter 10. Graphics and Font Libraries

- Prev

  newt-0.52.21

- Next

  OpenJPEG-2.3.1

- Up
- Home

# opencv-4.1.1

## Introduction to opencv

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-9.0 platform.

### Package Information

- Download (HTTP): https://github.com/opencv/opencv/archive/4.1.1/opencv-4.1.1.tar.gz

- Download MD5 sum: d9d3138d12e52bb0684f4a5862f6a46c

- Download size: 84 MB

- Estimated disk space required: 627 MB

- Estimated build time: 4.1 SBU (using parallelism=4)

### Additional Downloads

- Optional additional modules: https://github.com/opencv/opencv_contrib/archive/4.1.1/opencv_contrib-4.1.1.tar.gz

### Note

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.

### opencv Dependencies

#### Required

CMake-3.15.2 and UnZip-6.0

#### Recommended

FFmpeg-4.2, gst-plugins-base-1.16.0, GTK+-3.24.10, JasPer-2.0.14, libjpeg-turbo-2.0.2, libpng-1.6.37, LibTIFF-4.0.10, libwebp-1.0.3, v4l-utils-1.16.6, and xine-lib-1.2.9

#### Optional

apache-ant-1.10.6, Doxygen-1.8.16, Java-12.0.2, Python-2.7.16, 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

## Installation of opencv

If needed, unpack the additional modules package:

    tar xf ../opencv_contrib-4.1.1.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 an operable test suite.

Now, as the `root` user:

    make install

## Command Explanations

`-DWITH_XINE=ON`: This option instructs the make procedure to use xine-lib-1.2.9.

`-DENABLE_PRECOMPILED_HEADERS=OFF`: This option is needed for compatibiiity with gcc-6.1 and later.

`-DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-4.1.1/modules`: instructs the build system to build additional modules.

## Contents

Installed Programs: opencv_annotation, opencv_interactive-calibration, opencv_version, opencv_visualisation, and setup_vars_opencv4.sh
Installed Libraries: libopencv_calib3d.so, libopencv_core.so, libopencv_dnn.so, libopencv_features2d.so, libopencv_flann.so, libopencv_gapi.so, libopencv_highgui.so, libopencv_imgcodecs.so, libopencv_imgproc.so, libopencv_ml.so, libopencv_objdetect.so, libopencv_photo.so, libopencv_stitching.so, libopencv_video.so, and libopencv_videoio.so
Installed Directories: /usr/include/opencv4 /usr/lib/cmake/opencv4, /usr/share/opencv4, and /usr/share/java/opencv4

Last updated on 2019-08-18 18:01:59 -0700

- Prev

  newt-0.52.21

- Next

  OpenJPEG-2.3.1

- Up
- Home