Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Restore MATLAB Module Compilation for OpenCV 4.x #3898

Open
wants to merge 2 commits into
base: 4.x
Choose a base branch
from

Conversation

CodeHotel
Copy link

@CodeHotel CodeHotel commented Mar 6, 2025

This PR resolves a VERY long-standing issue where the MATLAB module in opencv_contrib fails to compile due to namespace changes in cv::optflow and cv::xphoto. The MATLAB module has been broken since OpenCV 4.0.0-rc due to these changes, and this fix restores compilation compatibility.

  • Clarification: This fix aims to and restores compilation of the MATLAB module, but I have not tested full functionality within MATLAB itself.

Issue Details

  1. Namespace Changes

    • The DualTVL1OpticalFlow algorithm was moved from opencv to opencv_contrib/optflow, breaking references in the MATLAB module. This was done during 4.0.0-beta and 4.0.0-rc, but never reflected in cv::matlab
    • cv::xphoto also underwent similar changes, but I am yet to find the exact version such change was made in.
    • In Python 3.10 and above, collections.Iterable was changed into collections.abc.Iterable, which causes parse_tree.py to break. I added fixes for build to work for both versions.
  2. Reported Issues

    • #3781 (reported 7 months ago)
    • #3886 (reported by me 2 weeks ago)

Fix Implementation

  • Updated the MATLAB module to reflect the new namespaces introduced in OpenCV contrib.
  • Verified working on OpenCV 4.11.0 (latest non-alpha release).
  • Tested environments:
    • RHEL 9.1
    • Ubuntu 22.04
    • Built using default make and gcc

Request to Maintainers

I acknowledge that the MATLAB module has not been actively maintained for nearly 7 years, which, I find, is quite unusual for an active project like opencv.
If the devs do not intend to support the MATLAB module anymore, I request the maintainers to officially mark it as deprecated, or disable its inclusion using CMake scripts rather than leaving it in a permanently broken state.
Even if the PR is to be rejected, I hope at least a deprecation notice of the module will be considered.

Fixes related to optflow and xphoto, whose namespace have changed since 4.0.0-rc, and therefore deprecated the 'matlab' module
@asmorkalov
Copy link
Contributor

@CodeHotel Thanks a lot for the contribution. Could you add your build steps to the PR description. I want to try the patch.

@CodeHotel
Copy link
Author

@asmorkalov Thanks for the review. I’ll post the build steps as a comment to keep them separate, as there may be future adjustments.
It may take up to 48 hours for me, as I need to wrap up my work and ensure reproducibility.
I'll provide in form of a full script to set up from a freshly installed system(for both OS), along with hardware details used for testing.

@CodeHotel
Copy link
Author

Additional clarification: This PR is to ensure that the MATLAB module compiles successfully. I forgot to mention I have not yet run tests specifically designed for the matlab module. I have added such clarification to the main PR description

Added fix in order to address previously unresolved issue when building in environments with python 3.10+. Modified so that this fix does not effect 3.9 or less.
@CodeHotel
Copy link
Author

@asmorkalov
I apologize for having taken so long.
During the delay, I additionally detected an issue with compilation in the process, regarding Collection datatype differences depending on python version (>3.10), in the binding generator script of the matlab module (parse_tree.py). I made another commit on the branch to fix it. I will add them to the main PR message.
Again, please note that this is a verification of BUILD, though I did run very simple and elemenatry tests to check for fundamental link errors.

Hardware Details

The following hardware was used for testing the OpenCV MATLAB module compilation:

Component Model / Specification
CPU Intel i7-9700KF
Motherboard ASUS Z390 Prime-A (PCIe 3.0, DDR4)
GPU NVIDIA RTX 4080 Super
RAM 32GB DDR4 2133MHz (16GB x2, Dual Channel)
Storage Samsung 970 EVO Plus 500GB (PCIe 3.0 NVMe)

These specifications were used for both Ubuntu 22.04 and RHEL 9.1 testing.

Ubuntu 22.04

I have fully reinstalled ubuntu 22.04 and tested build 2 times using the below scripts.
The ubuntu installation is Ubuntu Server. Note that it is a fresh native installation, not a docker.
During installation, I selected 'minimal' ubuntu server installation.

Package setup

I tried to seamlessly include as much modules, features, libraries as possible with testing in mind.
Be sure to check the flags on the top of the script.
To use CUDA, you must have Nvidia Video SDK .zip file within the same directory as the script.
This script does NOT set up matlab

[script] Click to expand
#!/bin/bash

# This script installs all dependencies and clones repositories necessary for testing
# Run this script in minimal ubuntu installation (was made for and tested in actual installation, not docker)
# It also acts as a dependency package list (full package list of the environment that I used)
# Almost all modules and features, excluding js, julia, ovis(ogre3d), vtk, qt will build
# IMPORTANT : Before running the script, please set below
USE_CUDA=1  # Change to 0 to skip CUDA installation. Modification of below code according to your architecture version may be required
USE_VTK=0 # libtbb2 is known to conflict with libtbb in ubuntu 22.04, therefore non compatible with vtk
# Paths to install NVidia Video Codec SDK
NV_CUVID_ZIP_NAME="Video_Codec_SDK_12.1.14" # Exclude '.zip' + This MUST be manually downloaded to the script's directory
NV_CUVID_INC_PATH=/usr/local/cuda-12.4/include
NV_CUVID_LIB_PATH=/usr/local/cuda-12.4/lib64

set -xe
trap 'echo "Error on line $LINENO"; exit 0' ERR
SHDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"


# This keeps sudo active for the rest of installation. Remove if needed when root (e.g. Docker)
cat $SHDIR/.sudo_passwd | sudo -S -v
while true; do cat $SHDIR/.sudo_passwd | sudo -S -v; sleep 30; done &

sudo apt update

if [ "$USE_CUDA" -eq 1 ]; then
    # If needed, modify this according to your own hardware
    echo "Installing CUDA keyring..."
    wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
    sudo dpkg -i cuda-keyring_1.1-1_all.deb
    sudo apt update
    CUDA_PACKAGES="cuda-drivers cuda-toolkit-12-4 libcudnn8 libcudnn8-dev libcudnn8-samples"
else
    CUDA_PACKAGES=""
fi

if [ "$USE_VTK" -eq 1 ]; then
    sudo apt remove -y libtbb2
    TBB_PACKAGES="libtbb-dev libvtk9-dev"
else
    sudo apt remove -y libtbb-dev
    TBB_PACKAGES="libtbb2 libtbb2-dev"
fi

# I tried to minimze this list using dependency/suggested/recommended tree
sudo apt full-upgrade -y apt-rdepends btop cmake \
    xfce4 $CUDA_PACKAGES \
    flake8 git pylint \
    openjdk-11-jdk python3-numpy python3.10-dev \
    unzip vim \
    libavformat-dev libavif-dev libceres-dev libdc1394-dev \
    libgstreamer-plugins-base1.0-dev libgtk-3-dev libgtkglext1-dev \
    libhdf5-dev liblapacke-dev libopenblas-dev libswscale-dev \
    $TBB_PACKAGES libtesseract-dev libva-dev
    

# Install video codec sdk
if [ "$USE_CUDA" -eq 1 ]; then
    unzip $NV_CUVID_ZIP_NAME.zip
    sudo cp $NV_CUVID_ZIP_NAME/Interface/nvcuvid.h $NV_CUVID_INC_PATH
    sudo cp $NV_CUVID_ZIP_NAME/Interface/nvEncodeAPI.h $NV_CUVID_INC_PATH
    sudo cp $NV_CUVID_ZIP_NAME/Interface/cuviddec.h $NV_CUVID_INC_PATH
    sudo cp $NV_CUVID_ZIP_NAME/Lib/linux/stubs/x86_64/libnvcuvid.so $NV_CUVID_LIB_PATH
    sudo cp $NV_CUVID_ZIP_NAME/Lib/linux/stubs/x86_64/libnvidia-encode.so $NV_CUVID_LIB_PATH
    sudo ldconfig
