Ask Your Question

Revision history [back]

Building OpenCV 3.4. only Core module without OpenCL

Hello,

I try to build a minimal OpenCV core library without OpenCL use.

In cvconfig.h the #define HAVE_OPENCL is commented out.

I see e.g. in core/src/matrix_operations.cpp some functions wrapped by #ifdef HAVE_OPENCL, that's ok. But some are not but use OpenCL, e.g.

#include "opencl_kernels_core.hpp" // does not exist, so I commented it out

approx. line 960:

void cv::reduce(InputArray _src, OutputArray _dst, int dim, int op, int dtype) .... CV_OCL_RUN(_dst.isUMat(), ocl_reduce(_src, _dst, dim, op, op0, stype, dtype))

Result is a compile error ocl_reduce not defined.

What is wrong here? Thanks a lot. which results in compile error