Image IO

Hello,

i am fairly new to CUDA programming, actually i haven’t written any programs with CUDA so far.
What i want to do is to read/write Images in my CUDA application. Is there an easy way to do this with CUDA like with OpenCV? I mean, does CUDA have it’s own functions for that or do i have to link every of my programs to OpenCV aswell?

Thanks and best regards, tdhd

If you can get pointer to data after reading images using OpenCV functions , then you can transfer it to GPU memory, compute and transfer back to CPU and then can use OpenCV functions to write back in supported formats.

Hello,

you can also use cutLoadPGMub / cutSavePGMub for load/store images with unsigned char data. These functions are part of the SDK but i think there is no inconvenient. There are also the homonymous for integer, short and float.

Regards!

I forgot that you can also use cutLoadPPMub and cutSavePPMub for color images :)

Hope this help.

Thanks for all your replies, i now figured it out. :)