fi

if [ -d "$SHDIR/opencv" ]; then
    echo "[ WARNING ] $SHDIR/opencv already exists. Skipping cloning."
else
    echo "Cloning OpenCV repository into $SHDIR/opencv."
    cd $SHDIR
    git clone https://github.com/opencv/opencv.git
    cd opencv
    git fetch --tags
    git checkout 4.11.0
    cd ..
fi

if [ -d "$SHDIR/opencv_contrib" ]; then
    echo "[ WARNING ] $SHDIR/opencv_contrib already exists. Skipping cloning."
else
    echo "Cloning OpenCV contrib repository into $SHDIR/opencv_contrib."
    cd "$SHDIR"
    git clone https://github.com/CodeHotel/opencv_contrib.git
    cd opencv_contrib
    git checkout matlab-build-fix-4.11.0
    cd $SHDIR
fi

# Restart to load correct nv firmware
if [ "$USE_CUDA" -eq 1 ]; then
    sudo reboot now
fi

Setup MATLAB

Matlab has a GUI installer, which is the reason why I included xfce in above script.
A MathWorks account is required to do so. I ran the installer by running

sudo ./install

In terminal within the xfce wm session.
Installed with all features, uncheck 'send data for user experience', checked 'create symlinks'
I have tested for MATLAB versions r2024b r2023b.

Configure CMake and build

Resets configurations, configures, and builds.
Make sure to check flags at the top of the script.

[script] Click to expand
#!/bin/bash
set -x

# This Script sets the build configs for opencv compilation.
# Please set correct variables below :
BUILD_CUDA=1
CUDA_ARCH_NUMBER=8.9
export CXXFLAGS="-O0 -fno-lto -w"
export CFLAGS="-O0 -fno-lto -w"
SHDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
OUTDIR="$SHDIR/pr-build-out" # Build directory

# Resets build output directory
[ -d "$OUTDIR" ] && rm -rf $OUTDIR
mkdir $OUTDIR
cd $OUTDIR

# Set CUDA variables
if [ "$BUILD_CUDA" -eq 1 ]; then
    CUDA_FLAGS="
      -D WITH_CUDA=ON \
      -D CUDA_ARCH_BIN=$CUDA_ARCH_NUMBER \
      -D WITH_CUDNN=ON \
      -D OPENCV_DNN_CUDA=ON \
      -D CUDA_FAST_MATH=ON \
      -D WITH_CUBLAS=ON \
      -D WITH_CUFFT=ON"
else
    CUDA_FLAGS=""
fi

# Quick fix for ubuntu 22.04 openblas and openblas-lapack header detection
OPENBLAS_INCLUDE=$(find /usr -type f -name "cblas.h" 2>/dev/null | grep "pthread" | head -n 1 | xargs dirname)
OPENBLAS_LIB=$(find /usr -type f -name "libopenblas*.so" 2>/dev/null | grep "pthread" | head -n 1)
BLAS_FLAGS=""
if [ -n "$OPENBLAS_INCLUDE" ]; then
    BLAS_FLAGS+=" -DOpenBLAS_INCLUDE_DIR=$OPENBLAS_INCLUDE"
fi
if [ -n "$OPENBLAS_LIB" ]; then
    BLAS_FLAGS+=" -DOpenBLAS_LIB=$OPENBLAS_LIB"
fi
LAPACKE_HEADERS=("lapacke.h" "lapacke_config.h" "lapacke_mangling.h" "lapacke_utils.h")
LAPACKE_DIR="/usr/include"
TARGET_DIR="$OPENBLAS_INCLUDE"
if [ -d "$TARGET_DIR" ]; then
    for header in "${LAPACKE_HEADERS[@]}"; do
        SOURCE_PATH="$LAPACKE_DIR/$header"
        TARGET_PATH="$TARGET_DIR/$header"

        if [ -f "$SOURCE_PATH" ]; then
            if [ ! -L "$TARGET_PATH" ]; then
                echo "Creating symlink for $header in $TARGET_DIR"
                sudo ln -s "$SOURCE_PATH" "$TARGET_PATH"
            fi
        fi
    done
else
    echo "Warning: OpenBLAS include directory not found. Skipping LAPACKE symlink creation."
fi

cmake -D CMAKE_BUILD_TYPE=RELEASE \
      -DBUILD_opencv_world=OFF \
      -D BUILD_TESTS=ON \
      -D BUILD_PERF_TESTS=ON \
      -D BUILD_DOCS=OFF \
      -D BUILD_EXAMPLES=ON \
      -D INSTALL_C_EXAMPLES=ON \
      -D INSTALL_PYTHON_EXAMPLES=ON \
      -D OPENCV_GENERATE_PKGCONFIG=ON \
      -D BUILD_JAVA=ON \
      -D WITH_TBB=ON \
      -D WITH_IPP=ON \
      $BLAS_FLAGS \
      $CUDA_FLAGS \
      -D ENABLE_FAST_MATH=ON \
      -D WITH_OPENGL=ON \
      -D WITH_V4L=ON \
      -D WITH_FFMPEG=ON \
      -D BUILD_NEW_PYTHON_SUPPORT=ON \
      -D WITH_QT=ON \
      -D WITH_GTK=ON \
      -D WITH_IMGCODEC_GIF=ON \
      -D BUILD_WITH_DEBUG_INFO=OFF \
      -D BUILD_opencv_python3=ON \
      -D WITH_MATLAB=ON \
      -D CMAKE_INSTALL_PREFIX=/usr/local \
      -D OPENCV_ENABLE_NONFREE=ON \
      -D OPENCV_EXTRA_MODULES_PATH=$SHDIR/opencv_contrib/modules \
      $SHDIR/opencv \
      2>&1 | tee config.log

echo "Configuration outputs logged to $OUTDIR/config.log"

read -p "Proceed to build? (y/n): " answer
if [[ "${answer,,}" == "y" ]]; then
    make -j$(nproc) | tee build.log
else
    cd $SHDIR
    exit 0
fi
cd $SHDIR
exit 0

I will also post the config.log as a reference:

