HOG特征提取+python+opencv

def HOG_features(im):
    #start_time1=time.time()  
    hog = cv2.HOGDescriptor()
    winStride = (8, 8)
    padding = (8, 8)
    hist = hog.compute(im, winStride, padding)
    hist = hist.reshape((-1,))
    #stop_time1=time.time()
    #print (stop_time1-start_time1)
    return hist

 

posted @ 2021-04-08 13:29  皮卡皮卡妞  阅读(1101)  评论(0编辑  收藏  举报