Adding contrib modules to OpenCV-3.4.1 without CMake [closed]

asked 2018-05-01 16:16:38 -0600

aIex gravatar image

updated 2018-05-01 18:54:45 -0600

Hello! When trying to build project generated with CMake 3.11.0 I get an "Unable to start program C:\OpenCVcontrib\opencv\build\x64\Debug (or Release)\ALL_BUILD /// Access denied.". I've installed it according to this instruction.

SOLUTION: Stupid mistake. What I had to do was to select project I was working on as a StartUp project - CMake solution runs ALL_BUILD by default.

What I want to do is to add module I want to a project created without using CMake. What I've tried is simply copying module (in this case tracking) folder to opencv2 folder and simply including it, but then I get errors in feature.hpp:

Severity    Code    Description Project File    Line    Suppression State
Error   C3646   'CV_OVERRIDE': unknown override specifier   cv_v1   c:\opencv-3.4.1\opencv\build\include\opencv2\tracking\feature.hpp   148

and

Severity    Code    Description Project File    Line    Suppression State
Error (active)  E0065   expected a ';'  cv_v1   c:\OpenCV-3.4.1\opencv\build\include\opencv2\tracking\feature.hpp   148

How I include tracking.hpp:

#include <opencv2/imgcodecs.hpp>
#include <opencv2/videoio.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/tracking.hpp>

What should I do? SOLUTION: Absolutely not what I did (see comments).

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by aIex
close date 2018-05-01 18:53:43.378774

Comments

"What I've tried is simply copying module (in this case tracking) folder to opencv2 folder " -- yea, just don't do that. there are dependancies to manage.

follow a tested receipe, not random blogposts

berak gravatar imageberak ( 2018-05-01 16:26:29 -0600 )edit

@berak by "tested receipe" you mean this: https://docs.opencv.org/3.4.1/d3/d52/... ?

aIex gravatar imageaIex ( 2018-05-01 16:54:11 -0600 )edit

i'd just take the advice from: https://github.com/opencv/opencv_cont...

berak gravatar imageberak ( 2018-05-01 17:04:21 -0600 )edit

Method I've linked above works like a charm, although it installs newest - 4.0 - OpenCV.

aIex gravatar imageaIex ( 2018-05-01 18:53:23 -0600 )edit