pyaesthetics.visualcomplexity.get_visual_complexity_quadtree

pyaesthetics.visualcomplexity.get_visual_complexity_quadtree(image, minStd, minSize, standardized=True, autoadjust=False)

Calculate the visual complexity of an image using quadtree decomposition. It can return the standardized (default) visual complexity, with 1 being the highest complexity possible, or unstandardized (which is the number of leaves resulting from the quadratic tree decomposition).

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

  • minStd (int) – Minimum standard deviation for splitting blocks.

  • minSize (int) – Minimum size of blocks.

  • standardized (bool) – Whether to return standardized complexity.

  • autoadjust (bool) – Whether to automatically adjust the minSize parameter.

Returns:

Standardized complexity if standardized is True, otherwise the number of blocks.

Return type:

float or int