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
opencv/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation
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/opencv@3/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 ?