Image Processing

Hello everybody, i’m pretty new in CUDA and i would like to know if it’s possible to access the RGB component into a cuda kernel ?
In fact i have to make a sobel filter on a video on CPU and on GPU. On CPU i use openCV to access the RGB but i would like to send
the image into the GPU ,get RGB and process sobel filter.

I know there is a sample on the SDK but i don’t understand a line :biggrin:

So i just need to get RGB values of an image into the kernel.
Thanks. ;)

Hey! How to pass your data to kernel is completely up to you. If you have, for example a 1D array, lets say unsigned char *, that contains the RGB data of an image you would allocate the needed amount of device memory and copy the RGB contents to the device.

Have a look at the functions cudaMalloc() and cudaMemcpy().

In fact i have to process lots of frames so i need to reduce transfer time between gpu and cpu, so that’s why i need ton send the full frame and then process into it …

I’m sorry I’m just in a bad position, I must finish that project for this fryday and I’m completely lost … ;)