def gabor(image, frequency, theta=0, bandwidth=1, sigma_x=None, sigma_y=None, n_stds=3, offset=0, mode='reflect', cval=0):
 assert_nD(image, 2)
 g = gabor_kernel(frequency, theta, bandwidth, sigma_x, sigma_y, n_stds, offset)
 filtered_real = ndi.convolve(image, np.real(g), mode=mode, cval=cval)
 filtered_imag = ndi.convolve(image, np.imag(g), mode=mode, cval=cval)
 return (filtered_real, filtered_imag)

def gabor ( image , frequency , theta = 0 , bandwidth = 1 , sigma_x = None , sigma_y = None , n_stds = 3 , offset = 0 , mode = 'reflect' , cval = 0 ) : assert_nD ( image , 2 ) g = gabor_kernel ( frequency , theta , bandwidth , sigma_x , sigma_y , n_stds , offset ) filtered_real = ndi . convolve ( image , np . real ( g ) , mode = mode , cval = cval ) filtered_imag = ndi . convolve ( image , np . imag ( g ) , mode = mode , cval = cval ) return ( filtered_real , filtered_imag )
return real and imaginary responses to gabor filter .