Commit 2ebf4e08 authored by LaurentBerger's avatar LaurentBerger

solve issue #10687

parent a1d2258a
...@@ -2449,7 +2449,8 @@ void cv::calcBackProject( InputArrayOfArrays images, const std::vector<int>& cha ...@@ -2449,7 +2449,8 @@ void cv::calcBackProject( InputArrayOfArrays images, const std::vector<int>& cha
double scale ) double scale )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION()
if (hist.dims() <= 2)
{
#ifdef HAVE_OPENCL #ifdef HAVE_OPENCL
Size histSize = hist.size(); Size histSize = hist.size();
bool _1D = histSize.height == 1 || histSize.width == 1; bool _1D = histSize.height == 1 || histSize.width == 1;
...@@ -2459,7 +2460,7 @@ void cv::calcBackProject( InputArrayOfArrays images, const std::vector<int>& cha ...@@ -2459,7 +2460,7 @@ void cv::calcBackProject( InputArrayOfArrays images, const std::vector<int>& cha
CV_OCL_RUN(dst.isUMat() && hist.type() == CV_32FC1 && CV_OCL_RUN(dst.isUMat() && hist.type() == CV_32FC1 &&
histdims <= 2 && ranges.size() == histdims * 2 && histdims == channels.size(), histdims <= 2 && ranges.size() == histdims * 2 && histdims == channels.size(),
ocl_calcBackProject(images, channels, hist, dst, ranges, (float)scale, histdims)) ocl_calcBackProject(images, channels, hist, dst, ranges, (float)scale, histdims))
}
Mat H0 = hist.getMat(), H; Mat H0 = hist.getMat(), H;
int hcn = H0.channels(); int hcn = H0.channels();
......
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