[log] Click to expand
-- The CXX compiler identification is GNU 11.4.0
-- The C compiler identification is GNU 11.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detected processor: x86_64
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.10.12", minimum required is "3.2")
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.10.so (found suitable exact version "3.10.12")
-- Looking for ccache - not found
-- Performing Test HAVE_CXX_FSIGNED_CHAR
-- Performing Test HAVE_CXX_FSIGNED_CHAR - Success
-- Performing Test HAVE_C_FSIGNED_CHAR
-- Performing Test HAVE_C_FSIGNED_CHAR - Success
-- Performing Test HAVE_CXX_FFAST_MATH
-- Performing Test HAVE_CXX_FFAST_MATH - Success
-- Performing Test HAVE_C_FFAST_MATH
-- Performing Test HAVE_C_FFAST_MATH - Success
-- Performing Test HAVE_CXX_FNO_FINITE_MATH_ONLY
-- Performing Test HAVE_CXX_FNO_FINITE_MATH_ONLY - Success
-- Performing Test HAVE_C_FNO_FINITE_MATH_ONLY
-- Performing Test HAVE_C_FNO_FINITE_MATH_ONLY - Success
-- Performing Test HAVE_CXX_W
-- Performing Test HAVE_CXX_W - Success
-- Performing Test HAVE_C_W
-- Performing Test HAVE_C_W - Success
-- Performing Test HAVE_CXX_WALL
-- Performing Test HAVE_CXX_WALL - Success
-- Performing Test HAVE_C_WALL
-- Performing Test HAVE_C_WALL - Success
-- Performing Test HAVE_CXX_WRETURN_TYPE
-- Performing Test HAVE_CXX_WRETURN_TYPE - Success
-- Performing Test HAVE_C_WRETURN_TYPE
-- Performing Test HAVE_C_WRETURN_TYPE - Success
-- Performing Test HAVE_CXX_WNON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WNON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WNON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WNON_VIRTUAL_DTOR - Failed
-- Performing Test HAVE_CXX_WADDRESS
-- Performing Test HAVE_CXX_WADDRESS - Success
-- Performing Test HAVE_C_WADDRESS
-- Performing Test HAVE_C_WADDRESS - Success
-- Performing Test HAVE_CXX_WSEQUENCE_POINT
-- Performing Test HAVE_CXX_WSEQUENCE_POINT - Success
-- Performing Test HAVE_C_WSEQUENCE_POINT
-- Performing Test HAVE_C_WSEQUENCE_POINT - Success
-- Performing Test HAVE_CXX_WFORMAT
-- Performing Test HAVE_CXX_WFORMAT - Success
-- Performing Test HAVE_C_WFORMAT
-- Performing Test HAVE_C_WFORMAT - Success
-- Performing Test HAVE_CXX_WFORMAT_SECURITY
-- Performing Test HAVE_CXX_WFORMAT_SECURITY - Success
-- Performing Test HAVE_C_WFORMAT_SECURITY
-- Performing Test HAVE_C_WFORMAT_SECURITY - Success
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_C_WMISSING_DECLARATIONS
-- Performing Test HAVE_C_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES - Failed
-- Performing Test HAVE_C_WMISSING_PROTOTYPES
-- Performing Test HAVE_C_WMISSING_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES - Failed
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WUNDEF
-- Performing Test HAVE_CXX_WUNDEF - Success
-- Performing Test HAVE_C_WUNDEF
-- Performing Test HAVE_C_WUNDEF - Success
-- Performing Test HAVE_CXX_WINIT_SELF
-- Performing Test HAVE_CXX_WINIT_SELF - Success
-- Performing Test HAVE_C_WINIT_SELF
-- Performing Test HAVE_C_WINIT_SELF - Success
-- Performing Test HAVE_CXX_WPOINTER_ARITH
-- Performing Test HAVE_CXX_WPOINTER_ARITH - Success
-- Performing Test HAVE_C_WPOINTER_ARITH
-- Performing Test HAVE_C_WPOINTER_ARITH - Success
-- Performing Test HAVE_CXX_WSHADOW
-- Performing Test HAVE_CXX_WSHADOW - Success
-- Performing Test HAVE_C_WSHADOW
-- Performing Test HAVE_C_WSHADOW - Success
-- Performing Test HAVE_CXX_WSIGN_PROMO
-- Performing Test HAVE_CXX_WSIGN_PROMO - Success
-- Performing Test HAVE_C_WSIGN_PROMO
-- Performing Test HAVE_C_WSIGN_PROMO - Failed
-- Performing Test HAVE_CXX_WUNINITIALIZED
-- Performing Test HAVE_CXX_WUNINITIALIZED - Success
-- Performing Test HAVE_C_WUNINITIALIZED
-- Performing Test HAVE_C_WUNINITIALIZED - Success
-- Performing Test HAVE_CXX_WSUGGEST_OVERRIDE
-- Performing Test HAVE_CXX_WSUGGEST_OVERRIDE - Success
-- Performing Test HAVE_C_WSUGGEST_OVERRIDE
-- Performing Test HAVE_C_WSUGGEST_OVERRIDE - Failed
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR - Failed
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Success
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Success
-- Performing Test HAVE_CXX_WNO_COMMENT
-- Performing Test HAVE_CXX_WNO_COMMENT - Success
-- Performing Test HAVE_C_WNO_COMMENT
-- Performing Test HAVE_C_WNO_COMMENT - Success
-- Performing Test HAVE_CXX_WIMPLICIT_FALLTHROUGH_3
-- Performing Test HAVE_CXX_WIMPLICIT_FALLTHROUGH_3 - Success
-- Performing Test HAVE_C_WIMPLICIT_FALLTHROUGH_3
-- Performing Test HAVE_C_WIMPLICIT_FALLTHROUGH_3 - Success
-- Performing Test HAVE_CXX_WNO_STRICT_OVERFLOW
-- Performing Test HAVE_CXX_WNO_STRICT_OVERFLOW - Success
-- Performing Test HAVE_C_WNO_STRICT_OVERFLOW
-- Performing Test HAVE_C_WNO_STRICT_OVERFLOW - Success
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_CXX_PTHREAD
-- Performing Test HAVE_CXX_PTHREAD - Success
-- Performing Test HAVE_C_PTHREAD
-- Performing Test HAVE_C_PTHREAD - Success
-- Performing Test HAVE_CXX_FOMIT_FRAME_POINTER
-- Performing Test HAVE_CXX_FOMIT_FRAME_POINTER - Success
-- Performing Test HAVE_C_FOMIT_FRAME_POINTER
-- Performing Test HAVE_C_FOMIT_FRAME_POINTER - Success
-- Performing Test HAVE_CXX_FFUNCTION_SECTIONS
-- Performing Test HAVE_CXX_FFUNCTION_SECTIONS - Success
-- Performing Test HAVE_C_FFUNCTION_SECTIONS
-- Performing Test HAVE_C_FFUNCTION_SECTIONS - Success
-- Performing Test HAVE_CXX_FDATA_SECTIONS
-- Performing Test HAVE_CXX_FDATA_SECTIONS - Success
-- Performing Test HAVE_C_FDATA_SECTIONS
-- Performing Test HAVE_C_FDATA_SECTIONS - Success
-- Performing Test HAVE_CPU_SSE_SUPPORT (check file: cmake/checks/cpu_sse.cpp)
-- Performing Test HAVE_CPU_SSE_SUPPORT - Success
-- Performing Test HAVE_CPU_SSE2_SUPPORT (check file: cmake/checks/cpu_sse2.cpp)
-- Performing Test HAVE_CPU_SSE2_SUPPORT - Success
-- Performing Test HAVE_CPU_SSE3_SUPPORT (check file: cmake/checks/cpu_sse3.cpp)
-- Performing Test HAVE_CPU_SSE3_SUPPORT - Failed
-- Performing Test HAVE_CXX_MSSE3 (check file: cmake/checks/cpu_sse3.cpp)
-- Performing Test HAVE_CXX_MSSE3 - Success
-- Performing Test HAVE_CXX_MSSSE3 (check file: cmake/checks/cpu_ssse3.cpp)
-- Performing Test HAVE_CXX_MSSSE3 - Success
-- Performing Test HAVE_CXX_MSSE4_1 (check file: cmake/checks/cpu_sse41.cpp)
-- Performing Test HAVE_CXX_MSSE4_1 - Success
-- Performing Test HAVE_CXX_MPOPCNT (check file: cmake/checks/cpu_popcnt.cpp)
-- Performing Test HAVE_CXX_MPOPCNT - Success
-- Performing Test HAVE_CXX_MSSE4_2 (check file: cmake/checks/cpu_sse42.cpp)
-- Performing Test HAVE_CXX_MSSE4_2 - Success
-- Performing Test HAVE_CXX_MAVX (check file: cmake/checks/cpu_avx.cpp)
-- Performing Test HAVE_CXX_MAVX - Success
-- Performing Test HAVE_CXX_MF16C (check file: cmake/checks/cpu_fp16.cpp)
-- Performing Test HAVE_CXX_MF16C - Success
-- Performing Test HAVE_CXX_MAVX2 (check file: cmake/checks/cpu_avx2.cpp)
-- Performing Test HAVE_CXX_MAVX2 - Success
-- Performing Test HAVE_CXX_MFMA
-- Performing Test HAVE_CXX_MFMA - Success
-- Performing Test HAVE_CXX_MAVX512F (check file: cmake/checks/cpu_avx512.cpp)
-- Performing Test HAVE_CXX_MAVX512F - Success
-- Performing Test HAVE_CXX_MAVX512F_MAVX512CD (check file: cmake/checks/cpu_avx512common.cpp)
-- Performing Test HAVE_CXX_MAVX512F_MAVX512CD - Success
-- Performing Test HAVE_CXX_MAVX512F_MAVX512CD_MAVX512VL_MAVX512BW_MAVX512DQ (check file: cmake/checks/cpu_avx512skx.cpp)
-- Performing Test HAVE_CXX_MAVX512F_MAVX512CD_MAVX512VL_MAVX512BW_MAVX512DQ - Success
-- Performing Test HAVE_CPU_BASELINE_FLAGS
-- Performing Test HAVE_CPU_BASELINE_FLAGS - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_1
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_1 - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_2
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_2 - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_FP16
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_FP16 - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX2
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX2 - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX512_SKX
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX512_SKX - Success
-- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN
-- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_C_FVISIBILITY_HIDDEN
-- Performing Test HAVE_C_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN - Success
-- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN - Success
-- Performing Test HAVE_LINK_AS_NEEDED
-- Performing Test HAVE_LINK_AS_NEEDED - Success
-- Performing Test HAVE_LINK_NO_UNDEFINED
-- Performing Test HAVE_LINK_NO_UNDEFINED - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for posix_memalign
-- Looking for posix_memalign - found
-- Looking for malloc.h
-- Looking for malloc.h - found
-- Looking for memalign
-- Looking for memalign - found
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found suitable version "1.2.11", minimum required is "1.2.3")
-- Found JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (found version "80")
-- Found TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (found version "4.3.0")
-- Performing Test HAVE_C_WNO_UNUSED_VARIABLE
-- Performing Test HAVE_C_WNO_UNUSED_VARIABLE - Success
-- Performing Test HAVE_C_WNO_UNUSED_FUNCTION
-- Performing Test HAVE_C_WNO_UNUSED_FUNCTION - Success
-- Performing Test HAVE_C_WNO_SHADOW
-- Performing Test HAVE_C_WNO_SHADOW - Success
-- Performing Test HAVE_C_WNO_MAYBE_UNINITIALIZED
-- Performing Test HAVE_C_WNO_MAYBE_UNINITIALIZED - Success
-- Performing Test HAVE_C_WNO_MISSING_PROTOTYPES
-- Performing Test HAVE_C_WNO_MISSING_PROTOTYPES - Success
-- Performing Test HAVE_C_WNO_MISSING_DECLARATIONS
-- Performing Test HAVE_C_WNO_MISSING_DECLARATIONS - Success
-- Performing Test HAVE_C_WNO_IMPLICIT_FALLTHROUGH
-- Performing Test HAVE_C_WNO_IMPLICIT_FALLTHROUGH - Success
-- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_VARIABLE
-- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_VARIABLE - Success
-- Could NOT find OpenJPEG (minimal suitable version: 2.0, recommended version >= 2.3.1). OpenJPEG will be built from sources
-- Performing Test HAVE_C_WNO_IMPLICIT_CONST_INT_FLOAT_CONVERSION
-- Performing Test HAVE_C_WNO_IMPLICIT_CONST_INT_FLOAT_CONVERSION - Success
-- Performing Test HAVE_C_WNO_DOCUMENTATION
-- Performing Test HAVE_C_WNO_DOCUMENTATION - Success
-- OpenJPEG: VERSION = 2.5.0, BUILD = opencv-4.11.0-openjp2-2.5.0
-- Looking for string.h
-- Looking for string.h - found
-- Looking for memory.h
-- Looking for memory.h - found
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for stdio.h
-- Looking for stdio.h - found
-- Looking for math.h
-- Looking for math.h - found
-- Looking for float.h
-- Looking for float.h - found
-- Looking for time.h
-- Looking for time.h - found
-- Looking for stdarg.h
-- Looking for stdarg.h - found
-- Looking for ctype.h
-- Looking for ctype.h - found
-- Looking for assert.h
-- Looking for assert.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for include file malloc.h
-- Looking for include file malloc.h - found
-- Looking for _aligned_malloc
-- Looking for _aligned_malloc - not found
-- Looking for posix_memalign
-- Looking for posix_memalign - found
-- Looking for memalign
-- Looking for memalign - found
-- Performing Test HAVE_C_WNO_UNDEF
-- Performing Test HAVE_C_WNO_UNDEF - Success
-- Performing Test HAVE_C_WNO_STRICT_PROTOTYPES
-- Performing Test HAVE_C_WNO_STRICT_PROTOTYPES - Success
-- Performing Test HAVE_C_WNO_CAST_FUNCTION_TYPE
-- Performing Test HAVE_C_WNO_CAST_FUNCTION_TYPE - Success
-- OpenJPEG libraries will be built from sources: libopenjp2 (version "2.5.0")
-- Looking for semaphore.h
-- Looking for semaphore.h - found
-- Performing Test HAVE_CXX_WNO_SHADOW
-- Performing Test HAVE_CXX_WNO_SHADOW - Success
-- Performing Test HAVE_CXX_WNO_UNUSED
-- Performing Test HAVE_CXX_WNO_UNUSED - Success
-- Performing Test HAVE_CXX_WNO_SIGN_COMPARE
-- Performing Test HAVE_CXX_WNO_SIGN_COMPARE - Success
-- Performing Test HAVE_CXX_WNO_UNDEF
-- Performing Test HAVE_CXX_WNO_UNDEF - Success
-- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WNO_UNINITIALIZED
-- Performing Test HAVE_CXX_WNO_UNINITIALIZED - Success
-- Performing Test HAVE_CXX_WNO_SWITCH
-- Performing Test HAVE_CXX_WNO_SWITCH - Success
-- Performing Test HAVE_CXX_WNO_PARENTHESES
-- Performing Test HAVE_CXX_WNO_PARENTHESES - Success
-- Performing Test HAVE_CXX_WNO_ARRAY_BOUNDS
-- Performing Test HAVE_CXX_WNO_ARRAY_BOUNDS - Success
-- Performing Test HAVE_CXX_WNO_EXTRA
-- Performing Test HAVE_CXX_WNO_EXTRA - Success
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WNO_MISLEADING_INDENTATION
-- Performing Test HAVE_CXX_WNO_MISLEADING_INDENTATION - Success
-- Performing Test HAVE_CXX_WNO_DEPRECATED
-- Performing Test HAVE_CXX_WNO_DEPRECATED - Success
-- Performing Test HAVE_CXX_WNO_SUGGEST_OVERRIDE
-- Performing Test HAVE_CXX_WNO_SUGGEST_OVERRIDE - Success
-- Performing Test HAVE_CXX_WNO_INCONSISTENT_MISSING_OVERRIDE
-- Performing Test HAVE_CXX_WNO_INCONSISTENT_MISSING_OVERRIDE - Success
-- Performing Test HAVE_CXX_WNO_IMPLICIT_FALLTHROUGH
-- Performing Test HAVE_CXX_WNO_IMPLICIT_FALLTHROUGH - Success
-- Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_COMPARE
-- Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_COMPARE - Success
-- Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES
-- Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES - Failed
-- Performing Test HAVE_CXX_WNO_REORDER
-- Performing Test HAVE_CXX_WNO_REORDER - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_RESULT
-- Performing Test HAVE_CXX_WNO_UNUSED_RESULT - Success
-- Performing Test HAVE_CXX_WNO_IMPLICIT_CONST_INT_FLOAT_CONVERSION
-- Performing Test HAVE_CXX_WNO_IMPLICIT_CONST_INT_FLOAT_CONVERSION - Success
-- Performing Test HAVE_CXX_WNO_CLASS_MEMACCESS
-- Performing Test HAVE_CXX_WNO_CLASS_MEMACCESS - Success
-- Found TBB (cmake): /usr/lib/x86_64-linux-gnu/libtbb.so.2
-- IPPICV: Downloading ippicv_2021.12.0_lnx_intel64_20240425_general.tgz from https://raw.githubusercontent.com/opencv/opencv_3rdparty/7f55c0c26be418d494615afca15218566775c725/ippicv/ippicv_2021.12.0_lnx_intel64_20240425_general.tgz
-- found Intel IPP (ICV version): 2021.12.0 [2021.12.0]
-- at: /home/codehotel/ubuntu-cv/pr-build-out/3rdparty/ippicv/ippicv_lnx/icv
-- found Intel IPP Integration Wrappers sources: 2021.12.0
-- at: /home/codehotel/ubuntu-cv/pr-build-out/3rdparty/ippicv/ippicv_lnx/iw
-- Found Threads: TRUE
-- Found CUDNN: /usr/lib/x86_64-linux-gnu/libcudnn.so (found suitable version "8.9.7", minimum required is "7.5")
-- Found NVCUVID: /usr/local/cuda/lib64/libnvcuvid.so
-- Found NVCUVENC:  /usr/local/cuda/lib64/libnvidia-encode.so
-- CUDA detected: 12.4
-- CUDA: Using CUDA_ARCH_BIN=8.9
-- CUDA: NVCC target flags -gencode;arch=compute_89,code=sm_89;-D_FORCE_INLINES
-- Found OpenBLAS libraries: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so
-- Found OpenBLAS include: /usr/include/x86_64-linux-gnu/openblas-pthread
-- LAPACK(OpenBLAS): LAPACK_LIBRARIES: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so
-- LAPACK(OpenBLAS): Support is enabled.
-- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER
-- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_LOCAL_TYPEDEFS
-- Performing Test HAVE_CXX_WNO_UNUSED_LOCAL_TYPEDEFS - Success
-- Performing Test HAVE_CXX_WNO_SIGN_PROMO
-- Performing Test HAVE_CXX_WNO_SIGN_PROMO - Success
-- Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE
-- Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE - Success
-- Performing Test HAVE_CXX_WNO_IGNORED_QUALIFIERS
-- Performing Test HAVE_CXX_WNO_IGNORED_QUALIFIERS - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_FUNCTION
-- Performing Test HAVE_CXX_WNO_UNUSED_FUNCTION - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_CONST_VARIABLE
-- Performing Test HAVE_CXX_WNO_UNUSED_CONST_VARIABLE - Success
-- Performing Test HAVE_CXX_WNO_SHORTEN_64_TO_32
-- Performing Test HAVE_CXX_WNO_SHORTEN_64_TO_32 - Success
-- Performing Test HAVE_CXX_WNO_INVALID_OFFSETOF
-- Performing Test HAVE_CXX_WNO_INVALID_OFFSETOF - Success
-- Performing Test HAVE_CXX_WNO_ENUM_COMPARE_SWITCH
-- Performing Test HAVE_CXX_WNO_ENUM_COMPARE_SWITCH - Success
-- Performing Test HAVE_CXX_WNO_STRINGOP_OVERFLOW
-- Performing Test HAVE_CXX_WNO_STRINGOP_OVERFLOW - Success
-- Performing Test HAVE_CXX_WNO_STRINGOP_OVERREAD
-- Performing Test HAVE_CXX_WNO_STRINGOP_OVERREAD - Success
-- Performing Test HAVE_CXX_WNO_EXTRA_SEMI
-- Performing Test HAVE_CXX_WNO_EXTRA_SEMI - Success
-- Performing Test HAVE_CXX_WNO_COMMA
-- Performing Test HAVE_CXX_WNO_COMMA - Success
-- Found Java: /usr/bin/java (found version "11.0.26")
-- Found JNI: /usr/lib/jvm/default-java/lib/libjawt.so
-- Found Pylint: /usr/bin/pylint (found version "2.12.2")
-- Found Flake8: /usr/bin/flake8 (found version "4.0.1")
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
-- Looking for dlerror in dl
-- Looking for dlerror in dl - found
-- Performing Test HAVE_C_WNO_SIGN_COMPARE
-- Performing Test HAVE_C_WNO_SIGN_COMPARE - Success
-- ADE: Downloading v0.1.2e.zip from https://github.com/opencv/ade/archive/v0.1.2e.zip
-- Checking for module 'gtk+-3.0'
--   Found gtk+-3.0, version 3.24.33
-- Checking for module 'gtk+-2.0'
--   Found gtk+-2.0, version 2.24.33
-- Checking for module 'gtkglext-1.0'
--   Found gtkglext-1.0, version 1.2.0
-- Performing Test HAVE_CXX_WNO_STRICT_ALIASING
-- Performing Test HAVE_CXX_WNO_STRICT_ALIASING - Success
-- Checking for modules 'libavcodec;libavformat;libavutil;libswscale'
--   Found libavcodec, version 58.134.100
--   Found libavformat, version 58.76.100
--   Found libavutil, version 56.70.100
--   Found libswscale, version 5.9.100
-- Checking for module 'libavresample'
--   No package 'libavresample' found
-- Checking for module 'gstreamer-base-1.0'
--   Found gstreamer-base-1.0, version 1.20.3
-- Checking for module 'gstreamer-app-1.0'
--   Found gstreamer-app-1.0, version 1.20.1
-- Checking for module 'gstreamer-riff-1.0'
--   Found gstreamer-riff-1.0, version 1.20.1
-- Checking for module 'gstreamer-pbutils-1.0'
--   Found gstreamer-pbutils-1.0, version 1.20.1
-- Checking for module 'gstreamer-video-1.0'
--   Found gstreamer-video-1.0, version 1.20.1
-- Checking for module 'gstreamer-audio-1.0'
--   Found gstreamer-audio-1.0, version 1.20.1
-- Performing Test HAVE_CXX_WNO_ENUM_COMPARE
-- Performing Test HAVE_CXX_WNO_ENUM_COMPARE - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_VARIABLE
-- Performing Test HAVE_CXX_WNO_UNUSED_VARIABLE - Success
-- Checking for module 'freetype2'
--   Found freetype2, version 24.1.18
-- Checking for module 'harfbuzz'
--   Found harfbuzz, version 2.7.4
-- freetype2:   YES (ver 24.1.18)
-- harfbuzz:    YES (ver 2.7.4)
-- Found HDF5: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/x86_64-linux-gnu/libcrypto.so;/usr/lib/x86_64-linux-gnu/libcurl.so;/usr/lib/x86_64-linux-gnu/libpthread.a;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.a;/usr/lib/x86_64-linux-gnu/libm.so (found version "1.10.7")
-- Julia not found. Not compiling Julia Bindings.
-- Registering hook 'STATUS_DUMP_EXTRA': /home/codehotel/ubuntu-cv/opencv_contrib/modules/matlab/cmake/hooks/STATUS_DUMP_EXTRA.cmake
-- Found Matlab: /usr/local/MATLAB/R2024b/bin/mex
-- Python Jinja version: 3.0.3
-- Module opencv_ovis disabled because OGRE3D was not found
-- Checking SFM glog/gflags deps... TRUE
-- Checking for module 'tesseract'
--   Found tesseract, version 4.1.1
-- Tesseract:   YES (ver 4.1.1)
-- Allocator metrics storage type: 'long long'
-- Performing Test HAVE_CXX_WNO_UNUSED_BUT_SET_VARIABLE
-- Performing Test HAVE_CXX_WNO_UNUSED_BUT_SET_VARIABLE - Success
-- Excluding from source files list: <BUILD>/modules/core/test/test_intrin256.lasx.cpp
-- Excluding from source files list: modules/imgproc/src/imgwarp.lasx.cpp
-- Excluding from source files list: modules/imgproc/src/resize.lasx.cpp
-- Registering hook 'INIT_MODULE_SOURCES_opencv_dnn': /home/codehotel/ubuntu-cv/opencv/modules/dnn/cmake/hooks/INIT_MODULE_SOURCES_opencv_dnn.cmake
-- Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.rvv.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.lasx.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/int8layers/layers_common.rvv.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/int8layers/layers_common.lasx.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/layers/cpu_kernels/conv_block.neon.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/layers/cpu_kernels/conv_block.neon_fp16.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/layers/cpu_kernels/conv_depthwise.rvv.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/layers/cpu_kernels/conv_depthwise.lasx.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/layers/cpu_kernels/fast_gemm_kernels.neon.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/layers/cpu_kernels/fast_gemm_kernels.lasx.cpp
-- imgcodecs: OpenEXR codec is disabled in runtime. Details: https://github.com/opencv/opencv/issues/21326
-- Performing Test HAVE_CXX_WNO_OVERLOADED_VIRTUAL
-- Performing Test HAVE_CXX_WNO_OVERLOADED_VIRTUAL - Success
-- highgui: using builtin backend: GTK3
-- Performing Test Iconv_IS_BUILT_IN
-- Performing Test Iconv_IS_BUILT_IN - Success
-- wechat_qrcode: Downloading detect.caffemodel from https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/detect.caffemodel
-- wechat_qrcode: Downloading detect.prototxt from https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/detect.prototxt
-- wechat_qrcode: Downloading sr.caffemodel from https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/sr.caffemodel
-- wechat_qrcode: Downloading sr.prototxt from https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/sr.prototxt
-- xfeatures2d/boostdesc: Downloading boostdesc_bgm.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i
-- xfeatures2d/boostdesc: Downloading boostdesc_bgm_bi.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_bi.i
-- xfeatures2d/boostdesc: Downloading boostdesc_bgm_hd.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_hd.i
-- xfeatures2d/boostdesc: Downloading boostdesc_binboost_064.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_064.i
-- xfeatures2d/boostdesc: Downloading boostdesc_binboost_128.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_128.i
-- xfeatures2d/boostdesc: Downloading boostdesc_binboost_256.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_256.i
-- xfeatures2d/boostdesc: Downloading boostdesc_lbgm.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_lbgm.i
-- xfeatures2d/vgg: Downloading vgg_generated_48.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_48.i
-- xfeatures2d/vgg: Downloading vgg_generated_64.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_64.i
-- xfeatures2d/vgg: Downloading vgg_generated_80.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_80.i
-- xfeatures2d/vgg: Downloading vgg_generated_120.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_120.i
-- data: Downloading face_landmark_model.dat from https://raw.githubusercontent.com/opencv/opencv_3rdparty/8afa57abc8229d611c4937165d20e2a2d9fc5a12/face_landmark_model.dat
-- GAPI VPL samples with VAAPI
-- Use autogenerated whitelist /home/codehotel/ubuntu-cv/pr-build-out/modules/js_bindings_generator/whitelist.json
-- Performing Test HAVE_CXX_WNO_DEPRECATED_COPY
-- Performing Test HAVE_CXX_WNO_DEPRECATED_COPY - Success
-- NVIDIA_OPTICAL_FLOW: Downloading edb50da3cf849840d680249aa6dbef248ebce2ca.zip from https://github.com/NVIDIA/NVIDIAOpticalFlowSDK/archive/edb50da3cf849840d680249aa6dbef248ebce2ca.zip
-- Building with NVIDIA Optical Flow API 2.0
-- Trying to generate Matlab code
-- Trying to generate Matlab code - OK
-- Trying to compile mex file
-- Trying to compile mex file - OK
-- Found 'misc' Python modules from /home/codehotel/ubuntu-cv/opencv/modules/python/package/extra_modules
-- Found 'mat_wrapper;utils' Python modules from /home/codehotel/ubuntu-cv/opencv/modules/core/misc/python/package
-- Found 'gapi' Python modules from /home/codehotel/ubuntu-cv/opencv/modules/gapi/misc/python/package
-- Performing Test HAVE_CXX_WNO_UNUSED_PRIVATE_FIELD
-- Performing Test HAVE_CXX_WNO_UNUSED_PRIVATE_FIELD - Success
-- Found 'misc' Python modules from /home/codehotel/ubuntu-cv/opencv/modules/python/package/extra_modules
-- Found 'mat_wrapper;utils' Python modules from /home/codehotel/ubuntu-cv/opencv/modules/core/misc/python/package
-- Found 'gapi' Python modules from /home/codehotel/ubuntu-cv/opencv/modules/gapi/misc/python/package
-- SYCL/OpenCL samples are skipped: SYCL SDK is required
--    - check configuration of SYCL_DIR/SYCL_ROOT/CMAKE_MODULE_PATH
--    - ensure that right compiler is selected from SYCL SDK (e.g, clang++): CMAKE_CXX_COMPILER=/usr/bin/c++
-- Registered 'check_pylint' target: using /usr/bin/pylint (ver: 2.12.2), checks: 195
-- Registered 'check_flake8' target: using /usr/bin/flake8 (ver: 4.0.1)
--
-- General configuration for OpenCV 4.11.0 =====================================
--   Version control:               4.11.0
--
--   Extra modules:
--     Location (extra):            /home/codehotel/ubuntu-cv/opencv_contrib/modules
--     Version control (extra):     65223904
--
--   Platform:
--     Timestamp:                   2025-03-08T05:51:05Z
--     Host:                        Linux 5.15.0-134-generic x86_64
--     CMake:                       3.22.1
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/gmake
--     Configuration:               RELEASE
--     Algorithm Hint:              ALGO_HINT_ACCURATE
--
--   CPU/HW features:
--     Baseline:                    SSE SSE2 SSE3
--       requested:                 SSE3
--     Dispatched code generation:  SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
--       SSE4_1 (18 files):         + SSSE3 SSE4_1
--       SSE4_2 (2 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
--       AVX (9 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
--       FP16 (1 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 AVX FP16
--       AVX2 (38 files):           + SSSE3 SSE4_1 POPCNT SSE4_2 AVX FP16 AVX2 FMA3
--       AVX512_SKX (8 files):      + SSSE3 SSE4_1 POPCNT SSE4_2 AVX FP16 AVX2 FMA3 AVX_512F AVX512_COMMON AVX512_SKX
--
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ standard:                11
--     C++ Compiler:                /usr/bin/c++  (ver 11.4.0)
--     C++ flags (Release):         -O0 -fno-lto -w   -fsigned-char -ffast-math -fno-finite-math-only -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -O0 -fno-lto -w   -fsigned-char -ffast-math -fno-finite-math-only -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g  -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -O0 -fno-lto -w   -fsigned-char -ffast-math -fno-finite-math-only -W -Wall -Wreturn-type -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-unnamed-type-template-args -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -O0 -fno-lto -w   -fsigned-char -ffast-math -fno-finite-math-only -W -Wall -Wreturn-type -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-unnamed-type-template-args -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g  -DDEBUG -D_DEBUG
--     Linker flags (Release):      -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a   -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined
--     Linker flags (Debug):        -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a   -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined
--     ccache:                      NO
--     Precompiled headers:         NO
--     Extra dependencies:          m pthread cudart_static dl rt nppc nppial nppicc nppidei nppif nppig nppim nppist nppisu nppitc npps cublas cudnn cufft -L/usr/local/cuda/lib64 -L/usr/lib/x86_64-linux-gnu
--     3rdparty dependencies:
--
--   OpenCV modules:
--     To be built:                 alphamat aruco bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev datasets dnn dnn_objdetect dnn_superres dpm face features2d flann freetype fuzzy gapi hdf hfs highgui img_hash imgcodecs imgproc intensity_transform java line_descriptor matlab mcc ml objdetect optflow phase_unwrapping photo plot python3 quality rapid reg rgbd saliency sfm shape signal stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab wechat_qrcode xfeatures2d ximgproc xobjdetect xphoto
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 cannops cvv fastcv julia ovis python2 viz
--     Applications:                tests perf_tests examples apps
--     Documentation:               NO
--     Non-free algorithms:         YES
--
--   GUI:                           GTK3
--     QT:                          NO
--     GTK+:                        YES (ver 3.24.33)
--     OpenGL support:              YES (/usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/libGLU.so)
--     VTK support:                 NO
--
--   Media I/O:
--     ZLib:                        /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.11)
--     JPEG:                        /usr/lib/x86_64-linux-gnu/libjpeg.so (ver 80)
--     WEBP:                        build (ver decoder: 0x0209, encoder: 0x020f, demux: 0x0107)
--     AVIF:                        /usr/lib/x86_64-linux-gnu/libavif.so.13.0.0 (ver 0.9.3)
--     PNG:                         /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.6.37)
--     TIFF:                        /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 / 4.3.0)
--     JPEG 2000:                   build (ver 2.5.0)
--     OpenEXR:                     build (ver 2.3.0)
--     GIF:                         YES
--     HDR:                         YES
--     SUNRASTER:                   YES
--     PXM:                         YES
--     PFM:                         YES
--
--   Video I/O:
--     FFMPEG:                      YES
--       avcodec:                   YES (58.134.100)
--       avformat:                  YES (58.76.100)
--       avutil:                    YES (56.70.100)
--       swscale:                   YES (5.9.100)
--       avresample:                NO
--     GStreamer:                   YES (1.20.3)
--     v4l/v4l2:                    YES (linux/videodev2.h)
--
--   Parallel framework:            TBB (ver 2020.3 interface 11103)
--
--   Trace:                         YES (with Intel ITT)
--
--   Other third-party libraries:
--     Intel IPP:                   2021.12.0 [2021.12.0]
--            at:                   /home/codehotel/ubuntu-cv/pr-build-out/3rdparty/ippicv/ippicv_lnx/icv
--     Intel IPP IW:                sources (2021.12.0)
--               at:                /home/codehotel/ubuntu-cv/pr-build-out/3rdparty/ippicv/ippicv_lnx/iw
--     VA:                          YES
--     Lapack:                      YES (/usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so)
--     Eigen:                       YES (ver 3.4.0)
--     Custom HAL:                  NO
--     Protobuf:                    build (3.19.1)
--     Flatbuffers:                 builtin/3rdparty (23.5.9)
--
--   NVIDIA CUDA:                   YES (ver 12.4, CUFFT CUBLAS NVCUVID NVCUVENC FAST_MATH)
--     NVIDIA GPU arch:             89
--     NVIDIA PTX archs:
--
--   cuDNN:                         YES (ver 8.9.7)
--
--   OpenCL:                        YES (INTELVA)
--     Include path:                /home/codehotel/ubuntu-cv/opencv/3rdparty/include/opencl/1.2
--     Link libraries:              Dynamic load
--
--   Python 3:
--     Interpreter:                 /usr/bin/python3 (ver 3.10.12)
--     Libraries:                   /usr/lib/x86_64-linux-gnu/libpython3.10.so (ver 3.10.12)
--     Limited API:                 NO
--     numpy:                       /usr/lib/python3/dist-packages/numpy/core/include (ver 1.21.5)
--     install path:                lib/python3.10/dist-packages/cv2/python-3.10
--
--   Python (for build):            /usr/bin/python3
--
--   Java:
--     ant:                         NO
--     Java:                        YES (ver 11.0.26)
--     JNI:                         /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include/linux /usr/lib/jvm/default-java/include
--     Java wrappers:               YES (JAVA)
--     Java tests:                  NO
--
--   Matlab:                        YES
--     mex:                         /usr/local/MATLAB/R2024b/bin/mex
--     Compiler/generator:          Working
--
--   Install to:                    /usr/local
-- -----------------------------------------------------------------
--
-- Configuring done
-- Generating done
-- Build files have been written to: /home/codehotel/ubuntu-cv/pr-build-out
After the build finished, ```sudo make install``` and ran a few tests to verify basic functionality in python.

