title: Unable to add extra modules to OpenCV (even with matching versions of opencv/opencv_contrib)
body: <p>I'm trying to install OpenCV with extra modules on a computer running Ubuntu 14.04.2 (I need this specific version of Ubuntu as I'm using some other hardware that requires it). I was able to do it on a Raspberry Pi 3 just last week (running Ubuntu Mate 16.04.3), but now I just can't seem to get it right.</p>
  <p>I know that the opencv_contrib-version needs to be the same as the opencv-version, and I've tried building many different versions without luck (3.4.0, 3.3.0, 3.2.0, 3.1.0).</p>
  <p>After downloading matching versions of opencv and opencv_contrib, I'm doing the following commands from the terminal:</p>
  <blockquote>
  <p>$ cd opencv</p>
  <p>$ mkdir build</p>
  <p>$ cd build</p>
  <p>$ cmake -D OPENCV_EXTRA_MODULES_PATH = ../../opencv_contrib/modules ..</p>
  </blockquote>
  <p>where both opencv and opencv_contrib folders are located on the Desktop, so the &quot;../../opencv_contrib/modules&quot;-path should be correct.</p>
  <p>But the extra modules aren't built. Here is parts of the cmake output:</p>
  <blockquote>
  <p>--   OpenCV modules:</p>
  <p>--     To be built:                 core flann imgproc ml objdetect photo video dnn imgcodecs shape videoio highgui superres ts features2d
  calib3d stitching videostab</p>
  <p>--     Disabled:                    world</p>
  <p>--     Disabled by dependency:      -</p>
  <p>--     Unavailable:                 cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect
  cudaoptflow cudastereo cudawarping cudev java python2 python3 viz</p>
  </blockquote>
  <p>And as you can see, it's only the standard modules that are included. I've seen many people having the same issue, but the solution has always been about having the matching opencv/opencv_contrib versions. Now that I know that the versions are correct, I have no clue as to what I'm doing wrong.</p>