opencv-4.10.0

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

Package Information

Additional Downloads

[Note]

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.30.2 and UnZip-6.0

Recommended

Optional

apache-ant-1.10.14, Doxygen-1.12.0, Java-22.0.2, NumPy-2.1.0, Protobuf-27.3, ATLAS, blas, Cuda, Eigen, OpenEXR, GDAL, lapack, libdc1394, Threading Building Blocks (TBB), and VTK - The Visualization Toolkit,

Installation of opencv

If you downloaded the optional modules, unpack them now:

tar -xf ../opencv_contrib-4.10.0.tar.gz

Install opencv by running the following commands:

mkdir build &&
cd    build &&

cmake -D CMAKE_INSTALL_PREFIX=/usr      \
      -D CMAKE_BUILD_TYPE=Release       \
      -D ENABLE_CXX11=ON                \
      -D BUILD_PERF_TESTS=OFF           \
      -D WITH_XINE=ON                   \
      -D BUILD_TESTS=OFF                \
      -D ENABLE_PRECOMPILED_HEADERS=OFF \
      -D CMAKE_SKIP_INSTALL_RPATH=ON    \
      -D BUILD_WITH_DEBUG_INFO=OFF      \
      -W no-dev  ..                     &&
make

The package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

-D CMAKE_SKIP_INSTALL_RPATH=ON: This switch makes cmake remove hardcoded library search paths (rpath) when installing a binary executable file or a shared library. This package does not need rpath once it's installed into the standard location, and rpath may sometimes cause unwanted effects or even security issues.

-D WITH_XINE=ON: This option instructs the make procedure to use xine-lib-1.2.13.

-D ENABLE_PRECOMPILED_HEADERS=OFF: This option is needed for compatibility with gcc-6.1 and later.

-D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib-4.10.0/modules: instructs the build system to build additional modules.

Contents

Installed Programs: opencv_annotation, opencv_interactive-calibration, opencv_model_diagnostics, 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/lib/python3.12/site-packages/cv2, /usr/share/licenses/opencv4, /usr/share/opencv4, and /usr/share/java/opencv4