added data type check for back projection fix
authormlyashko <maria.lyashko@itseez.com>
Wed, 12 Mar 2014 07:30:28 +0000 (11:30 +0400)
committermlyashko <maria.lyashko@itseez.com>
Wed, 12 Mar 2014 07:30:28 +0000 (11:30 +0400)
modules/imgproc/src/histogram.cpp

index 0385a18..04dc7e2 100644 (file)
@@ -2035,6 +2035,10 @@ static bool ocl_calcBackProject( InputArrayOfArrays _images, std::vector<int> ch
     Size size = images[0].size();
     int depth = images[0].depth();
 
+    //kernels are valid for this type only
+    if (depth != CV_8U)
+        return false;
+
     for (size_t i = 1; i < nimages; ++i)
     {
         const UMat & m = images[i];