Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

One OpenCV module can use another. Module dependecies are described in CMakeLists.txt file in module directory. Here is an example for superres module:

ocv_define_module(superres opencv_imgproc opencv_video OPTIONAL opencv_gpu opencv_highgui opencv_ocl)

First parameter (superres) is module name (without opencv_ prefix), next parameters are required dependencies and after OPTIONAL - optional dependecies. If one of the requered dependecies is missing module will be excluded from build.

As for your quiestion, answer is no in 2.4 branch. gpu module already depends on objdetect module, so objdetect can't depend on gpu (transitive dependecies is not supported). You can create separate module, that depends on both objdetect and gpu modules.