3

I have a question related to the structure of OpenCV source code (version 2.4.2), which can be downloaded from here. After downloading and extracting the source code, I notice that in the root directory there are eleven folders, and they are 3rdparty, android, apps, build, cmake, data doc, include, ios, modules and samples. I can understand all the folders expect the include folder and the build folder. For the build folder, if I understand well it includes the header files as well as several libraries that are needed for invoking the OpenCV libraries. So, what's the point of the include folder? Why will OpenCV organize the source code in this way? Any ideas will be appreciated.

feelfree
  • 11,175
  • 20
  • 96
  • 167

1 Answers1

1

Include folder typically contains header files. You will need them while developing (especially compiling) using OpenCV.

Build and Bin folders typically contains compiled libraries like .lib and .dll and also executables. You will need them in linking and execution phase.

This directory structuring is applied widely, so you will get used to it if you work enough with source code of libraries. And IMO, it's a good way to structure a library.

Seçkin Savaşçı
  • 3,446
  • 2
  • 23
  • 39
  • Thanks, but Build folder contains header files, lib and dll. In fact when invoking Opencv library, there is no need to use header files in the Include directory. For more details on how to use this library with Visual Studio 10, you can refer to http://stackoverflow.com/questions/7011238/opencv-2-3-c-visual-studio-2010. – feelfree Aug 31 '12 at 12:46
  • @feelfree Consider Build folder as a redistributable package for your system, then it makes sense to header files in it. – Seçkin Savaşçı Aug 31 '12 at 13:16
  • Savasci I have no problem in understanding **build** folder. Since this fold already contains header files for the library, what is the function of the **include** folder? – feelfree Aug 31 '12 at 15:21
  • it's for compiling the source code of the library. As you know some of the good guys are developing the library for our use :) – Seçkin Savaşçı Aug 31 '12 at 16:04