我要评分
获取效率
正确性
完整性
易理解

Installing OpenCV

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Download the installation package.
    cd /path/to/opencv
    wget https://github.com/opencv/opencv/archive/refs/tags/4.5.5.tar.gz -O opencv-4.4.5.tar.gz
  3. Decompress the installation package and go to the directory generated after the decompression.
    tar xvf opencv-4.4.5.tar.gz
    cd opencv-4.4.5
  4. Create a build directory.
    mkdir build
    cd build
  5. Perform the compilation.
    cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/opencv
    make -j
    make install
  6. Load the environment variables.
    export PATH=/path/to/opencv/bin:$PATH
    export LD_LIBRARY_PATH=/path/to/opencv/lib64:$LD_LIBRARY_PATH