pyaesthetics.selfsimilarity.calculate_hog

pyaesthetics.selfsimilarity.calculate_hog(image, orientations=16, pixels_per_cell=(16, 16), cells_per_block=(2, 2), visualize=True)

Calculate the Histogram of Oriented Gradients (HOG) for a given image.

Parameters:
  • image (numpy.ndarray) – Input image.

  • orientations – Number of orientation bins.

  • pixels_per_cell (tuple) – Size (in pixels) of a cell.

  • cells_per_block – Number of cells in each block.

type cells_per_block: tuple :param visualize: Whether to return an image of the HOG. :type visualize: bool :return: HOG feature vector and HOG image (if visualize is True). :rtype: numpy.ndarray