RHEL 9.1

This script was for my own personal use, and therefore is not as organized and tailored as the ubuntu script, and is quite messy.
However, it was verified for sure.
Native x86 RHEL9.1, installed with all options selected. Unlike ubuntu's it does not have settable flags, so you may need to modify the script significantly if testing

Setup script 1

[script] Click to expand
#!/bin/bash
set -xe
trap 'echo "Error on line $LINENO"; exit 0' ERR
SHDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"


# This keeps sudo active for the rest of installation. Remove if needed when root (e.g. Docker)
cat $SHDIR/.sudo_passwd | sudo -S -v
while true; do cat $SHDIR/.sudo_passwd | sudo -S -v; sleep 30; done &

# Use sudo with stored password
sudo subscription-manager release --set=9.1

# Add repositories
sudo subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
sudo dnf -y install https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-9.noarch.rpm
sudo dnf -y install https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-9.noarch.rpm
sudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
sudo dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo

# Install the latest available kernel
sudo dnf -y install kernel kernel-core kernel-devel kernel-headers

# Stop sudo keep-alive (cleanup)
exit 0

Setup Script 2

[script] Click to expand
#!/bin/bash

set -xe
trap 'echo "Error on line $LINENO"; exit 0' ERR
SHDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"


# This keeps sudo active for the rest of installation. Remove if needed when root (e.g. Docker)
cat $SHDIR/.sudo_passwd | sudo -S -v
while true; do cat $SHDIR/.sudo_passwd | sudo -S -v; sleep 30; done &

