mirror of
https://github.com/opencv/opencv.git
synced 2025-08-05 22:19:14 +08:00
BackgroundSubtractorMOG2Impl: only use OpenCL if input image is UMat
This commit is contained in:
parent
48af5e5579
commit
27ae1578ac
@ -846,7 +846,7 @@ void BackgroundSubtractorMOG2Impl::apply(InputArray _image, OutputArray _fgmask,
|
||||
#ifdef HAVE_OPENCL
|
||||
if (opencl_ON)
|
||||
{
|
||||
CV_OCL_RUN(opencl_ON, ocl_apply(_image, _fgmask, learningRate))
|
||||
CV_OCL_RUN(_image.isUMat(), ocl_apply(_image, _fgmask, learningRate))
|
||||
|
||||
opencl_ON = false;
|
||||
initialize(_image.size(), _image.type());
|
||||
|
Loading…
Reference in New Issue
Block a user