analysis.analyze_image

analysis.analyze_image(pathToImg, method='fast', resize=True, newSize=(600, 400), minStd=10, minSize=20)

This function acts as an entry point for the automatic analysis of an image’s aesthetic features. There are two methods available: ‘fast’ (default) and ‘complete’.

The ‘fast’ method performs the following analysis: - brightness (BT709) - Visual Complexity (using quadtree decomposition) - Symmetry (using quadtree decomposition) - Colorfulness (in the RGB color scheme) - contrast (Root Mean Square (RMS) method) - saturation - ratio between straight and curved lines

The ‘complete’ method performs the following analysis: - brightness (BT709 and BT601) - Visual Complexity (using quadtree decomposition) - Visual Complexity (using the weight method) - Symmetry (using quadtree decomposition) - Colorfulness (in HSV and RGB color schemes) - Face detection and number of faces - Color detection - Number of images within an image - Text to image ratio - Surface area occupied by text and images - contrast (Root Mean Square (RMS) and Michelson methods) - saturation - ratio between straight and curved lines

Parameters:
  • pathToImg (str) – path to the image to analyze

  • method (str) – set the analysis method to use. Valid methods are ‘fast’ and ‘complete’. Default is ‘fast’.

  • resize (bool) – indicate whether to resize the image (reduces computational workload, this reducing processing time)

  • newSize (tuple) – if the image has to be resized, this tuple indicates the new size of the image

  • minStd (int) – minimum standard deviation for the quadtree decomposition

  • minSize (int) – minimum size for the quadtree decomposition

Returns:

dictionary containing the analysis results

Return type:

dict