# Prepare docker install
sudo systemctl stop podman
sudo dnf remove -y podman
sudo rm -rf /var/lib/docker /var/lib/containerd /var/lib/podman
sudo systemctl daemon-reload

# Add Docker dependencies and clean DNF cache
sudo dnf -y install dnf-plugins-core
sudo dnf -y clean all

# Install NVIDIA driver
sudo dnf -y module install nvidia-driver:latest-dkms

# Install all required packages
sudo dnf install -y cmake \
                 gtk2-devel \
                 gtk3-devel \
                 gtkglext-devel \
                 ccache \
                 ceres-solver-devel \
                 suitesparse-devel \
                 xine-lib xine-lib-devel \
                 metis metis-devel \
                 mesa-libGL-devel mesa-libEGL-devel \
                 libcudnn8* \
                 cuda-toolkit-12-4 \
                 docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin \
                 gstreamer1-devel gstreamer1-plugins-base-devel \
                 eigen3-devel \
                 lapack-devel \
                 java-11-openjdk-devel ant \
                 nasm \
                 giflib-devel \
                 libva-devel \
                 hdf5-devel \
                 python3-devel \
                 python3-numpy \
                 libavif \
                 libavif-devel \
                 libjpeg-turbo-devel \
                 openblas-devel \
                 lapack-devel \
                 alsa-lib-devel SDL2-devel \
                 ffmpeg-devel ffmpeg \
                 qt5 qt5-devel \
                 rpm-build rpmdevtools rpmlint \
                 doxygen \
                 python3-pip \
                 tesseract-devel \
                 gflags gflags-devel \
                 glog glog-devel \
                 tbb tbb-devel \
                 pybind11-devel python3-pybind11 \
                 python3-jinja2 \
		 libedit-devel ncurses-devel swig python3-devel lua-devel perl-core ninja-build texlive-epstopdf texlive-epstopdf \
                 htop btop nmon

