I have the following code:
big_k = gabor((height * 2, width *2), (height, width))
for r_slice in range(0,radialSlices):
r_pixels = r_slice * radialWidth
for a_slice in range(0,angularSlices):
a_pixels = a_slice * angularWidth
k_win = big_k[height - r_pixels:2*height - r_pixels,width - a_pixels:2 * width - a_pixels]
result = np.sum(img * k_win)
img is a uint8 array of 640x480, and big_k is complex64 1280x960.
This code amounts to 1024 640x480 matrix multiplications and a cast to complex64.
This code takes on the order of 2 seconds to run on my macbook; I'm looking to try and get a speedup of the order of 100x. What can I do?
scipy.signal.fftconvolve.