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 0385a187f693b78c9bc1dc90e8a659f16b5b9f34..04dc7e2824e0d4820b469cde96e9a9a4f524ad61 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];