1

I am working on a harr detecttion project. I want to generate the exe files using the .cpp files that come with Opencv. I am using CMake for it. When I try to do that I am getting an error like this. Don`t know how to solve it.

CMake Error at CMakeLists.txt:7 (ocv_check_dependencies): Unknown CMake command "ocv_check_dependencies".

Configuring incomplete, errors occurred!

Source link: C:/opencv/apps/haartraining

Destination link: D:/build

Please help me.

ffriend
  • 27,562
  • 13
  • 91
  • 132
Ashwin
  • 483
  • 1
  • 9
  • 25
  • 2
    Possible [duplicate](http://stackoverflow.com/questions/13146650/compiling-opencv-samples-unknown-cmake-command-ocv-check-dependencies) – ffriend Feb 06 '13 at 09:41
  • Hey Friend, I need the solution for the Windows.. – Ashwin Feb 06 '13 at 09:43
  • 1
    I don't know the way you install OpenCV on Windows, but you said you use CMake, right? That answer describes what to do with CMake, regardless of operating system. Just add specified option to CMake and then continue with the steps from tutorial or whatever you use. – ffriend Feb 06 '13 at 09:53

2 Answers2

1

I was working on some image processing that involves Haar detection. And i was having a hard time trying to configure with Cmake at first but i finally found manual configuration tutorial with out using Cmake or else. It has helped me a lot and you can get it here. I hope it will work perfect as it worked for me too. Click here -> http://www.anlak.com/using-opencv-2-3-1-with-visual-studio-2010-tutorial/. The tutorial uses open CV 2.3.1 but it will work perfect for recent versions too with the need for Cmake ore else.If you more questions, hit me up and i will explain.Good luck!

Sisay
  • 681
  • 7
  • 16
  • 31
0

It looks like You need to compile the whole library with build examples option enabled (if You are using windows then I bet You use graphic cmake interface, so it shouldn't be a problem), and then You will find the .exe in bin directory,

or You would need to include OpenCVModule.cmake file found in cmake catalogue to CMake file You are trying to use for the build.

I didn't test the second option myself, but it looks like CMake file You are trying to use does not load all macros needed for it to run, but macros are loaded when the root library CMake file is used.

morynicz
  • 2,322
  • 2
  • 20
  • 34