# Setup TensorRT
tar -xzvf TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-12.0.tar.gz
sudo mv TensorRT-8.6.1.6 /usr/local/TensorRT
echo '/usr/local/TensorRT/lib' | sudo tee /etc/ld.so.conf.d/tensorrt.conf
sudo ldconfig
sudo python3 -m pip install /usr/local/TensorRT/python/tensorrt-*-cp39-none-linux_x86_64.whl

# Setup llvm and bazel
sudo ./install-llvm
sudo ./install-bazel

# Start and enable Docker
sudo systemctl start docker
sudo systemctl enable docker

# Confirm Docker installation
sudo docker run hello-world
sudo docker pull tensorflow/build:2.17-python3.9
echo "Docker and TensorFlow GPU image setup completed successfully."
docker --version
sudo docker images

# Set CUDA vars
sudo tee /etc/profile.d/cuda-env.sh > /dev/null <<EOL
# CUDA
export PATH=/usr/local/cuda-12.4/bin:\$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-12.4/lib64:\$LD_LIBRARY_PATH

# cuDNN
export LD_LIBRARY_PATH=/usr/lib64:\$LD_LIBRARY_PATH

# TensorRT
export LD_LIBRARY_PATH=/usr/local/TensorRT/lib:\$LD_LIBRARY_PATH
export PYTHONPATH=/usr/local/TensorRT/python:\$PYTHONPATH

