Is NPP nppiSqrIntegral_8u32s32f_C1R function not implemented Compute Integral Image

Hello guys, recently I’m working on a project which requires a fast computation function of integral image. I notice that NVIDIA NPP is a very powerful library and nppiSqrIntegral_8u32s32f_C1R() could help me to compute the Integral Image of a matrix. However, I encountered a very wired problem during programming.

Because there is no detailed example of nppiSqrIntegral_8u32s32f_C1R() function, I just Googled for some information. Luckily there was a post in this forum that report a problem and post some codes: NPP Integral Image

I mimic the code given there, and did some changes to get the code compiled on my platform. However, I got a different error from Sanix in the previous post. The return status of nppiSqrIntegral_8u32s32f_C1R() is -2, which is defined as NOT_IMPLEMENTED in nppdefs.h. Additionally, the data pointed by the destination field pointer of the function(Npp32s* pDest and Npp32f* pSqr) remain unchanged.

I tested on two environment. One is OpenSUSE 12.1 64bit, CUDA Toolkit 4.2, GT130M. The other is Ubuntu Server 64bit, CUDA Toolkit 4.2, Tesla C2050. The program gives the same error code -2.

I also tested the second piece of code in the post NPP Integral Image, same error code -2 is returned.

By the way, on our Ubuntu Server, the OpenCV’s Integral Image works fine cauze the functionality relies on it gives the right answer.

Does any one know where did I do wrong? How can I fix it? Or any alternative high performance library that could provide Integral Image function on GPUs.

Thank you!!! (2.06 KB)

nppiSqrIntegral_8u32s32f_C1R has been removed from current (version 4.1/4.2) NPP release (because of the bug in NPP Integral Image?), but is still there in the header files. So you’re doing nothing wrong…

The only way to use nppiSqrIntegral_8u32s32f_C1R is to switch to an older Toolkit version, 4.0 has it as far as I know. But nvidia probably had a reason to drop it…
Also, if you have access to the developer preview release of CUDA 5, nppiSqrIntegral_8u32s32f_C1R seems to be part of it (I didn’t test it).


Thanks for your useful info!

I notice that in OpenCV 2.4 there are many nppiStIntegral_XXX() functions. Does OpenCV implemented those functions outside NPP library? Do you have some experience on those functions?

Hello hiprince,

We disabled nppiSqrIntegral functions in CUDA 4.2 and 5.0. We will re-implement it in our next release. Thank you for your attention. If you have any questions, please post here.