greyImg = cv2.cvtColor(img, cv2.COLOR_BG2GRAY)

size1 = 2 * (int)(3 * sigma1) + 3

size2 = 2 * (int)(3 * sigma2) + 3

blur1 = cv2.GaussianBlur(greyImg, (size1, size1), sigmaX=sigma1,

sigmaY=sigma1, borderType=cv2.BORDER_REPLICATE)

blur2 = cv2.GaussianBlur(greyImg, (size2, size2), sigmaX=sigma2,

sigmaY=sigma2, borderType=cv2.BORDER_REPLICATE)

DoG = blur2 - blur1

featureMat = np.abs(np.fft.fftshift(np.fft.fft2(DoG)))

return np.reshape(DoG, (1, DoG.shape[0] * DoG.shape[1]))[0]

def getLBPFeature(img):

I'm doing feature extraction in python and I get this error in the last line. and I checked all brackets.

Any help?

Similar questions and discussions