Problem using cmake to compile opencv-contrib
Hi, I have a problem when I try use the fuction cv2.Tracker_create in pycharm, I got the following error:
**tracker = cv2.Tracker_create(tipo_track[0])
AttributeError: module 'cv2' has no attribute 'Tracker_create'**
I undestend that I need to compile opencv adding the opencv-contrib module. I configure in cmake the following path:
OPENCV_EXTRA_MODULE_PATH = /home/kevinvig7/opencv_contrib/modules And when I click "Configure" I obtain the following waring: Unexpected include: /home/kevinvig7/opencv/build/downloads/xfeatures2d (module=opencv_xfeatures2d) Call Stack (most recent call first): /home/kevinvig7/opencv/cmake/OpenCVModule.cmake:711 (ocv_target_include_modules) /home/kevinvig7/opencv_contrib/modules/xfeatures2d/CMakeLists.txt:14 (ocv_module_include_directories)
Then when I run "cmake." and "sudo make -j8" I obtain the following error: /home/kevinvig7/opencv_contrib/modules/xfeatures2d/src/vgg.cpp:490:20: fatal error: vgg_generated_120.i: No existe el archivo o el directorio #include "vgg_generated_120.i" ^~~~~~~~~~~~~~~~~~~~~ compilation terminated.
The versions are: Python 3.6 OpenCV 3.2 CMake 3.10.2 Pycharm 2018.2.1
Can anyone help me? Thanks!
it's not a cmake problem at all. your python code is outdated, that's all there is.