使用cmake编译opencv(包含了opencv_contrib),执行cmake命令时报错:
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'".
解决方法在:
cmake -DOPENCV_ENABLE_NONFREE:BOOL=ON -D CMAKE_INSTALL_PREFIX=/usr/local -D CMAKE_BUILD_TYPE=Release -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ..
(参数中路径要根据自己的机器更改一下啦)