Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are the opencv2 include files?

I'm struggling to find the include files that should be in a directory names "opencv2"! I've downloaded OpenCV-2.4.0.tar.bz2 from here and extracted the files and ran cmake, which seemed to build the library successfully.

The problem is that under the "include" directory for "opencv2" there seem to be tons of header files missing. The only header file there at the moment is "opencv.hpp", which includes a whole set of other files which aren't there. Does anyone have any idea where I can get these files from?

Picture of the "opencv2" directory.

Thanks!

like image 643
James Bedford Avatar asked May 14 '12 17:05

James Bedford


2 Answers

The header files of the modules are in their own directories. E.g., you can find calib3d.hpp in /modules/calib3d/include/opencv2/calib3d. The Makefile created by CMake knows these addresses, hence when you make install the header files are all copied into /usr/local/include/opencv2.

like image 155
fireant Avatar answered Oct 19 '22 08:10

fireant


In case you were using cmake-gui and visual studio on Windows to make opencv (I had 3.4.0), don't forget to build this project:

enter image description here

This will generate all required files in a single folder, so you can easily connect header files:

enter image description here

like image 34
Stepan Yakovenko Avatar answered Oct 19 '22 09:10

Stepan Yakovenko