pyaesthetics.spacebaseddecomposition.get_areas

pyaesthetics.spacebaseddecomposition.get_areas(img, minArea=100, resize=True, newSize=[600, 400], plot=False, coordinates=False, areatype=True, returnbox=False)

Detects and returns areas in an image based on contours.

Parameters:
  • img (numpy.ndarray) – Source image.

  • minArea (int) – Minimum area threshold for detected objects.

  • resize (bool) – Whether to resize the image.

  • newSize (list) – New size for resizing the image.

  • plot (bool) – Whether to plot the detected areas.

  • coordinates (bool) – Whether to include coordinates in the result.

  • areatype (bool) – Whether to classify areas as text or image.

  • returnbox (bool) – Whether to include box points in the result.

Returns:

Dictionary with detected areas and their properties.

Return type:

dict