Ask Your Question

Revision history [back]

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!

click to hide/show revision 2
retagged

updated 2019-06-26 02:49:31 -0600

berak gravatar image

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!

click to hide/show revision 3
retagged

updated 2019-06-26 02:49:40 -0600

berak gravatar image

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!