diff --git a/modules/imgproc/src/histogram.cpp b/modules/imgproc/src/histogram.cpp index e7e03ceeb2875b15480b55bd3ef9c7772a9b486f..68cb58491e74d508d501dd74a155ba05aa514e8f 100644 --- a/modules/imgproc/src/histogram.cpp +++ b/modules/imgproc/src/histogram.cpp @@ -2212,8 +2212,8 @@ void cv::calcBackProject( InputArrayOfArrays images, const std::vector& cha const std::vector& ranges, double scale ) { - Size histSize = hist.size(); #ifdef HAVE_OPENCL + Size histSize = hist.size(); bool _1D = histSize.height == 1 || histSize.width == 1; size_t histdims = _1D ? 1 : hist.dims(); #endif diff --git a/modules/ts/src/ocl_test.cpp b/modules/ts/src/ocl_test.cpp index a2a75cf888ad570129877417de3aa42dca864bfb..d429d4bc8cd2670377a043806db20db6a5109559 100644 --- a/modules/ts/src/ocl_test.cpp +++ b/modules/ts/src/ocl_test.cpp @@ -50,6 +50,7 @@ using namespace cv; int test_loop_times = 1; // TODO Read from command line / environment +#ifdef HAVE_OPENCL #define DUMP_PROPERTY_XML(propertyName, propertyValue) \ do { \ @@ -204,6 +205,7 @@ void dumpOpenCLDevice() #undef DUMP_MESSAGE_STDOUT #undef DUMP_PROPERTY_XML +#endif Mat TestUtils::readImage(const String &fileName, int flags) {