使用HOG(Oriented Gradients直方图)的代码如下:
def get_hog() :
winSize = (20,20)
blockSize = (8,8)
blockStride = (4,4)
cellSize = (8,8)
numberbins = 9
derivAperture = 1
winSigma = -2.
histogramNormType = 0
L2HysThreshold = 0.4
gCorrection = 1
numberlevels = 66
signedGradient = True
hog = cv2.HOGDescriptor(winSize,blockSize,blockStride,cellSize,numberbins,derivAperture,winSigma,histogramNormType,L2HysThreshold,gCorrection,numberlevels, signedGradient)
return hog
我收到以下错误: " TypeError:HOGDescriptor()最多需要1个参数(12个给定)"
我该如何解决?