On Donnerstag 11 Juni 2009, Andrew Wagner wrote:
> Hi Guys-
>
> I need to apply an affine warping to an image and use the result in
> CUDA.  What sounds like a better idea:
>
> 1) Write a CUDA kernel to do the filtering and interpolation, perhaps
> using texture memory for the source image.
> 2) Try to figure out how to get the image into OpenGL and try to do
> the image re-sampling there.  I know OpenGL is meant for operations
> like this, but I have no idea how hard it will be to get things
> working from python.
> 3) Just do the warping on the CPU side using, say, OpenCV or
> scipy.ndimage.affine_transform, and then transferring the data to the
> GPU for the rest of my CUDA pipeline
>
> The source image is 1024 x 768 single channel, getting resampled down
> to 64 x 80 using a transformation matrix that gets computed online.  I
> have pretty minimal OpenGL experience, and none in a python context.

A while back, Holger Rapp contributed an example code that does image 
rotation:

http://git.tiker.net/pycuda.git/blob/HEAD:/examples/rotate.py

I'm guessing this might get you started on alternative #1.

Andreas

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
PyCuda mailing list
[email protected]
http://tiker.net/mailman/listinfo/pycuda_tiker.net

Reply via email to