Hello,
I’ve installed OpenCv 4.8.0 with contribs and linked it with ROS.
I can use the extra modules with C++ nodes, but I can’t with Python. I found that I have to rebuild OpenCv with OPENCV_ENABLE_NONFREE = ON, but it is not working.
Do I have to rebuild even the vision_opencv pacage I’ve got in my workspace?
if you build opencv yourself, you also have to “install” it properly. if you do not, you will not get that opencv in your python. you’ll get whatever you installed previously.
This is the error I get when I try to run the python node I’ve written in ROS:
cv2.error: OpenCV(4.7.0) /io/opencv_contrib/modules/xfeatures2d/src/surf.cpp:1026: error: (-213:The function/feature is not implemented) This algorithm is patented and is excluded in this configuration; Set OPENCV_ENABLE_NONFREE CMake option and rebuild the library in function ‘create’
Ok, well I thought the files were there and I just had to “link” them or something, but, as I said, I don’t know much about what happen when I build a library.
Do you have any suggestion about the steps you think I am missing?