Commit 7469c2eb authored by Jin Ma's avatar Jin Ma

fixed a bug when double is not supported.

parent b6b190df
...@@ -223,7 +223,7 @@ namespace cv ...@@ -223,7 +223,7 @@ namespace cv
Moments ocl_moments(oclMat& src, bool binary) //for image Moments ocl_moments(oclMat& src, bool binary) //for image
{ {
CV_Assert(src.oclchannels() == 1); 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!"); CV_Error(CV_StsUnsupportedFormat, "Moments - double is not supported by your GPU!");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment