diff --git a/modules/video/src/bgfg_gaussmix2.cpp b/modules/video/src/bgfg_gaussmix2.cpp index 7103bea4de..3030f9e225 100644 --- a/modules/video/src/bgfg_gaussmix2.cpp +++ b/modules/video/src/bgfg_gaussmix2.cpp @@ -849,7 +849,7 @@ void BackgroundSubtractorMOG2Impl::apply(InputArray _image, OutputArray _fgmask, #ifdef HAVE_OPENCL if (opencl_ON) { - CV_OCL_RUN(_image.isUMat(), ocl_apply(_image, _fgmask, learningRate)) + CV_OCL_RUN(_fgmask.isUMat(), ocl_apply(_image, _fgmask, learningRate)) opencl_ON = false; initialize(_image.size(), _image.type());