Getting StartedΒΆ

  1. Load the module and instantiate the descriptor:

    from hogpp import IntegralHOGDescriptor
    
    desc = IntegralHOGDescriptor()
    
  2. Load the image and precompute its integral histogram R-HOG representation. This needs to be done only once per image:

    desc.compute(image)
    
  3. Extract the feature descriptor of a region of interest using a function call on a hogpp.IntegralHOGDescriptor instance, i.e., by invoking hogpp.IntegralHOGDescriptor.__call__(). The method can be called multiple times for different subregions of the image whose integral histogram representation was previously precomputed.

    # top left (row, column) size (height, width)
    roi = (0, 0, 128, 64)
    X = desc(roi)
    

Note

hogpp.IntegralHOGDescriptor uses matrix indexing along each axis as opposed to Cartesian coordinates, i.e., the first index corresponds to the vertical (\(y\)) coordinate, the second index to the horizontal (\(x\)) coordinate, etc.