From 7469c2eb9dd6005c402191f79eea7ac645c17fbd Mon Sep 17 00:00:00 2001 From: Jin Ma Date: Wed, 30 Oct 2013 14:37:13 +0800 Subject: [PATCH] fixed a bug when double is not supported. --- modules/ocl/src/moments.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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!"); }