Hello ROS Perception!
Back in 2015, it was decided by the predecessor to this discussion group (ros-sig-perception) that we create an
opencv3 rosdep key for the Indigo and Kinetic distros, since the default opencv at that time for those platforms was opencv2, and, to quote the ROS wiki for the opencv3 rosdep key, “the OpenCV2 version in Debian got rid of contribution modules and things like SIFT got lost.” Further motivating the need for a new custom debian build for the ROS community, it was explained then that “packaging opencv_contrib is difficult as it needs to be compiled with OpenCV sources.”
Today, in 2020 and looking at Noetic + OpenCV4.2, this state of affairs is once again true, and the ROS community does not have a simple rosdep key to rely on for accessing useful algorithms like SURF and SIFT as it did in Kinetic. OpenCV4.2 does not ship the xfeatures2d module directly, and requires you to re-compile opencv sources with the opencv_contrib repo in order to re-gain access to SURF, SIFT, and other highly useful algorithms to the ROS community.
I can see that this is a perennial issue for ROS users – I found a ROS Answers post with this same question but for Melodic, and there the questioner asks:
On ROS Melodic ros-melodic-opencv3 doesn’t exist anymore as e.g. on ROS Kinetic. Instead it is recommended to install libopencv-dev http://wiki.ros.org/melodic/Migration… , however, this package does not contain xfeatures2d, neither does libopencv-contrib-dev.
Unfortunately for them, the response was that from now on since Kinetic, we would have to manually re-compile opencv + opencv_contrib from source to reach parity with Kinetic-era 2D extra feature utilities in OpenCV.
So, for the ROS Computer Vision / Perception community: is there any interest in bringing easier access to the
xfeatures2d OpenCV module to Noetic, as we once had for Kinetic? Does anyone know why we stopped the practice after the one time we made the opencv3 custom debian and rosdep key for essentially this purpose?
P.S. As of OpenCV4.4 and onwards, SIFT has been re-integrated into the main opencv codebase, since its patent has expired. But we would still have to create a custom debian distribution for OpenCV4.4+ even to get this benefit, so there may be work to do here either way!