Ejemplo n.º 1
0
def hog(img):
    global hog_object
    img = img.astype(np.uint8)

    if hog_object == None:  # Build the hog object just once
        hog_object = HOG(28, 28, 4, 8, 20)

    rv = hog_object.computeHOG(img)
    #hog_object.display_HOG()
    return rv