Finally I figured it out.
- input image must be in uint8 format
- need to allocate 2 buffers (32bit float and 64bit float in my case)
sizes of arrays:
input sizeH
xW
filter size,P
xP
result sizeH-P+1
xW-P+1
intermidate buffers (32f and 64f) sizesH+1
xW+1
(note the plus one for integral image boundary!)// first, compute integral and sqIntegral image IppiSize sz; sz.width = W; sz.height = H; ippiSqrIntegral_8u32f64f_C1R( uint8ImgPtr, W*sizeof(unsigned char), d32ImgPtr, (W+1)*sizeof(float), d64ImgPtr, (W+1)*sizeof(double), sz, 0, 0 ); // using the integral images compute the std filter result IppiRect rect = { 0, 0, P, P }; IppiSize dsz; dsz.width = W-P+1; dsz.height = H-P+1; ippiRectStdDev_32f_C1R( d32ImgPtr, (W+1)*sizeof(float), d64ImgPtr, (W+1)*sizeof(double), dstPtr, (W-P+1)*sizeof(float), dsz, rect );