martedì 21 aprile 2009

PyGPU - Python for the GPU

http://www.cs.lth.se/home/Calle_Lejdfors/pygpu/

Interesting features, give a look at examples!

def sobelEdgeDetect(im=DImage, p=Position):
wX = outerproduct([1,2,1],[-1,0,1])
wY = transpose(wX)

Gx = convolve(wX,im,p)
Gy = convolve(wY,im,p)

return sqrt(Gx**2 + Gy**2)

Nessun commento:

Posta un commento