0

I want to call cv::integral() function, located at sumpixels.cpp . I'm not using the integral image calculated for the square sum (3d argument - OutputArray _sqsum) , and would like to disable its calculation in order to save run time.

I'm not TOO familiar with the opencv environment.

Tried to call cv::integral() function with NULL as the 3d param - didn't work. I entered the function (at sumpixels.cpp) and I saw there is this line:

if( _sqsum.needed() )
{
...
}

So I guess I can modify it manually to skip that if condition, but what would be the consequences of that? I see later the use of the parameter sqsum when calling IntegralFunc func method, what should I send to it then instead of that sqsum?

Thanks alot! Eyal

lxg
  • 12,375
  • 12
  • 51
  • 73
brkeyal
  • 1,317
  • 1
  • 16
  • 22

1 Answers1

0

Could you detail more precisely what didn't work when you set the 3d parameter as NULL ?

I debugged the code using OpenCV 2.4.2 and when the 3rd param is set to NULL _sqsum.needed() returns false which prevents the computation of the sqsum.

rold2007
  • 1,297
  • 1
  • 12
  • 25
  • The error I get @ haarfeatures.cpp: "error C2665: 'cv::integral' : none of the 3 overloads could convert all the argument types." I'm using VS2012, opencv2.4.6.1 (probably). – brkeyal Oct 27 '14 at 12:13
  • Then your source and dest types are not good. Have you looked at the supported source/dest types here ? http://docs.opencv.org/modules/imgproc/doc/miscellaneous_transformations.html – rold2007 Oct 29 '14 at 04:30