diff --git a/modules/ocl/src/moments.cpp b/modules/ocl/src/moments.cpp index e0d05b372..a48e92c2d 100644 --- a/modules/ocl/src/moments.cpp +++ b/modules/ocl/src/moments.cpp @@ -223,7 +223,7 @@ namespace cv Moments ocl_moments(oclMat& src, bool binary) //for image { CV_Assert(src.oclchannels() == 1); - if(src.type() == CV_64FC1 && Context::getContext()->supportsFeature(FEATURE_CL_DOUBLE)) + if(src.type() == CV_64FC1 && !Context::getContext()->supportsFeature(FEATURE_CL_DOUBLE)) { CV_Error(CV_StsUnsupportedFormat, "Moments - double is not supported by your GPU!"); }