bsie.extractor.image.colors_spatial module#

Spatial color features.

class bsie.extractor.image.colors_spatial.ColorsSpatial(width: int = 32, height: int = 32, exp: float = 4.0)#

Bases: Extractor

Determine dominant colors of subregions in the image.

Computes the domiant color of increasingly smaller subregions of the image.

CONTENT_READER: str | None = 'bsie.reader.image.Image'#
static dimension(width: int, height: int, exp: float) int#

Return the feature vector dimension.

exp: float#
extract(subject: Node, content: Image, principals: Iterable[Predicate]) Iterator[Tuple[Node, Predicate, Any]]#

Return (node, predicate, value) triples.

height: int#
width: int#