Pose Estimation Tutorial not compiling

asked 2019-04-26 07:48:56 -0500

trttrt gravatar image

I am trying to follow this: https://docs.opencv.org/3.4.4/dc/d2c/tutorial_real_time_pose.html

I create a directory "build" in


and run cmake ..

I get this:

CMake Error at CMakeLists.txt:15 (ocv_include_modules_recurse):
  Unknown CMake command "ocv_include_modules_recurse".

CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.13)

I have OpenCV 2.4 compiled with open_contrib and 3.4 without. Usually when I compile a .cpp program that uses openCV I run.

g++ $(pkg-config --cflags --libs /usr/local/Cellar/[email protected]/3.4.5/lib/pkgconfig/opencv.pc) -std=c++11 main.cpp

since I am on MacOS. Should I ignore cmake and compile it like that ? How do I fix the error ?

edit retag flag offensive close merge delete


Call cmake for the main OpenCV directory:

  • OpenCV-src --> the OpenCV directory
  • OpenCV-build --> the OpenCV build directory
  • from OpenCV-build, call ccmake ../OpenCV-src
Eduardo gravatar imageEduardo ( 2019-04-26 12:02:36 -0500 )edit