# Common NVIDIA Paths
export CUDA_HOME=/usr/local/cuda-12.4
export CUDNN_HOME=/usr/lib64
export TENSORRT_HOME=/usr/local/TensorRT
EOL
sudo chmod +x /etc/profile.d/cuda-env.sh
source /etc/profile.d/cuda-env.sh
echo "/usr/local/cuda-12.4/lib64" | sudo tee /etc/ld.so.conf.d/cuda.conf
echo "/usr/lib64" | sudo tee /etc/ld.so.conf.d/cudnn.conf
echo "/usr/local/TensorRT/lib" | sudo tee /etc/ld.so.conf.d/tensorrt.conf
sudo ldconfig

# Cuda vars for matlab
echo "NVIDIA_CUDNN=/usr" | sudo tee -a /etc/environment
echo "NVIDIA_TENSORRT=/usr/local/TensorRT" | sudo tee -a /etc/environment

# Test CUDA installation
nvcc -V

# Stop sudo keep-alive (cleanup)
exit 0  # Exiting script ensures the `sudo -v` loop stops

Prepare opencv installation

[script] Click to expand
#!/bin/bash

set -xe
trap 'echo "Error on line $LINENO"; exit 0' ERR
SHDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"


# This keeps sudo active for the rest of installation. Remove if needed when root (e.g. Docker)
cat $SHDIR/.sudo_passwd | sudo -S -v
while true; do cat $SHDIR/.sudo_passwd | sudo -S -v; sleep 30; done &

