diff --git a/modules/imgproc/src/morph.cpp b/modules/imgproc/src/morph.cpp index b83147851..e2cdcfc9d 100644 --- a/modules/imgproc/src/morph.cpp +++ b/modules/imgproc/src/morph.cpp @@ -1319,9 +1319,14 @@ static bool ocl_morphology_op(InputArray _src, OutputArray _dst, InputArray _ker anchor.x, anchor.y, (int)localThreads[0], (int)localThreads[1], op2str[op], doubleSupport?"-D DOUBLE_SUPPORT" :"", rectKernel?"-D RECTKERNEL":"", ocl::typeToStr(_src.type()), _src.depth() ); - ocl::Kernel k( "morph", ocl::imgproc::morph_oclsrc, compile_option); - if (k.empty()) - return false; + std::vector kernels; + for(int i = 0; i