ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Since xfeatured2d module is not part of OpenCV anymore, but now included in opencv_contrib (https://github.com/opencv/opencv_contrib/tree/master/modules/xfeatures2d) you need to build and install from source and add those modules to the build configuration.

Summarizing what you can find in the following link (https://linuxize.com/post/how-to-install-opencv-on-ubuntu-18-04/).

  1. Install the necessary packages
  2. Clone the OpenCV source code and mostly important for you, clone the opencv_contrib repository
  3. Set up the OpenCV build with CMake. Since xfeatured2d is a nonfree module, you will need to set OPENCV_ENABLE_NONFREE=ON. The whole command would look something like this:
cmake -D CMAKE_BUILD_TYPE=RELEASE \
    -D CMAKE_INSTALL_PREFIX=/usr/local \
    -D INSTALL_C_EXAMPLES=ON \
    -D INSTALL_PYTHON_EXAMPLES=ON \
    -D OPENCV_EXTRA_MODULES_PATH=~/opencv_build/opencv_contrib/modules \
    -D BUILD_EXAMPLES=ON .. \
    -D OPENCV_ENABLE_NONFREE=ON ..
  1. Compile OpenCV
  2. Install OpenCV

You may need to uninstall python-opencv to use your build from source if the package was already installed with ROS or separately using the package manager. For that, and in order to prevent the package manager to remove all dependencies and brake your ROS installation, use instead the next command (only if you know what you are doing) to remove only your python-opencv package:

sudo dpkg -P --force-all python-opencv

Since xfeatured2d module is not part of OpenCV anymore, but now included in opencv_contrib (https://github.com/opencv/opencv_contrib/tree/master/modules/xfeatures2d) you need to build and install from source and add those modules to the build configuration.

Summarizing what you can find in the following link (https://linuxize.com/post/how-to-install-opencv-on-ubuntu-18-04/).

  1. Install the necessary packages
  2. Clone the OpenCV source code and mostly important for you, clone the opencv_contrib repository
  3. Set up the OpenCV build with CMake. Since xfeatured2d is a nonfree module, you will need to set OPENCV_ENABLE_NONFREE=ON. The whole command would look something like this:
cmake -D CMAKE_BUILD_TYPE=RELEASE \
    -D CMAKE_INSTALL_PREFIX=/usr/local \
    -D INSTALL_C_EXAMPLES=ON \
    -D INSTALL_PYTHON_EXAMPLES=ON \
    -D OPENCV_EXTRA_MODULES_PATH=~/opencv_build/opencv_contrib/modules \
    -D BUILD_EXAMPLES=ON .. \
    -D OPENCV_ENABLE_NONFREE=ON ..
  1. Compile OpenCV
  2. Install OpenCV

You may need to uninstall python-opencv to use your build from source if the package was already installed with ROS or separately using the package manager. For that, and in order to prevent the package manager to remove all dependencies and brake your ROS installation, use instead the next command (only if you know what you are doing) to remove only your python-opencv package:

sudo dpkg -P --force-all python-opencv

Since xfeatured2d module is not part of OpenCV anymore, but now included in opencv_contrib (https://github.com/opencv/opencv_contrib/tree/master/modules/xfeatures2d) you need to build and install from source and add those modules to the build configuration.

Summarizing what you can find in the following link (https://linuxize.com/post/how-to-install-opencv-on-ubuntu-18-04/).

  1. Install the necessary packages
  2. Clone the OpenCV source code and mostly important for you, clone the opencv_contrib repository
  3. Set up the OpenCV build with CMake. Since xfeatured2d is a nonfree module, you will need to set OPENCV_ENABLE_NONFREE=ON. The whole command would look something like this:

cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr/local \ -D INSTALL_C_EXAMPLES=ON \ -D INSTALL_PYTHON_EXAMPLES=ON \ -D OPENCV_EXTRA_MODULES_PATH=~/opencv_build/opencv_contrib/modules \ -D BUILD_EXAMPLES=ON .. \ -D OPENCV_ENABLE_NONFREE=ON ..

    ..

  1. Compile OpenCV

  2. Install OpenCV

Since xfeatured2d module is not part of OpenCV anymore, but now included in opencv_contrib (https://github.com/opencv/opencv_contrib/tree/master/modules/xfeatures2d) you need to build and install from source and add those modules to the build configuration.

Summarizing what you can find in the following link (https://linuxize.com/post/how-to-install-opencv-on-ubuntu-18-04/).

  1. Install the necessary packages
  2. Clone the OpenCV source code and mostly important for you, clone the opencv_contrib repository
  3. Set up the OpenCV build with CMake. Since xfeatured2d is a nonfree module, you will need to set OPENCV_ENABLE_NONFREE=ON. The whole command would look something like this:

`

cmake -D CMAKE_BUILD_TYPE=RELEASE \
     -D CMAKE_INSTALL_PREFIX=/usr/local \
     -D INSTALL_C_EXAMPLES=ON \
     -D INSTALL_PYTHON_EXAMPLES=ON \
     -D OPENCV_EXTRA_MODULES_PATH=~/opencv_build/opencv_contrib/modules \
     -D BUILD_EXAMPLES=ON .. \
     -D OPENCV_ENABLE_NONFREE=ON ..

  • ..

  • `

    1. Compile OpenCV

    2. Install OpenCV

    Since xfeatured2d module is not part of OpenCV anymore, but now included in opencv_contrib (https://github.com/opencv/opencv_contrib/tree/master/modules/xfeatures2d) you need to build and install from source and add those modules to the build configuration.

    Summarizing what you can find in the following link (https://linuxize.com/post/how-to-install-opencv-on-ubuntu-18-04/).

    1. Install the necessary packages
    2. Clone the OpenCV source code and mostly important for you, clone the opencv_contrib repository
    3. Set up the OpenCV build with CMake. Since xfeatured2d is a nonfree module, you will need to set OPENCV_ENABLE_NONFREE=ON. The whole command would look something like this:

    `

    cmake -D CMAKE_BUILD_TYPE=RELEASE \
            -D CMAKE_INSTALL_PREFIX=/usr/local \
            -D INSTALL_C_EXAMPLES=ON \
            -D INSTALL_PYTHON_EXAMPLES=ON \
            -D OPENCV_EXTRA_MODULES_PATH=~/opencv_build/opencv_contrib/modules \
            -D BUILD_EXAMPLES=ON .. \
            -D OPENCV_ENABLE_NONFREE=ON ..
    

    `

    1. Compile OpenCV
    2. Install OpenCV

    Since xfeatured2d module is not part of OpenCV anymore, but now included in opencv_contrib (https://github.com/opencv/opencv_contrib/tree/master/modules/xfeatures2d) you need to build and install from source and add those modules to the build configuration.

    Summarizing what you can find in the following link (https://linuxize.com/post/how-to-install-opencv-on-ubuntu-18-04/).

    1. Install the necessary packages
    2. Clone the OpenCV source code and mostly important for you, clone the opencv_contrib repository
    3. Set up the OpenCV build with CMake. Since xfeatured2d is a nonfree module, you will need to set OPENCV_ENABLE_NONFREE=ON. The whole command would look something like this:

    cmake -D CMAKE_BUILD_TYPE=RELEASE \
            -D CMAKE_INSTALL_PREFIX=/usr/local \
            -D INSTALL_C_EXAMPLES=ON \
            -D INSTALL_PYTHON_EXAMPLES=ON \
            -D OPENCV_EXTRA_MODULES_PATH=~/opencv_build/opencv_contrib/modules \
            -D BUILD_EXAMPLES=ON .. \
            -D OPENCV_ENABLE_NONFREE=ON ..
    
    1. Compile OpenCV

    2. Install OpenCV

    Since xfeatured2d module is not part of OpenCV anymore, but now included in opencv_contrib (https://github.com/opencv/opencv_contrib/tree/master/modules/xfeatures2d) you need to build and install from source and add those modules to the build configuration.

    Summarizing what you can find in the following link (https://linuxize.com/post/how-to-install-opencv-on-ubuntu-18-04/).

    1. Install the necessary packages
    2. Clone the OpenCV source code and mostly important for you, clone the opencv_contrib repository
    3. Set up the OpenCV build with CMake. Since xfeatured2d is a nonfree module, you will need to set OPENCV_ENABLE_NONFREE=ON. The whole command would look something like this:

    cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr/local \ -D INSTALL_C_EXAMPLES=ON \ -D INSTALL_PYTHON_EXAMPLES=ON \ -D OPENCV_EXTRA_MODULES_PATH=~/opencv_build/opencv_contrib/modules \ -D BUILD_EXAMPLES=ON .. \ -D OPENCV_ENABLE_NONFREE=ON ..

  • ..

    1. Compile OpenCV

    2. Install OpenCV
  • Since xfeatured2d module is not part of OpenCV anymore, but now included in opencv_contrib (https://github.com/opencv/opencv_contrib/tree/master/modules/xfeatures2d) you need to build and install from source and add those modules to the build configuration.

    Summarizing what you can find in the following link (https://linuxize.com/post/how-to-install-opencv-on-ubuntu-18-04/).

    1. Install the necessary packages
    2. Clone the OpenCV source code and mostly important for you, clone the opencv_contrib repository
    3. Set up the OpenCV build with CMake. Since xfeatured2d is a nonfree module, you will need to set OPENCV_ENABLE_NONFREE=ON. The whole command would look something like this:

    cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr/local \ -D INSTALL_C_EXAMPLES=ON \ -D INSTALL_PYTHON_EXAMPLES=ON \ -D OPENCV_EXTRA_MODULES_PATH=~/opencv_build/opencv_contrib/modules \ -D BUILD_EXAMPLES=ON .. \ -D OPENCV_ENABLE_NONFREE=ON ..

    1. Compile OpenCV

    2. Install OpenCV

    Since xfeatured2d module is not part of OpenCV anymore, but now included in opencv_contrib (https://github.com/opencv/opencv_contrib/tree/master/modules/xfeatures2d) you need to build and install from source and add those modules to the build configuration.

    Summarizing what you can find in the following link (https://linuxize.com/post/how-to-install-opencv-on-ubuntu-18-04/).

    1. Install the necessary packages
    2. Clone the OpenCV source code and mostly important for you, clone the opencv_contrib repository
    3. Set up the OpenCV build with CMake. Since xfeatured2d is a nonfree module, you will need to set OPENCV_ENABLE_NONFREE=ON. The whole command would look something like this:

    cmake -D CMAKE_BUILD_TYPE=RELEASE \
            -D CMAKE_INSTALL_PREFIX=/usr/local \
            -D INSTALL_C_EXAMPLES=ON \
            -D INSTALL_PYTHON_EXAMPLES=ON \
            -D OPENCV_EXTRA_MODULES_PATH=~/opencv_build/opencv_contrib/modules \
            -D BUILD_EXAMPLES=ON .. \
            -D OPENCV_ENABLE_NONFREE=ON ..

  • ..

    1. Compile OpenCV

    2. Install OpenCV

    Since xfeatured2d module is not part of OpenCV anymore, but now included in opencv_contrib (https://github.com/opencv/opencv_contrib/tree/master/modules/xfeatures2d) you need to build and install from source and add those modules to the build configuration.

    Summarizing what you can find in the following link (https://linuxize.com/post/how-to-install-opencv-on-ubuntu-18-04/).

    1. Install the necessary packages
    2. Clone the OpenCV source code and mostly important for you, clone the opencv_contrib repository
    3. Set up the OpenCV build with CMake. Since xfeatured2d is a nonfree module, you will need to set OPENCV_ENABLE_NONFREE=ON. The whole command would look something like this:

    cmake -D CMAKE_BUILD_TYPE=RELEASE \ \
    -D CMAKE_INSTALL_PREFIX=/usr/local \ \
    -D INSTALL_C_EXAMPLES=ON \ \
    -D INSTALL_PYTHON_EXAMPLES=ON \ \
    -D OPENCV_EXTRA_MODULES_PATH=~/opencv_build/opencv_contrib/modules \ \
    -D BUILD_EXAMPLES=ON .. \ \
    -D OPENCV_ENABLE_NONFREE=ON ..

    1. ..

    2. Compile OpenCV

    3. Install OpenCV

    Since xfeatured2d module is not part of OpenCV anymore, but now included in opencv_contrib (https://github.com/opencv/opencv_contrib/tree/master/modules/xfeatures2d) you need to build and install from source and add those modules to the build configuration.

    Summarizing what you can find in the following link (https://linuxize.com/post/how-to-install-opencv-on-ubuntu-18-04/).

    1. Install the necessary packages
    2. Clone the OpenCV source code and mostly important for you, clone the opencv_contrib repository
    3. Set up the OpenCV build with CMake. Since xfeatured2d is a nonfree module, you will need to set OPENCV_ENABLE_NONFREE=ON. The whole command would look something like this:

    cmake -D CMAKE_BUILD_TYPE=RELEASE \ 
    -D CMAKE_INSTALL_PREFIX=/usr/local \
    -D INSTALL_C_EXAMPLES=ON \
    -D INSTALL_PYTHON_EXAMPLES=ON \
    -D OPENCV_EXTRA_MODULES_PATH=~/opencv_build/opencv_contrib/modules \
    -D BUILD_EXAMPLES=ON .. \
    -D OPENCV_ENABLE_NONFREE=ON ..

  • ..

    1. Compile OpenCV

    2. Install OpenCV