How to use NPP with OpenCV?

Hi,

I’ve tried to search this, but couldn’t find anything. I’m new to CUDA and NPP and I try to do some image processing with it on every frame from camera, retrieved by OpenCV, so it’s Iplimage (with unsigned char 8 bit image data). The problem is, I don’t know how to use this image in any NPP function (for example compare) - if I have to copy image to device memory and then back, how can I display it like iplimage again and so… Can anyone please help me? Some example code would be great. Thank you :">

Hi,

I’ve tried to search this, but couldn’t find anything. I’m new to CUDA and NPP and I try to do some image processing with it on every frame from camera, retrieved by OpenCV, so it’s Iplimage (with unsigned char 8 bit image data). The problem is, I don’t know how to use this image in any NPP function (for example compare) - if I have to copy image to device memory and then back, how can I display it like iplimage again and so… Can anyone please help me? Some example code would be great. Thank you :">

Hi,

If you’re willing to use CUDA with OpenCV then take a look at CUVI which is a CUDA Vision and Imaging Library and integrates seamlessly with your existing OpenCV project. It can also be used as a standalone library and also in addition to NPP. I’ve just written a blog on how to use CUVI with OpenCV for example how to read an image into IplImage structure and then pass the data pointer to CUVI’s RGB_to_Gray function which converts a tripple channel RGB image into gray scale. This guide is for starters and you can use all of CUVI’s functions with OpenCV in a similar way.

Hi,

If you’re willing to use CUDA with OpenCV then take a look at CUVI which is a CUDA Vision and Imaging Library and integrates seamlessly with your existing OpenCV project. It can also be used as a standalone library and also in addition to NPP. I’ve just written a blog on how to use CUVI with OpenCV for example how to read an image into IplImage structure and then pass the data pointer to CUVI’s RGB_to_Gray function which converts a tripple channel RGB image into gray scale. This guide is for starters and you can use all of CUVI’s functions with OpenCV in a similar way.

Hi,

Another option for GPU image processing is to use LibJacket (a CUDA based GPU library) with OpenCV. This page has an example application and source code for using OpenCV for image capture and LibJacket for processing the image on the GPU.

~Chris