# Remove existing mpg123 package
sudo dnf -y remove mpg123

# Extract the source tarball
tar -xvf mpg123-1.32.10.tar.bz2
cd mpg123-1.32.10/

# Configure with optimizations
CFLAGS="-march=native -O3" CXXFLAGS="-march=native -O3" ./configure --prefix=/usr --with-cpu=generic --enable-id3v2 --enable-feature-report --enable-newoldwritesample

# Compile and install
make
sudo make install

# Return to previous directory
cd ..

# Force qt5-qtwebkit deps in order to install vtk
sudo dnf -y remove qt5-qtwebkit
dnf download --nobest qt5-qtwebkit
sudo rpm -ivh --nodeps qt5-qtwebkit-*.rpm
sudo dnf -y install vtk vtk-devel

wget https://developer.nvidia.com/downloads/designworks/video-codec-sdk/secure/12.1/video_codec_sdk_12.1.14.zip
unzip Video_Codec_SDK_12.1.14.zip
VENC_PATH=/usr/local/cuda/include
sudo cp Video_Codec_SDK_12.1.14/Interface/nvcuvid.h /usr/local/cuda/include/
sudo cp Video_Codec_SDK_12.1.14/Interface/nvEncodeAPI.h /usr/local/cuda/include/
sudo cp Video_Codec_SDK_12.1.14/Interface/cuviddec.h /usr/local/cuda/include/
sudo cp Video_Codec_SDK_12.1.14/Lib/linux/stubs/x86_64/libnvcuvid.so /usr/local/cuda/lib64/
sudo cp Video_Codec_SDK_12.1.14/Lib/linux/stubs/x86_64/libnvidia-encode.so /usr/local/cuda/lib64/
sudo ldconfig

sudo pip3 install bs4 pylint flake8

# Define the directory
DIR="cv_cuda"

# Check if the directory exists
if [ -d "$DIR" ]; then
    echo "$DIR already exists. Skipping cloning."
else
    echo "Creating $DIR and cloning OpenCV repositories."
    mkdir $DIR
    cd $DIR
    git clone https://github.com/opencv/opencv.git
    git clone https://github.com/CodeHotel/opencv_contrib.git

    # Checkout to rel4.11 in opencv
    cd opencv
    git fetch --tags
    git checkout 4.11.0
    cd ..

    # Checkout to rel4.11 in opencv_contrib
    cd opencv_contrib
    git checkout matlab-build-fix-4.11.0
    cd ../..
fi

exit 0

Configure CMake

#!/bin/bash

set -x

cd cv_cuda
[ -d "release_general" ] && rm -rf release_general
mkdir release_general
cd release_general
export CXXFLAGS="-O3 -march=native -mtune=native -fno-lto -w"
export CFLAGS="-O3 -march=native -mtune=native -fno-lto -w"
cmake -D CMAKE_BUILD_TYPE=RELEASE \
      -DBUILD_opencv_world=OFF \
      -D CMAKE_INSTALL_PREFIX=/usr/local \
      -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules \
      -D BUILD_JAVA=ON \
      -D WITH_LAPACK=ON \
      -D WITH_TBB=ON \
      -D WITH_IPP=ON \
      -D WITH_CUDA=ON \
      -D CUDA_ARCH_BIN="8.9" \
      -D WITH_CUDNN=ON \
      -D OPENCV_DNN_CUDA=ON \
      -D CUDA_FAST_MATH=ON \
      -D ENABLE_FAST_MATH=ON \
      -D WITH_CUBLAS=ON \
      -D WITH_CUFFT=ON \
      -D WITH_OPENGL=ON \
      -D WITH_V4L=ON \
      -D WITH_FFMPEG=ON \
      -D WITH_XINE=ON \
      -D BUILD_DOCS=ON \
      -D BUILD_EXAMPLES=ON \
      -D BUILD_TESTS=ON \
      -D BUILD_PERF_TESTS=ON \
      -D BUILD_NEW_PYTHON_SUPPORT=ON \
      -D INSTALL_C_EXAMPLES=ON \
      -D INSTALL_PYTHON_EXAMPLES=ON \
      -D OPENCV_GENERATE_PKGCONFIG=ON \
      -D WITH_QT=ON \
      -D WITH_GTK=ON \
      -D OPENCV_ENABLE_NONFREE=ON \
      -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules \
      -D WITH_IMGCODEC_GIF=ON \
      -D BUILD_WITH_DEBUG_INFO=OFF \
      -D BUILD_opencv_python3=ON \
      -D WITH_MATLAB=ON \
      ../opencv
cd ../..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants