Skip to content

Commit 85a284c

Browse files
committed
surf: fix OpenCL condition
1 parent d32827a commit 85a284c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/xfeatures2d/src/surf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ void SURF_Impl::detectAndCompute(InputArray _img, InputArray _mask,
893893
CV_Assert(_descriptors.needed() || !useProvidedKeypoints);
894894

895895
#ifdef HAVE_OPENCL
896-
if( ocl::useOpenCL() )
896+
if( ocl::useOpenCL() && _img.isUMat())
897897
{
898898
SURF_OCL ocl_surf;
899899
UMat gpu_kpt;

0 commit comments

Comments
 (0)