Where are the opencv2 include files?

时光毁灭记忆、已成空白 提交于 2019-12-03 06:53:49

问题


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?

Thanks!


回答1:


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.




回答2:


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:

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



来源:https://stackoverflow.com/questions/10588400/where-are-the-opencv2-include-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!