Good morning dear all,

I'm currently using ippiSqrIntegral_8u32f64f_C1R to compute integral and square integral of an image. The square integral double array resulted seem to be right but it's not the case for the float integral array. So i decided to experiment the function in a simple 512x512 image entirely filled with 255 value. With this case, I expect that every value of integral array is gonna finish with "5" or "0" as it is a sum of 255 values... but i notice that some values can finish with "4" or "7", etc... errors occur between (126,508) and (513,508) .Here is my problem, because even if i'm wrong with the function paramters, it cannot gives float finishing with value other than "0" or "5". Thanks for any help

Here is my code :

#include <vector>

int main(){

std::vector<unsigned char> white(512*512,255);

Ipp8u* src = &white[0];

int step = 0;

Ipp32f* integral = ippiMalloc_32f_C1(512+1,521+1,&step);

Ipp64f* integral2 = (double*)malloc((512+1)*(512+1)*sizeof(double));

IppiSize roi = {w+2*R,h+2*R};

st = ippiSqrIntegral_8u32f64f_C1R(src,512*sizeof(Ipp8u),integral,(512+1)*sizeof(Ipp32f),integral2,(512+1)*sizeof(double),roi,0,0);

if(st!=ippStsNoErr)

{

std::cout << ippGetStatusString(st) << std::endl;

return 1;

}

for(int i=0 ; i<512+1 ; i++)

for(int j=0 ; j<512+1 ; j++)

{

if(*(integral + i*(512+1) + j)%5 != 0)

{

std::cout << i << "," << j << std::endl;

system("PAUSE");

}

}

return 0;

}